From 63a7a358d4474a0ff5aab21fc0cff33429ac3348 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Mon, 19 Sep 2011 18:51:43 -0500 Subject: Fixed problem enrolling member with the same name. The IPA.association_adder_dialog has been modified to use an exclusion list to hide entries that are already enrolled. The IPA.adder_dialog has been modified to store the columns directly in the available & selected tables. Ticket #1797 --- install/ui/dialog.js | 68 +++++++++++++++++++++++----------------------------- 1 file changed, 30 insertions(+), 38 deletions(-) (limited to 'install/ui/dialog.js') diff --git a/install/ui/dialog.js b/install/ui/dialog.js index 86aefeff..eb1bbd1d 100644 --- a/install/ui/dialog.js +++ b/install/ui/dialog.js @@ -307,7 +307,7 @@ IPA.dialog = function(spec) { * This dialog provides an interface for searching and selecting * values from the available results. */ -IPA.adder_dialog = function (spec) { +IPA.adder_dialog = function(spec) { spec = spec || {}; @@ -316,7 +316,7 @@ IPA.adder_dialog = function (spec) { that.width = spec.width || 600; that.height = spec.height || 360; - if (!that.entity){ + if (!that.entity) { var except = { expected: false, message:'Adder dialog created without entity.' @@ -324,15 +324,37 @@ IPA.adder_dialog = function (spec) { throw except; } - that.columns = $.ordered_map(); + var init = function() { + that.available_table = IPA.table_widget({ + entity: that.entity, + name: 'available', + scrollable: true + }); + that.selected_table = IPA.table_widget({ + entity: that.entity, + name: 'selected', + scrollable: true + }); + + if (spec.columns) { + for (var i=0; i', { @@ -528,7 +527,6 @@ IPA.adder_dialog = function (spec) { that.search(); }; - that.open = function(container) { that.buttons[IPA.messages.buttons.enroll] = that.execute; @@ -571,13 +569,7 @@ IPA.adder_dialog = function (spec) { return that.selected_table.save(); }; - /*dialog initialization */ - if (spec.columns){ - for (var i =0; i < spec.columns.length; i +=1){ - that.create_column(spec.columns[i]); - } - } - + init(); that.adder_dialog_create = that.create; -- cgit