From 45690fa8976bbb30272939ca8e43326cdd9e5888 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Fri, 23 Oct 2009 13:24:51 -0700 Subject: 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. --- lib/gallery.panel.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/gallery.panel.js') 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); -- cgit v1.2.3