summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2010-02-01 22:32:22 -0800
committerTim Almdal <tnalmdal@shaw.ca>2010-02-01 22:32:22 -0800
commit519cc249c4e59e987af440a066f81271b29dd931 (patch)
tree7cd461dfe860b9340390476c2342de00bd9504dc /lib
parent43985ea2fb137aa7d532617271e37d7c20def3c5 (diff)
Guard the gallery.in_place_edit::_show method so that if an attempt is made to show the inplace edit form multiple times, the form is only shown once. Fixes ticket #999
Diffstat (limited to 'lib')
-rw-r--r--lib/gallery.in_place_edit.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/gallery.in_place_edit.js b/lib/gallery.in_place_edit.js
index 681688e5..c10400e3 100644
--- a/lib/gallery.in_place_edit.js
+++ b/lib/gallery.in_place_edit.js
@@ -10,6 +10,10 @@
},
_show: function(target) {
+ if ($(this).data("gallery_in_place_edit") == true) {
+ return;
+ }
+ $(this).data("gallery_in_place_edit", true);
var self = this;
var tag_width = $(target).width();
$(self).data("tag_width", tag_width);
@@ -42,6 +46,7 @@
$(parent).find("form").remove();
$(parent).children().show();
$("#g-in-place-edit-message").remove();
+ $(this).data("gallery_in_place_edit", false);
},
_ajaxify_edit: function() {