Re: [Freeipa-devel] [PATCH] SUDO Command Groups adjustments

2010-12-06 Thread Adam Young

On 12/06/2010 04:33 PM, Endi Sukma Dewata wrote:

Hi,

Please review the attached patch. Thanks!

The association facet for SUDO Command Groups has been removed and
replaced with an association table in the details page.


___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

ACK and pushed to master.

Note that the buttons on my machine are superimposed over the 
Description column.  We'll need to adjust that, along with the rest of 
the buttons cleanup.
___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

[Freeipa-devel] [PATCH] SUDO Command Groups adjustments

2010-12-06 Thread Endi Sukma Dewata

Hi,

Please review the attached patch. Thanks!

The association facet for SUDO Command Groups has been removed and
replaced with an association table in the details page.

--
Endi S. Dewata
From 4cf33e693e3c05f62fc73b7f2b5f1976d3574cc4 Mon Sep 17 00:00:00 2001
From: Endi S. Dewata 
Date: Mon, 6 Dec 2010 15:28:28 -0600
Subject: [PATCH] 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(-)

diff --git a/install/static/associate.js b/install/static/associate.js
index 48bb0225f24bed8438db3745d8fafb7a36922e2a..e159c4dd600a18ea7434a46247c53afcb666259f 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 c3daf9fb7f32e7f1912b4f7e48377e8922f41042..7941a5317aaa04cd8fea8490e789ab9d9d4bba60 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;
-- 
1.6.6.1

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel