summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/gallery.dialog.js35
1 files changed, 17 insertions, 18 deletions
diff --git a/lib/gallery.dialog.js b/lib/gallery.dialog.js
index d6511fd9..6309e75a 100644
--- a/lib/gallery.dialog.js
+++ b/lib/gallery.dialog.js
@@ -42,7 +42,6 @@ function openDialog(element, on_success) {
}
});
showLoading("#gDialog");
- $("#gDialog").html(sHref);
$.get(sHref, function(data) {
showLoading("#gDialog");
$("#gDialog").html(data);
@@ -61,23 +60,23 @@ function openDialog(element, on_success) {
parent.css({"opacity": "1.0"});
ajaxify_dialog = function() {
$("#gDialog form").ajaxForm({
- dataType: "json",
- success: function(data) {
- if (data.form) {
- $("#gDialog form").replaceWith(data.form);
- ajaxify_dialog();
- }
- if (data.result == "success") {
- $("#gDialog").dialog("close");
- if (on_success) {
- on_success();
- } else if (data.location) {
- window.location = data.location;
- } else {
- window.location.reload();
- }
- }
- }
+ dataType: "json",
+ success: function(data) {
+ if (data.form) {
+ $("#gDialog form").replaceWith(data.form);
+ ajaxify_dialog();
+ }
+ if (data.result == "success") {
+ $("#gDialog").dialog("close");
+ if (on_success) {
+ on_success();
+ } else if (data.location) {
+ window.location = data.location;
+ } else {
+ window.location.reload();
+ }
+ }
+ }
});
};
ajaxify_dialog();