diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-08-28 11:42:54 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-08-28 11:42:54 -0700 |
commit | 16fc4465d0e773239bfe11681f7303b46e6419f0 (patch) | |
tree | fd67e408d9b3a7905553ce220ef948124d29c069 /lib | |
parent | c0c65c6fcc971b1ea9c0afb75854aec502591d56 (diff) | |
parent | 430b57578b048366f054743e47de1b66cebb574e (diff) |
Merge branch 'master' of git@github.com:talmdal/gallery3
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gallery.dialog.js | 8 |
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; } |