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.
This commit is contained in:
Adam Young 2011-06-03 11:33:32 -04:00 committed by Endi Sukma Dewata
parent 403ed477b5
commit 4080a03051
6 changed files with 29 additions and 20 deletions

View File

@ -50,6 +50,7 @@ IPA.entity_factories.permission = function() {
}]}). }]}).
standard_association_facets(). standard_association_facets().
adder_dialog({ adder_dialog({
height: '400',
fields:[ fields:[
'cn', 'cn',
{ {

View File

@ -394,6 +394,9 @@ IPA.adder_dialog = function (spec) {
height: '151px' height: '151px'
}); });
that.available_table.resize = function(){
};
var columns = that.columns.values; var columns = that.columns.values;
that.available_table.set_columns(columns); that.available_table.set_columns(columns);
@ -405,6 +408,9 @@ IPA.adder_dialog = function (spec) {
height: '151px' height: '151px'
}); });
that.selected_table.resize = function(){
};
that.selected_table.set_columns(columns); that.selected_table.set_columns(columns);
that.selected_table.init(); that.selected_table.init();

View File

@ -132,7 +132,6 @@ IPA.facet = function (spec) {
that.resize = function(){ that.resize = function(){
var facet_content = $('.facet-content', that.container); var facet_content = $('.facet-content', that.container);
facet_content.css("height", 'auto');
facet_content.css('overflow-y', 'auto'); facet_content.css('overflow-y', 'auto');
var content_max_height = $(window).height() - var content_max_height = $(window).height() -

View File

@ -292,10 +292,6 @@ dl.aci-target input {
} }
.aci-attribute-table th.style {
}
#group_filter { #group_filter {
margin-right: 2em; margin-right: 2em;
} }
@ -385,6 +381,10 @@ span.attrhint {
//background-image: url("ui-icons_222222_256x240.png"); //background-image: url("ui-icons_222222_256x240.png");
background-color: #e2e2e2; background-color: #e2e2e2;
} }
.ui-dialog .ui-dialog-content {
#this should go away once we can fix table scrolling
overflow:auto;
}
.ui-widget-content { .ui-widget-content {
} }
@ -666,15 +666,21 @@ a.action-button-disabled {
width: 22px; width: 22px;
} }
.aci-attribute-table {
}
.aci-attribute-table tbody{ .aci-attribute-table tbody{
height:30em; width: 20em;
overflow-x:hidden; height:10em;
overflow:auto;
border-bottom: 1px solid #8a8a8a; border-bottom: 1px solid #8a8a8a;
} }
.aci-attribute-table th.aci-attribute-column{ .aci-attribute-table th.aci-attribute-column{
float: left; float: left;
width: 46.5em; width: 20.5em;
padding: 0.8em 0.5em; padding: 0.8em 0.5em;
} }

View File

@ -75,7 +75,6 @@ IPA.search_facet = function(spec) {
}; };
} }
that.table = IPA.table_widget({ that.table = IPA.table_widget({
scrollable: true, scrollable: true,
id: entity.name+'-search', id: entity.name+'-search',

View File

@ -1060,7 +1060,6 @@ IPA.table_widget = function (spec) {
that.current_page = 1; that.current_page = 1;
that.total_pages = 1; that.total_pages = 1;
that.page_length = spec.page_length; that.page_length = spec.page_length;
that.columns = $.ordered_map(); that.columns = $.ordered_map();
that.get_columns = function() { that.get_columns = function() {
@ -1298,13 +1297,12 @@ IPA.table_widget = function (spec) {
}; };
that.resize = function(){ that.resize = function(){
if (that.scrollable){
that.tbody.attr('overflow-y', 'auto'); that.tbody.attr('overflow-y', 'auto');
that.tbody.height("auto");
var table_max_height = $(window).height() - var win = $(window);
var table_max_height = win.height() -
IPA.reserved_screen_size; IPA.reserved_screen_size;
that.tbody.height(table_max_height); that.tbody.height(table_max_height);
}
}; };
that.load = function(result) { that.load = function(result) {