summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2010-07-29 08:59:10 -0700
committerTim Almdal <tnalmdal@shaw.ca>2010-07-29 08:59:10 -0700
commit8cd9c09729fc5ccafa1b74b6d3f00ef5d3476d9e (patch)
tree4dadbc621fd9d83a0740e2647f19a986c6c2e521
parent6cd31e31afbe08fb0d7ab99f5201f7cb41c9985b (diff)
Sometimes in dialogs, the form is wrapped in a view to provide additional information. We need to replace the contents of the entire dialog, not just the form, otherwise, there could be text floating around that doesn't make sense.
-rw-r--r--lib/gallery.dialog.js2
-rw-r--r--lib/gallery.panel.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/gallery.dialog.js b/lib/gallery.dialog.js
index f47c6d56..555e6f47 100644
--- a/lib/gallery.dialog.js
+++ b/lib/gallery.dialog.js
@@ -132,7 +132,7 @@
success: function(data) {
if (data.form) {
var formData = unescape(data.form);
- $("#g-dialog form").replaceWith(formData);
+ $("#g-dialog").html(formData);
$("#g-dialog").dialog("option", "position", "center");
$("#g-dialog form :submit").removeClass("ui-state-disabled")
.attr("disabled", null);
diff --git a/lib/gallery.panel.js b/lib/gallery.panel.js
index e219f3d6..aee7185d 100644
--- a/lib/gallery.panel.js
+++ b/lib/gallery.panel.js
@@ -80,7 +80,7 @@
},
success: function(data) {
if (data.form) {
- $("#g-panel td form").replaceWith(data.form);
+ $("#g-panel td").html(data.form);
self._ajaxify_panel();
}
if (data.result == "success") {