diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gallery.dialog.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/gallery.dialog.js b/lib/gallery.dialog.js index c91c07b7..10ec412a 100644 --- a/lib/gallery.dialog.js +++ b/lib/gallery.dialog.js @@ -20,7 +20,7 @@ function handleDialogEvent(event) { * @todo Set ui-dialog-buttonpane button values equal to the original form button value * @todo Display loading animation on form submit */ -function openDialog(element) { +function openDialog(element, on_success) { var sHref = $(element).attr("href"); var sTitle = $(element).attr("title"); var eDialog = '<div id="gDialog"></div>'; @@ -36,8 +36,8 @@ function openDialog(element) { } if (data.result == "success") { $("#gDialog").dialog("close"); - if (data.reload) { - window.location.reload(); + if (on_success) { + on_success(); } else if (data.location) { window.location = data.location; } else { |