diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-08-27 16:15:01 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-08-27 16:15:01 -0700 |
commit | 8d2cd12c58508c58520d4df2875a3f7974343d8f (patch) | |
tree | bc2c99a5f493d365d0306c855878bad319cc664f /lib | |
parent | e0e430bd84d8c82eb425c0bc828dae2b9c0d86be (diff) | |
parent | bfc64685e4ae4bbd2c0308e9520194215ab51469 (diff) |
Merge branch 'master' of git@github.com:talmdal/gallery3 into talmdal_branch
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; } |