From 7b0ea229b8591c3fba5eb3cb853aa2ac3efd2d97 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Fri, 7 Aug 2009 17:07:04 -0700 Subject: Make the organize dialog open properly in IE8, Chrome and FF. For some reason (probably a timing thing) the height of the contents was not being set correctly in FF. So we just hard code an estimate of the size of the Draw handle, and message areas. --- lib/gallery.dialog.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib/gallery.dialog.js') diff --git a/lib/gallery.dialog.js b/lib/gallery.dialog.js index 51ebb21a..e3597eab 100644 --- a/lib/gallery.dialog.js +++ b/lib/gallery.dialog.js @@ -59,10 +59,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 form").length == 0) { + dialogWidth = size.width() - 100; + $("#gDialog").dialog("option", "height", size.height() - 100); } else if (childWidth == "" || childWidth > 300) { dialogWidth = 500; } -- cgit v1.2.3