diff options
author | Endi S. Dewata <edewata@redhat.com> | 2011-02-08 15:41:24 -0600 |
---|---|---|
committer | Adam Young <ayoung@redhat.com> | 2011-02-09 19:46:49 -0500 |
commit | 8d597dcbb03ca70a342f470e0229c9934f75cb16 (patch) | |
tree | 7311deb7976b677efba19d864e893d8406aebd0f /install/ui/netgroup.js | |
parent | 25abf07360ea6824f3584edd847e080e6fdca981 (diff) | |
download | freeipa-8d597dcbb03ca70a342f470e0229c9934f75cb16.tar.gz freeipa-8d597dcbb03ca70a342f470e0229c9934f75cb16.tar.xz freeipa-8d597dcbb03ca70a342f470e0229c9934f75cb16.zip |
Moved add dialog into search facet.
Previously the add dialog is added into entity. The dialog is only
used by the search facet, so it's now moved into the search facet.
Diffstat (limited to 'install/ui/netgroup.js')
-rw-r--r-- | install/ui/netgroup.js | 51 |
1 files changed, 25 insertions, 26 deletions
diff --git a/install/ui/netgroup.js b/install/ui/netgroup.js index 05200843..d7908ef3 100644 --- a/install/ui/netgroup.js +++ b/install/ui/netgroup.js @@ -23,42 +23,41 @@ /* 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() { - var search_facet = IPA.search_facet({ - name: 'search', - label: 'Search', - entity_name: that.name - }); - search_facet.create_column({name:'cn'}); - search_facet.create_column({name:'description'}); - that.add_facet(search_facet); - - that.add_facet(function() { - var that = IPA.details_facet({name:'details'}); - that.add_section( - IPA.stanza({name:'identity', label:'Netgroup Settings'}). - input({name:'cn'}). - input({name: 'description'}). - input({name:'nisdomainname'})); - return that; - }()); + that.init = function() { - var dialog = IPA.add_dialog({ - name: 'add', - title: 'Add Netgroup' - }); - that.add_dialog(dialog); + that.facet( + IPA.search_facet({ + name: 'search', + label: 'Search', + entity_name: that.name + }). + column({name:'cn'}). + column({name:'description'}). + dialog( + IPA.add_dialog({ + name: 'add', + title: 'Add Netgroup' + }). + field(IPA.text_widget({ name: 'cn', undo: false})). + field(IPA.text_widget({ name: 'description', undo: false})))); - dialog.add_field(IPA.text_widget({ name: 'cn', undo: false})); - dialog.add_field(IPA.text_widget({ name: 'description', undo: false})); + that.facet( + IPA.details_facet({name: 'details'}). + section( + IPA.stanza({name: 'identity', label: 'Netgroup Settings'}). + input({name: 'cn'}). + input({name: 'description'}). + input({name: 'nisdomainname'}))); that.create_association_facets(); that.entity_init(); }; + return that; }; |