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/host.js | |
parent | 5db9fed8a5c62a65adf43f1d8c24a0e061f6b301 (diff) | |
download | freeipa-8ca348b99e350862418ac2fe0addfb0e354ea57e.tar.gz freeipa-8ca348b99e350862418ac2fe0addfb0e354ea57e.tar.xz freeipa-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/host.js')
-rw-r--r-- | install/ui/host.js | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/install/ui/host.js b/install/ui/host.js index fe0829414..857f85434 100644 --- a/install/ui/host.js +++ b/install/ui/host.js @@ -24,11 +24,15 @@ /* REQUIRES: ipa.js, details.js, search.js, add.js, facet.js, entity.js */ -IPA.entity_factories.host = function () { +IPA.host = {}; - return IPA.entity_builder(). - entity('host'). - search_facet({ +IPA.host.entity = function(spec) { + + var that = IPA.entity(spec); + + that.init = function(params) { + + params.builder.search_facet({ columns: [ 'fqdn', 'description', @@ -166,8 +170,10 @@ IPA.entity_factories.host = function () { }). deleter_dialog({ factory: IPA.host_deleter_dialog - }). - build(); + }); + }; + + return that; }; IPA.host_fqdn_section = function(spec) { @@ -779,3 +785,5 @@ IPA.host_certificate_status_widget = function (spec) { return that; }; + +IPA.register('host', IPA.host.entity); |