summaryrefslogtreecommitdiff
path: root/lib/gallery.dialog.js
diff options
context:
space:
mode:
authorChad Kieffer <chad@2tbsp.com>2009-02-07 21:01:52 +0000
committerChad Kieffer <chad@2tbsp.com>2009-02-07 21:01:52 +0000
commitce826c3048470098f6c58f81ea5fd3ecee4b4877 (patch)
tree3c303f4a63642c7faa2c5428a39e670f417dba07 /lib/gallery.dialog.js
parent8f382c8f42af7f1d2a459a0e82afd518166f22ff (diff)
Updated jQuery UI in lib to 1.6rc6. Removed opacity settings in openDialog, refactored showLoading() a bit.
Diffstat (limited to 'lib/gallery.dialog.js')
-rw-r--r--lib/gallery.dialog.js23
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);
}