From 4270e26adb56b6d1b7a9e80433581b82519d9eec Mon Sep 17 00:00:00 2001 From: Adam Young Date: Fri, 18 Mar 2011 16:43:54 -0400 Subject: define entities using builder and more declarative syntax merged hbac and sudo in to single files associaton facet and table supports linking --- install/ui/netgroup.js | 62 ++++++++++++-------------------------------------- 1 file changed, 14 insertions(+), 48 deletions(-) (limited to 'install/ui/netgroup.js') diff --git a/install/ui/netgroup.js b/install/ui/netgroup.js index 251ffa4d2..9389d0197 100644 --- a/install/ui/netgroup.js +++ b/install/ui/netgroup.js @@ -23,52 +23,18 @@ /* REQUIRES: ipa.js, details.js, search.js, add.js, entity.js */ IPA.entity_factories.netgroup = function() { - - var that = IPA.entity({ - 'name': 'netgroup' - }); - - that.init = function() { - - that.facet( - IPA.search_facet({ - name: 'search', - label: IPA.messages.facets.search, - entity_name: that.name - }). - column({name:'cn'}). - column({name:'description'}). - dialog( - IPA.add_dialog({ - name: 'add', - title: IPA.messages.objects.netgroup.add - }). - field(IPA.text_widget({ name: 'cn', undo: false})). - field(IPA.text_widget({ name: 'description', undo: false})))); - - that.facet( - IPA.details_facet({name: 'details'}). - section( - IPA.stanza({ - name: 'identity', - label: IPA.messages.objects.netgroup.identity - }). - input({name: 'cn'}). - input({name: 'description'}). - input({name: 'nisdomainname'}))); - - that.facet( - IPA.association_facet({ - name: 'memberof_netgroup', - associator: IPA.serial_associator - })); - - that.create_association_facets(); - that.entity_init(); - }; - - return that; + return IPA.entity_builder(). + entity('netgroup'). + search_facet({ + columns:['cn','description'], + add_fields:['cn', 'description']}). + details_facet([{ + section:'identity', + fields:['cn','description','nisdomainname']}]). + association_facet({ + name: 'memberof_netgroup', + associator: IPA.serial_associator + }). + standard_associations(). + build(); }; - - - -- cgit