Feature #880

[PATCH] Scribbish: use a helper instead of manually constructing the comment preview

Added by packagethief-gmail-com - 826 days ago. Updated 346 days ago.

Status :Assigned Start :
Priority :Low Due date :
Assigned to :neuro - % Done :

0%

Category :frontend
Target version :Maybe Someday
Resolution :


Description

This patch updates Scribbish to use the submit_to_remote helper on the comments form in favour of manually constructing the AJAX call.

<%= submit_to_remote('preview', 'Preview!',
                     :update   => 'preview',
                     :complete => "Element.show('preview')",
                     :url      => { :action => 'comment_preview' }) %>

This patch also adds some js to the submit button to make comment submission less error-prone: the submit button is disabled after it's clicked, and the comment-preview area is hidden so that it doesn't show after a new comment is recieved:

<%= submit_tag 'Submit', :onclick => "this.disabled=true; Element.hide('preview');" %>

History

12/21/2007 01:44 PM - neuro -

  • Status changed from New to Assigned

Also available in: Atom PDF