diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-11-06 23:05:20 -0800 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-11-06 23:05:20 -0800 |
commit | beb63a83804e57050a23b3a90ebed93be41b6769 (patch) | |
tree | 992877365f08f9bb39af1a405cd25f1c0c950f32 /lib | |
parent | f102693966824cf1bc1421282d89f1ee2318ed9e (diff) |
Clean up the In place edit api:
1) Only allow 1 in place edit to be active at a time (gets around the issue of using an id to identify the form
2) remove the add_ prefix from some of the api methods
3) clean up inconsistent naming
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gallery.in_place_edit.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/gallery.in_place_edit.js b/lib/gallery.in_place_edit.js index 38c4efb1..4a90581b 100644 --- a/lib/gallery.in_place_edit.js +++ b/lib/gallery.in_place_edit.js @@ -15,6 +15,13 @@ var tag_width = $(target).width(); $(self).data("tag_width", tag_width); + var form = $("#g-inplace-edit-form"); + if (form.length > 0) { + var parent = form.parent(); + form.remove(); + parent.children().show(); + } + $.get(self.options.form_url.replace("__ID__", $(target).attr('rel')), function(data) { var parent = $(target).parent(); parent.children().hide(); |