From 9150187ab95f272de4e3c8bc1a1fe2acf08328f8 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Tue, 2 Aug 2011 16:48:08 -0500 Subject: Resizable adder dialog box. The tables in the adder dialog have been modified to expand according to the size of the dialog. This patch also fixes the problem with row height on IE. Ticket #1542 --- install/ui/association.js | 2 +- install/ui/dialog.js | 104 ++++++++++++++++++++++++++-------------------- install/ui/ipa.css | 94 ++++++++++++++++++++++++++++++++++------- 3 files changed, 137 insertions(+), 63 deletions(-) (limited to 'install') diff --git a/install/ui/association.js b/install/ui/association.js index 5b8a311ae..3c924549f 100644 --- a/install/ui/association.js +++ b/install/ui/association.js @@ -217,7 +217,7 @@ IPA.association_adder_dialog = function (spec) { name: pkey_name, label: IPA.metadata.objects[spec.other_entity].label, primary_key: true, - width: '200px' + width: '600px' }]; } } diff --git a/install/ui/dialog.js b/install/ui/dialog.js index 848252d87..0a1d5428a 100644 --- a/install/ui/dialog.js +++ b/install/ui/dialog.js @@ -202,11 +202,13 @@ IPA.dialog = function(spec) { that.create(); that.container.dialog({ - 'title': that.title, - 'modal': true, - 'width': that.width, - 'height': that.height, - 'buttons': that.buttons, + title: that.title, + modal: true, + width: that.width, + minWidth: that.width, + height: that.height, + minHeight: that.height, + buttons: that.buttons, close: function(event, ui) { that.close(); } @@ -295,8 +297,6 @@ IPA.dialog = function(spec) { * values from the available results. */ IPA.adder_dialog = function (spec) { - var NORMAL_HEIGHT = '151px'; - var EXTERNAL_HEIGHT = '119px'; spec = spec || {}; @@ -343,16 +343,10 @@ IPA.adder_dialog = function (spec) { }; function initialize_table(){ - var table_height = NORMAL_HEIGHT; - if (that.external){ - table_height = EXTERNAL_HEIGHT; - } - that.available_table = IPA.table_widget({ entity: that.entity, name: 'available', - scrollable: true, - height: table_height + scrollable: true }); var columns = that.columns.values; @@ -361,8 +355,7 @@ IPA.adder_dialog = function (spec) { that.selected_table = IPA.table_widget({ entity: that.entity, name: 'selected', - scrollable: true, - height: NORMAL_HEIGHT + scrollable: true }); that.selected_table.set_columns(columns); @@ -377,23 +370,26 @@ IPA.adder_dialog = function (spec) { // do not call that.dialog_create(); - var search_panel = $('
', { - 'class': 'adder-dialog-filter' + var container = $('
', { + 'class': 'adder-dialog' }).appendTo(that.container); + var top_panel = $('
', { + 'class': 'adder-dialog-top' + }).appendTo(container); + $('', { type: 'text', - name: 'filter', - style: 'width: 244px' - }).appendTo(search_panel); + name: 'filter' + }).appendTo(top_panel); - search_panel.append(' '); + top_panel.append(' '); $('', { type: 'button', name: 'find', value: IPA.messages.buttons.find - }).appendTo(search_panel); + }).appendTo(top_panel); $('', { type: 'checkbox', @@ -401,40 +397,41 @@ IPA.adder_dialog = function (spec) { id: 'hidememb', checked: 'checked', style: 'margin-left: 5px; vertical-align: middle' - }).appendTo(search_panel); + }).appendTo(top_panel); - var label = $('