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
This commit is contained in:
Endi S. Dewata
2011-11-02 14:07:07 -05:00
committed by Petr Vobornik
parent 5db9fed8a5
commit 8ca348b99e
17 changed files with 355 additions and 198 deletions

View File

@@ -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);