summaryrefslogtreecommitdiff
path: root/lib/gallery.panel.js
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-10-23 13:25:54 -0700
committerTim Almdal <tnalmdal@shaw.ca>2009-10-23 13:25:54 -0700
commitcd5485ee845aed96e5ab2eaeb5f92c093ccf260a (patch)
tree0a3274334feea099470dff36f1241537fe83da3e /lib/gallery.panel.js
parent6af697686ae10620f084559d366d0e658300c1b3 (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.
Diffstat (limited to 'lib/gallery.panel.js')
-rw-r--r--lib/gallery.panel.js6
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);