summaryrefslogtreecommitdiff
path: root/lib/gallery.dialog.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gallery.dialog.js')
-rw-r--r--lib/gallery.dialog.js11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/gallery.dialog.js b/lib/gallery.dialog.js
index b4557493..a771adcb 100644
--- a/lib/gallery.dialog.js
+++ b/lib/gallery.dialog.js
@@ -28,9 +28,6 @@
$("#g-dialog").dialog("close");
}
$("body").append(eDialog);
- if (!self.options.zIndex) {
- self.options.zIndex = 9999;
- }
if (!self.options.close) {
self.options.close = self.close_dialog;
@@ -79,8 +76,7 @@
_layout: function() {
var dialogWidth;
var dialogHeight = $("#g-dialog").height();
- var cssWidth = new String($("#g-dialog form").css("width"));
- var childWidth = cssWidth.replace(/[^0-9]/g,"");
+ var childWidth = $("#g-dialog form").width();
var size = $.gallery_get_viewport_size();
if ($("#g-dialog iframe").length) {
dialogWidth = size.width() - 100;
@@ -89,8 +85,10 @@
} else if ($("#g-dialog .g-dialog-panel").length) {
dialogWidth = size.width() - 100;
$("#g-dialog").dialog("option", "height", size.height() - 100);
- } else {
+ } else if (childWidth <= 150 || childWidth > 300) {
dialogWidth = 500;
+ } else {
+ dialogWidth = 300;
}
$("#g-dialog").dialog('option', 'width', dialogWidth);
},
@@ -183,6 +181,7 @@
} else if ($("#g-dialog fieldset legend").length) {
$("#g-dialog").dialog('option', 'title', $("#g-dialog fieldset legend:eq(0)").html());
}
+ $(".ui-dialog-title").width('auto');
},
form_closing: function(event, ui) {},