From ca436d9ec3210e0c573ea96ae7d6fe71dc9bf943 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Mon, 6 Dec 2010 15:28:28 -0600 Subject: SUDO Command Groups adjustments The association facet for SUDO Command Groups has been removed and replaced with an association table in the details page. --- install/static/associate.js | 4 ++-- install/static/sudocmdgroup.js | 26 ++++++++++++++++---------- 2 files changed, 18 insertions(+), 12 deletions(-) (limited to 'install') diff --git a/install/static/associate.js b/install/static/associate.js index 48bb0225f..e159c4dd6 100644 --- a/install/static/associate.js +++ b/install/static/associate.js @@ -299,13 +299,13 @@ function ipa_association_table_widget(spec) { $('', { 'type': 'button', 'name': 'remove', - 'value': 'Remove '+that.label + 'value': 'Remove' }).appendTo(buttons); $('', { 'type': 'button', 'name': 'add', - 'value': 'Add '+that.label + 'value': 'Add' }).appendTo(buttons); }; diff --git a/install/static/sudocmdgroup.js b/install/static/sudocmdgroup.js index c3daf9fb7..7941a5317 100755 --- a/install/static/sudocmdgroup.js +++ b/install/static/sudocmdgroup.js @@ -53,13 +53,6 @@ function ipa_sudocmdgroup() { }); that.add_facet(facet); - facet = ipa_sudocmdgroup_member_sudocmd_facet({ - 'name': 'member_sudocmd', - 'label': IPA.metadata['sudocmd'].label+' '+IPA.messages.association.members, - 'other_entity': 'sudocmd' - }); - that.add_facet(facet); - that.entity_init(); }; @@ -155,17 +148,30 @@ function ipa_sudocmdgroup_details_facet(spec) { section.create_field({'name': 'cn'}); section.create_field({'name': 'description'}); + section = ipa_details_section({ + 'name': 'commands', + 'label': 'Commands' + }); + that.add_section(section); + + var field = ipa_sudocmdgroup_member_sudocmd_table_widget({ + 'name': 'member_sudocmd', + 'label': 'Commands', + 'other_entity': 'sudocmd' + }); + section.add_field(field); + that.details_facet_init(); }; return that; } -function ipa_sudocmdgroup_member_sudocmd_facet(spec) { +function ipa_sudocmdgroup_member_sudocmd_table_widget(spec) { spec = spec || {}; - var that = ipa_association_facet(spec); + var that = ipa_association_table_widget(spec); that.init = function() { @@ -212,7 +218,7 @@ function ipa_sudocmdgroup_member_sudocmd_facet(spec) { width: '100px' }); - that.association_facet_init(); + that.association_table_widget_init(); }; return that; -- cgit