summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-08-06 09:46:39 -0700
committerTim Almdal <tnalmdal@shaw.ca>2009-08-06 19:21:29 -0700
commit93c0dffab3ba3631c9ebf4693571bd38e5613d1c (patch)
tree1616b0f9770ae8d519642f3d6899ace1c788d992
parent0fc96621d55e1e6b3b5f7f84760a39ff06f0e641 (diff)
Remove the complicated calculation to determine the height of the
micro thumb grid, by setting all the parent elements to 100% in the css and then subtract the height of the button bar
-rw-r--r--modules/organize/css/organize.css11
-rw-r--r--modules/organize/js/organize.js43
2 files changed, 27 insertions, 27 deletions
diff --git a/modules/organize/css/organize.css b/modules/organize/css/organize.css
index 0a23a6bf..56ecc309 100644
--- a/modules/organize/css/organize.css
+++ b/modules/organize/css/organize.css
@@ -7,6 +7,11 @@
#gOrganize {
overflow: hidden;
+ height: 100%;
+}
+
+#gOrganize #bd {
+ height: 100%;
}
#gOrganize .yui-u {
@@ -22,16 +27,20 @@
width: 75%;
}
+#gOrganizeDetail {
+ height: 100%;
+}
+
#gMessage .gInfo {
font-weight: bold;
padding-left: 2em;
}
-
/*******************************************************************
* Album Tree styling
*/
#gOrganizeTreeContainer {
+ height: 100%;
overflow: auto;
margin: 0 !important;
padding: 0 !important;
diff --git a/modules/organize/js/organize.js b/modules/organize/js/organize.js
index 89549954..6a65bfa2 100644
--- a/modules/organize/js/organize.js
+++ b/modules/organize/js/organize.js
@@ -1,54 +1,45 @@
(function($) {
- $.fn.organize = function(options) {
+ $.fn.organize = function() {
var size = $.getViewportSize();
var height = size.height() - 100; // Leave 50 pixels on the top and bottom of the dialog
var width = size.width() - 100; // Leave 50 pixels on the left and right of the dialog
- var opts = $.extend({}, $.fn.organize.defaults, {width: width, height: height}, options);
return this.each(function() {
$(this).click(function(event) {
var href = event.target.href;
- var size = $.getViewportSize();
$("body").append('<div id="gOrganizeDialog"></div>');
- $("#gOrganizeDialog").dialog(opts);
+ $("#gOrganizeDialog").dialog({
+ autoOpen: false,
+ modal: true,
+ resizable: false,
+ width: width,
+ height: height,
+ position: "center",
+ close: function () {
+ $("#gOrganizeDialog").trigger("organize_close");
+ $("#gOrganizeDialog").dialog("destroy").remove();
+ },
+ zIndex: 75
+ });
$.get(href, _init);
return false;
});
});
};
- $.fn.organize.defaults = {
- autoOpen: false,
- modal: true,
- resizable: false,
- minWidth: 600,
- minHeight: 500,
- position: "center",
- close: function () {
- $("#gOrganizeDialog").trigger("organize_close");
- $("#gOrganizeDialog").dialog("destroy").remove();
- },
- zIndex: 75
- };
-
/**
* Dynamically initialize the organize dialog when it is displayed
*/
function _init(data) {
- // Deal with ui.jquery bug: http://dev.jqueryui.com/ticket/4475
+ // Deal with ui.jquery bug: http://dev.jqueryui.com/ticket/4475 (target 1.8?)
$(".sf-menu li.sfHover ul").css("z-index", 70);
$("#gOrganizeDialog").html(data);
$("#gOrganizeDialog").dialog("open");
- var heightMicroThumbPanel = $("#gOrganizeDialog").innerHeight();
- heightMicroThumbPanel -= 2 * parseFloat($("#gOrganizeDialog").css("padding-bottom"));
- heightMicroThumbPanel = Math.floor(heightMicroThumbPanel - 10 - $("#gMessage").outerHeight());
- $("#gOrganizeTreeContainer").height(heightMicroThumbPanel);
-
- heightMicroThumbPanel -= $("#gOrganizeEditDrawerHandle").outerHeight();
- $("#gMicroThumbPanel").height(heightMicroThumbPanel);
+ var height = $("#gOrganizeDetail").innerHeight();
+ $("#gMicroThumbPanel").height(height - $("#gOrganizeEditDrawerHandle").outerHeight());
if ($("#gOrganizeDialog h1").length) {
$("#gOrganizeDialog").dialog('option', 'title', $("#gOrganizeDialog h1:eq(0)").html());