diff options
author | Endi S. Dewata <edewata@redhat.com> | 2011-11-02 14:07:07 -0500 |
---|---|---|
committer | Petr Vobornik <pvoborni@redhat.com> | 2011-11-04 16:51:54 +0100 |
commit | 8ca348b99e350862418ac2fe0addfb0e354ea57e (patch) | |
tree | 0b91d8548037f5e10b6c491d7c1b969ce7a1ba57 /install/ui/serverconfig.js | |
parent | 5db9fed8a5c62a65adf43f1d8c24a0e061f6b301 (diff) | |
download | freeipa.git-8ca348b99e350862418ac2fe0addfb0e354ea57e.tar.gz freeipa.git-8ca348b99e350862418ac2fe0addfb0e354ea57e.tar.xz freeipa.git-8ca348b99e350862418ac2fe0addfb0e354ea57e.zip |
Added extensible UI framework.
The entity definitions have been converted into classes. The entity
init() method will use the builder to construct the facets and dialogs.
The UI can be customized by creating a subclass of the original entity
in extension.js and then overriding the init() method.
Ticket #2043
Diffstat (limited to 'install/ui/serverconfig.js')
-rw-r--r-- | install/ui/serverconfig.js | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/install/ui/serverconfig.js b/install/ui/serverconfig.js index be2a3df9..9ecf190c 100644 --- a/install/ui/serverconfig.js +++ b/install/ui/serverconfig.js @@ -23,14 +23,15 @@ /* REQUIRES: ipa.js, details.js, search.js, add.js, facet.js, entity.js */ +IPA.config = {}; +IPA.config.entity = function(spec) { -/* Configuration */ + var that = IPA.entity(spec); -IPA.entity_factories.config = function(){ - return IPA.entity_builder(). - entity('config'). - details_facet({ + that.init = function(params) { + + params.builder.details_facet({ title: IPA.metadata.objects.config.label, sections: [ { @@ -80,6 +81,10 @@ IPA.entity_factories.config = function(){ } ], needs_update: true - }). - build(); -};
\ No newline at end of file + }); + }; + + return that; +}; + +IPA.register('config', IPA.config.entity); |