From 4080a03051b244c061fdc494dec67d3ee97f9a1a Mon Sep 17 00:00:00 2001 From: Adam Young Date: Fri, 3 Jun 2011 11:33:32 -0400 Subject: 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/aci.js | 1 + install/ui/dialog.js | 6 ++++++ install/ui/entity.js | 1 - install/ui/ipa.css | 26 ++++++++++++++++---------- install/ui/search.js | 1 - install/ui/widget.js | 14 ++++++-------- 6 files changed, 29 insertions(+), 20 deletions(-) diff --git a/install/ui/aci.js b/install/ui/aci.js index d507e2d07..70fe6d925 100644 --- a/install/ui/aci.js +++ b/install/ui/aci.js @@ -50,6 +50,7 @@ IPA.entity_factories.permission = function() { }]}). standard_association_facets(). adder_dialog({ + height: '400', fields:[ 'cn', { diff --git a/install/ui/dialog.js b/install/ui/dialog.js index 3bcb4556d..36bc49bb4 100644 --- a/install/ui/dialog.js +++ b/install/ui/dialog.js @@ -394,6 +394,9 @@ IPA.adder_dialog = function (spec) { height: '151px' }); + that.available_table.resize = function(){ + }; + var columns = that.columns.values; that.available_table.set_columns(columns); @@ -405,6 +408,9 @@ IPA.adder_dialog = function (spec) { height: '151px' }); + that.selected_table.resize = function(){ + }; + that.selected_table.set_columns(columns); that.selected_table.init(); diff --git a/install/ui/entity.js b/install/ui/entity.js index da5b3ea60..c3c5135b9 100644 --- a/install/ui/entity.js +++ b/install/ui/entity.js @@ -132,7 +132,6 @@ IPA.facet = function (spec) { that.resize = function(){ var facet_content = $('.facet-content', that.container); - facet_content.css("height", 'auto'); facet_content.css('overflow-y', 'auto'); var content_max_height = $(window).height() - diff --git a/install/ui/ipa.css b/install/ui/ipa.css index 524dc7f62..8cac85cd0 100644 --- a/install/ui/ipa.css +++ b/install/ui/ipa.css @@ -292,10 +292,6 @@ dl.aci-target input { } -.aci-attribute-table th.style { - -} - #group_filter { margin-right: 2em; } @@ -385,6 +381,10 @@ span.attrhint { //background-image: url("ui-icons_222222_256x240.png"); background-color: #e2e2e2; } +.ui-dialog .ui-dialog-content { + #this should go away once we can fix table scrolling + overflow:auto; +} .ui-widget-content { } @@ -666,16 +666,22 @@ a.action-button-disabled { width: 22px; } +.aci-attribute-table { + +} + + .aci-attribute-table tbody{ - height:30em; - overflow-x:hidden; - border-bottom: 1px solid #8a8a8a; + width: 20em; + height:10em; + overflow:auto; + border-bottom: 1px solid #8a8a8a; } .aci-attribute-table th.aci-attribute-column{ float: left; - width: 46.5em; - padding: 0.8em 0.5em; + width: 20.5em; + padding: 0.8em 0.5em; } .entity-views{ @@ -938,4 +944,4 @@ table.scrollable tbody { .facet-content { margin: 10px 0 0; -} \ No newline at end of file +} diff --git a/install/ui/search.js b/install/ui/search.js index 33eb8c93c..e4c866826 100644 --- a/install/ui/search.js +++ b/install/ui/search.js @@ -75,7 +75,6 @@ IPA.search_facet = function(spec) { }; } - that.table = IPA.table_widget({ scrollable: true, id: entity.name+'-search', diff --git a/install/ui/widget.js b/install/ui/widget.js index 9cbd31f0a..c48d967e2 100644 --- a/install/ui/widget.js +++ b/install/ui/widget.js @@ -1060,7 +1060,6 @@ IPA.table_widget = function (spec) { that.current_page = 1; that.total_pages = 1; that.page_length = spec.page_length; - that.columns = $.ordered_map(); that.get_columns = function() { @@ -1298,13 +1297,12 @@ IPA.table_widget = function (spec) { }; that.resize = function(){ - if (that.scrollable){ - that.tbody.attr('overflow-y', 'auto'); - that.tbody.height("auto"); - var table_max_height = $(window).height() - - IPA.reserved_screen_size; - that.tbody.height(table_max_height); - } + that.tbody.attr('overflow-y', 'auto'); + + var win = $(window); + var table_max_height = win.height() - + IPA.reserved_screen_size; + that.tbody.height(table_max_height); }; that.load = function(result) { -- cgit