From 571274e978434a7b5e17100076172233e7320855 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Fri, 15 Jul 2011 12:18:59 -0500 Subject: Entity select widget improvements The IPA.entity_select_widget has been modified into a searchable and editable drop down list. The base functionality has been extracted into IPA.combobox_widget. Ticket #1361 --- install/ui/aci.js | 41 ++++++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 13 deletions(-) (limited to 'install/ui/aci.js') diff --git a/install/ui/aci.js b/install/ui/aci.js index 1a95af0e7..54050c79c 100644 --- a/install/ui/aci.js +++ b/install/ui/aci.js @@ -50,7 +50,8 @@ IPA.entity_factories.permission = function() { }]}). standard_association_facets(). adder_dialog({ - height: '400', + width: 500, + height: 400, fields:[ 'cn', { @@ -165,12 +166,16 @@ IPA.entity_factories.delegation = function() { fields:[ 'aciname', { - factory:IPA.entity_select_widget, - name: 'group', entity: 'group' + factory: IPA.entity_select_widget, + name: 'group', + other_entity: 'group', + other_field: 'cn' }, { - factory:IPA.entity_select_widget, - name: 'memberof', entity: 'group', + factory: IPA.entity_select_widget, + name: 'memberof', + other_entity: 'group', + other_field: 'cn', join: true }, { @@ -183,13 +188,19 @@ IPA.entity_factories.delegation = function() { fields:[ 'aciname', { - factory:IPA.entity_select_widget, - name: 'group', entity: 'group', undo: false + factory: IPA.entity_select_widget, + name: 'group', + other_entity: 'group', + other_field: 'cn', + undo: false }, { - factory:IPA.entity_select_widget, - name: 'memberof', entity: 'group', - join: true, undo: false + factory: IPA.entity_select_widget, + name: 'memberof', + other_entity: 'group', + other_field: 'cn', + join: true, + undo: false }, { factory:IPA.attributes_widget, @@ -402,8 +413,12 @@ IPA.target_section = function(spec) { cols: 30, rows: 1, undo: that.undo }); - that.group_select = IPA.entity_select_widget( - {name: 'targetgroup', entity:'group', undo: that.undo}); + that.group_select = IPA.entity_select_widget({ + name: 'targetgroup', + other_entity: 'group', + other_field: 'cn', + undo: that.undo + }); that.type_select = IPA.select_widget({name: 'type', undo: that.undo}); that.attribute_table = IPA.attributes_widget({ name: 'attrs', undo: that.undo}); @@ -506,7 +521,7 @@ IPA.target_section = function(spec) { that.group_select.create(span); }, load: function(record){ - that.group_select.entity_select.val(record.targetgroup); + that.group_select.list.val(record.targetgroup); }, save: function(record){ record.targetgroup = that.group_select.save()[0]; -- cgit