diff --git a/install/ui/rule.js b/install/ui/rule.js index 3b1308bc9..ab2e234de 100644 --- a/install/ui/rule.js +++ b/install/ui/rule.js @@ -122,7 +122,8 @@ IPA.rule_association_table_widget = function(spec) { name: that.external, label: IPA.messages.objects.sudorule.external, entity_name: that.other_entity, - format: IPA.boolean_format + format: IPA.boolean_format, + width: '200px' }); } } diff --git a/install/ui/widget.js b/install/ui/widget.js index ab39b24e0..29c133c0a 100644 --- a/install/ui/widget.js +++ b/install/ui/widget.js @@ -1084,34 +1084,53 @@ IPA.table_widget = function (spec) { }); } } - var columns = that.columns.values; - for (var i=0; i').appendTo(tr); - var width; - var cell_spacing = 16; //cell padding(2x6px), border (2x1px), spacing (2px) - if (column.width) { - width = parseInt( - column.width.substring(0, column.width.length-2),10); - width += 16; - } else { - /* don't use the checkbox column as part of the overall - calculation for column widths. It is so small - that it throws off the average. */ - width = (that.thead.width() - - 2 - //first cell spacing - ((that.selectable ? IPA.checkbox_column_width + - cell_spacing : 0))) / - columns.length; - width -= cell_spacing; - } - width += 'px'; - th.css('width', width); - th.css('max-width', width); - column.width = width; + th.css('width', column.width); + th.css('max-width', column.width); var label = column.label; @@ -1159,6 +1178,8 @@ IPA.table_widget = function (spec) { } } + var width; + for (/* var */ i=0; i