summaryrefslogtreecommitdiff
path: root/lib/gallery.dialog.js
diff options
context:
space:
mode:
authorChad Kieffer <ckieffer@gmail.com>2009-08-28 13:48:54 -0600
committerChad Kieffer <ckieffer@gmail.com>2009-08-28 13:48:54 -0600
commit5a2853bca1ea9a9231e01814df9aa373bf50d19c (patch)
tree431264bfb9de1d8bbdc6a9ba7775a363381f96e8 /lib/gallery.dialog.js
parentf1e008a14f2dfb51d1204dad3deb19e2e3df16c8 (diff)
parent6dcfdb6432d556f43736d60de8f310f247868bfa (diff)
Merge branch 'master' of git@github.com:gallery/gallery3
Diffstat (limited to 'lib/gallery.dialog.js')
-rw-r--r--lib/gallery.dialog.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/gallery.dialog.js b/lib/gallery.dialog.js
index 4bbb8ab7..ace588f6 100644
--- a/lib/gallery.dialog.js
+++ b/lib/gallery.dialog.js
@@ -56,10 +56,14 @@
var dialogHeight = $("#gDialog").height();
var cssWidth = new String($("#gDialog form").css("width"));
var childWidth = cssWidth.replace(/[^0-9]/g,"");
+ var size = $.gallery_get_viewport_size();
if ($("#gDialog iframe").length) {
- dialogWidth = $(window).width() - 100;
+ dialogWidth = size.width() - 100;
// Set the iframe width and height
- $("#gDialog iframe").width("100%").height($(window).height() - 100);
+ $("#gDialog iframe").width("100%").height(size.height() - 100);
+ } else if ($("#gDialog .gDialogPanel").length) {
+ dialogWidth = size.width() - 100;
+ $("#gDialog").dialog("option", "height", size.height() - 100);
} else if (childWidth == "" || childWidth > 300) {
dialogWidth = 500;
}