Fixes an artifact created by yesterdays scrolling table patch.
From 5c931916c2fbf70b9c4ceb565bb5c56c9fa595ab Mon Sep 17 00:00:00 2001 From: Adam Young <ayo...@redhat.com> Date: Fri, 3 Jun 2011 11:33:32 -0400 Subject: [PATCH] dialog scrolling table
TAbles on the dialog page need to have the scrolling set but should not resize with the main window, since their window is a JQuery UI dialog. --- install/ui/associate.js | 3 ++- install/ui/ipa.css | 3 +++ install/ui/search.js | 2 +- install/ui/widget.js | 11 ++++++++--- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/install/ui/associate.js b/install/ui/associate.js index f7ac1505ef8cd9003f7589db9a40033dcc8fe5f9..6e6fb8751f877a3f600fcfe2a227aaf7f7bb71c3 100644 --- a/install/ui/associate.js +++ b/install/ui/associate.js @@ -774,7 +774,8 @@ IPA.association_facet = function (spec) { entity_name: that.entity_name, other_entity: that.other_entity, page_length: that.page_length, - scrollable: true + scrollable: true, + resizeable: true }); var columns = that.columns.values; diff --git a/install/ui/ipa.css b/install/ui/ipa.css index 524dc7f6247b644d010e38501716b26e30ebd239..31db27a8d0fa6c019a68ff85b5c725bbed8c91ae 100644 --- a/install/ui/ipa.css +++ b/install/ui/ipa.css @@ -385,6 +385,9 @@ span.attrhint { //background-image: url("ui-icons_222222_256x240.png"); background-color: #e2e2e2; } +.ui-dialog .ui-dialog-content { + overflow:hidden; +} .ui-widget-content { } diff --git a/install/ui/search.js b/install/ui/search.js index 33eb8c93c80c1c0d0d3d9e3b31a73ee1fda082cf..155dade7e8050408089668158221f5e537ba89a1 100644 --- a/install/ui/search.js +++ b/install/ui/search.js @@ -75,9 +75,9 @@ IPA.search_facet = function(spec) { }; } - that.table = IPA.table_widget({ scrollable: true, + resizeable: true, id: entity.name+'-search', name: 'search', label: IPA.metadata.objects[entity.name].label, diff --git a/install/ui/widget.js b/install/ui/widget.js index 9cbd31f0a08539ee8ac6e72feb151d580a7fe1f3..ccaa9ca5a163de448e946e60f8f173a3eab0841b 100644 --- a/install/ui/widget.js +++ b/install/ui/widget.js @@ -1060,7 +1060,7 @@ IPA.table_widget = function (spec) { that.current_page = 1; that.total_pages = 1; that.page_length = spec.page_length; - + that.resizeable = spec.resizeable || false; that.columns = $.ordered_map(); that.get_columns = function() { @@ -1298,10 +1298,15 @@ IPA.table_widget = function (spec) { }; that.resize = function(){ - if (that.scrollable){ + if (that.resizeable){ that.tbody.attr('overflow-y', 'auto'); that.tbody.height("auto"); - var table_max_height = $(window).height() - + + var win = $(that.container).parent('.ui_resizable'); + if (win.length === 0 ){ + win = $(window); + } + var table_max_height = win.height() - IPA.reserved_screen_size; that.tbody.height(table_max_height); } -- 1.7.5.1
_______________________________________________ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel