diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-10-23 13:25:54 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-10-23 13:25:54 -0700 |
commit | cd5485ee845aed96e5ab2eaeb5f92c093ccf260a (patch) | |
tree | 0a3274334feea099470dff36f1241537fe83da3e | |
parent | 6af697686ae10620f084559d366d0e658300c1b3 (diff) |
Put logic into gallery.panel.js so that when the panel is submitted, the submit button is disabled and the user is no longer able to submit multiple clicks.
-rw-r--r-- | lib/gallery.panel.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/gallery.panel.js b/lib/gallery.panel.js index 8530dd9f..8d627369 100644 --- a/lib/gallery.panel.js +++ b/lib/gallery.panel.js @@ -50,6 +50,12 @@ var self = this; $("#g-panel td form").ajaxForm({ dataType: "json", + beforeSubmit: function(formData, form, options) { + form.find(":submit") + .addClass("ui-state-disabled") + .attr("disabled", "disabled"); + return true; + }, success: function(data) { if (data.form) { $("#g-panel td form").replaceWith(data.form); |