diff options
Diffstat (limited to 'lib/gallery.dialog.js')
-rw-r--r-- | lib/gallery.dialog.js | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/lib/gallery.dialog.js b/lib/gallery.dialog.js index ed17cf9d..6f40bdae 100644 --- a/lib/gallery.dialog.js +++ b/lib/gallery.dialog.js @@ -1,6 +1,5 @@ /** * Fire openDialog() and prevent links from opening - * * @see openDialog() */ function handleDialogEvent(event) { @@ -9,15 +8,13 @@ function handleDialogEvent(event) { } /** - * Display modal dialogs, populate dialog with trigger link's title and href - * + * Display modal dialogs, populate dialog with trigger link's href * @requires ui.core * @requires ui.draggable * @requires ui.resizable * @requires ui.dialog * @see handleDialogEvent() - * - * @todo Display loading animation on form submit + * @see showLoading() */ function openDialog(element, on_success) { var sHref = $(element).attr("href"); @@ -28,7 +25,6 @@ function openDialog(element, on_success) { $("#gDialog").dialog({ autoOpen: false, autoResize: true, - draggable: true, height: "auto", width: "auto", modal: true, @@ -46,7 +42,6 @@ function openDialog(element, on_success) { showLoading("#gDialog"); $("#gDialog").html(data); var parent = $("#gDialog").parent().parent(); - parent.css("opacity", "0.0"); $("#gDialog").dialog("open"); if ($("#gDialog h1").length) { sTitle = $("#gDialog h1:eq(0)").html(); @@ -57,7 +52,6 @@ function openDialog(element, on_success) { if (parent.width() < 400) { parent.css("width", 200); } - parent.css({"opacity": "1.0"}); ajaxify_dialog = function() { $("#gDialog form").ajaxForm({ dataType: "json", @@ -86,21 +80,18 @@ function openDialog(element, on_success) { /** * Toggle the processing indicator, both large and small - * - * @param element ID to which to apply the loading class, including # + * @param elementID Target ID, including #, to apply .gLoadingSize */ -function showLoading(element) { +function showLoading(elementID) { var size; - switch (element) { + switch (elementID) { case "#gDialog": + case "#gPanel": size = "Large"; break; - case "#gPanel": - size = "Large"; - break; default: size = "Small"; break; } - $(element).toggleClass("gLoading" + size); + $(elementID).toggleClass("gLoading" + size); } |