From 348d734c59432a740b52924ac18ff47b30dad54e Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Thu, 3 Feb 2011 21:42:50 -0600 Subject: Restructuring details page. Previously the IPA.details_list_section can only be used with widgets that generates
tag because it uses the following structure:
Telephone Number:
111-1111
222-2222
The
tag was previously used to handle multi-valued attributes. Since multi-valued attributes are now handled by the recently added IPA.multivalued_text_widget, the structure can be changed as follows:
Telephone Number:
111-1111
222-2222
This allows IPA.details_list_section to be used with any widgets without requiring the
tag. --- install/ui/aci.js | 74 ++++++--------- install/ui/certificate.js | 10 +-- install/ui/details.js | 27 ++++-- install/ui/hbacrule.js | 21 +++-- install/ui/hbacsvc.js | 4 +- install/ui/hbacsvcgroup.js | 4 +- install/ui/host.js | 16 ++-- install/ui/service.js | 81 +++++++++-------- install/ui/sudocmd.js | 4 +- install/ui/sudocmdgroup.js | 4 +- install/ui/sudorule.js | 21 +++-- install/ui/test/data/sudorule_show.json | 3 + install/ui/test/details_tests.js | 93 +++++++++---------- install/ui/user.js | 141 ++++++++++++++--------------- install/ui/widget.js | 155 ++++++++++++++++---------------- 15 files changed, 322 insertions(+), 336 deletions(-) (limited to 'install') diff --git a/install/ui/aci.js b/install/ui/aci.js index 03673123..fbfb6ba3 100644 --- a/install/ui/aci.js +++ b/install/ui/aci.js @@ -33,21 +33,16 @@ IPA.attributes_widget = function(spec) { that.object_type = spec.object_type; var id = spec.name; - var dd_class = "other"; that.create = function(container) { - var dd = $('
', { - 'class': dd_class - }).appendTo(container); - that.table = $('', { id:id, 'class':'search-table aci-attribute-table' }). append(''). append(''). - appendTo(dd); + appendTo(container); var tr = $('').appendTo($('thead', that.table)); tr.append($(''); if (that.undo) { - that.create_undo(dd); + that.create_undo(container); } if (that.object_type){ @@ -175,32 +170,16 @@ IPA.rights_widget = function(spec) { that.rights = ['write', 'add', 'delete']; - that.create = function(container){ - - for (var i = 0; i'). - append($('', { - type: 'checkbox', - name: that.name, - value: that.rights[i], - 'class': that.entity_name +'_'+ that.name - })). - append($('
', { @@ -66,7 +61,7 @@ IPA.attributes_widget = function(spec) { append('Attribute