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. --- modules/organize/js/organize.js | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'modules/organize/js/organize.js') diff --git a/modules/organize/js/organize.js b/modules/organize/js/organize.js index 6b4a5934..853e3eef 100644 --- a/modules/organize/js/organize.js +++ b/modules/organize/js/organize.js @@ -4,21 +4,19 @@ * Dynamically initialize the organize dialog when it is displayed */ init: function(data) { - // Resize with 50 pixels padding all around - var size = $.getViewportSize(); - $("#gDialog").dialog("option", "height", size.height() - 100) - .dialog("option", "width", size.width() - 100) - .dialog("option", "position", "center"); - // Deal with ui.jquery bug: http://dev.jqueryui.com/ticket/4475 (target 1.8?) $(".sf-menu li.sfHover ul").css("z-index", 70); - var height = $("#gOrganizeDetail").innerHeight(); - $("#gMicroThumbPanel").height(height - $("#gOrganizeEditDrawerHandle").outerHeight()); + $("#gDialog").bind("dialogopen", function(event, ui) { + $("#gMicroThumbPanel").height($("#gDialog").innerHeight() - 90); + }); + + $("#gDialog").bind("dialogclose", function(event, ui) { + window.location.reload(); + }); $("#gDialog #gMicroThumbDone").click(function(event) { $("#gDialog").dialog("close"); - window.location.reload(); }); $(".gBranchText span").click($.organize.collapse_or_expand_tree); -- cgit v1.2.3