summaryrefslogtreecommitdiff
path: root/lib/gallery.panel.js
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-10-23 13:24:51 -0700
committerTim Almdal <tnalmdal@shaw.ca>2009-10-23 13:24:51 -0700
commit45690fa8976bbb30272939ca8e43326cdd9e5888 (patch)
treea863cadd76578709850f16ec71450dbe64d2961c /lib/gallery.panel.js
parent14427a01580df88011e052ca0b8f3bfa9c67f9ec (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);