diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-10-23 13:24:51 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-10-23 13:24:51 -0700 |
commit | 45690fa8976bbb30272939ca8e43326cdd9e5888 (patch) | |
tree | a863cadd76578709850f16ec71450dbe64d2961c | |
parent | 14427a01580df88011e052ca0b8f3bfa9c67f9ec (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); |