Skip to content

Commit

Permalink
fix typo in hjq-dialog('submit'), update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanlarsen committed Jul 25, 2012
1 parent 7713fbe commit 4d858e2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions hobo_jquery_ui/taglibs/dialog_box.dryml
Expand Up @@ -14,7 +14,7 @@ or

or

<dialog-box id="story-dialog" buttons='&{"cancel" => "hjq.dialog.close"}' > FIXME</dialog>
<dialog-box id="story-dialog" buttons='&{"cancel" => "hjq_dialog_box.close"}' > FIXME</dialog>

Because Ruby 1.8 Hash's do not preserve order, you may use a list of pairs instead of a Hash.

Expand All @@ -24,11 +24,11 @@ JQuery UI is sometimes picky about types. For instance, the width option must

<dialog-box width="&640"/>

The following functions are predefined for use in dialog buttons: FIXME
The following functions are predefined for use in dialog buttons:

* `hjq.dialog.close`: close the dialog box
* `hjq.dialog.submitFormlet`: submits all formlets inside the dialog
* `hjq.dialog.submitFormletAndClose`: submits any enclosed formlets, then closes the dialog.
* `hjq_dialog_box.close`: close the dialog box
* `hjq_dialog_box.submit`: submits all formlets inside the dialog
* `hjq_dialog_box.submitAndClose`: submits any enclosed formlets, then closes the dialog.
-->
<def tag="dialog-box" attrs="buttons">
<%
Expand Down
Expand Up @@ -44,7 +44,7 @@
forms or formlets. */
submit: function(extra_options, extra_attrs) {
var dialog=this;
if(!this.hasClass("dialog-box")) dialog=this.parents(".dialog_box");
if(!this.hasClass("dialog-box")) dialog=this.parents(".dialog-box");
dialog.find("form").trigger('submit');
dialog.find(".formlet").hjq_formlet('submit', extra_options, extra_attrs);
},
Expand Down

0 comments on commit 4d858e2

Please sign in to comment.