summaryrefslogtreecommitdiffstats
path: root/install/ui/user.js
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2011-11-02 14:07:07 -0500
committerPetr Vobornik <pvoborni@redhat.com>2011-11-04 16:51:54 +0100
commit8ca348b99e350862418ac2fe0addfb0e354ea57e (patch)
tree0b91d8548037f5e10b6c491d7c1b969ce7a1ba57 /install/ui/user.js
parent5db9fed8a5c62a65adf43f1d8c24a0e061f6b301 (diff)
downloadfreeipa-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/user.js')
-rw-r--r--install/ui/user.js19
1 files changed, 12 insertions, 7 deletions
diff --git a/install/ui/user.js b/install/ui/user.js
index 8e2205686..8207bf091 100644
--- a/install/ui/user.js
+++ b/install/ui/user.js
@@ -23,19 +23,20 @@
/* REQUIRES: ipa.js, details.js, search.js, add.js, facet.js, entity.js */
+IPA.user = {};
-IPA.entity_factories.user = function() {
+IPA.user.entity = function(spec) {
+
+ var that = IPA.entity(spec);
var link = true;
if (IPA.nav && IPA.nav.name == 'self-service') {
link = false;
}
- var builder = IPA.entity_builder();
+ that.init = function(params) {
- builder.
- entity('user').
- search_facet({
+ params.builder.search_facet({
columns: [
'uid',
'givenname',
@@ -105,7 +106,8 @@ IPA.entity_factories.user = function() {
{
name: 'misc',
fields: ['carlicense']
- }]}).
+ }]
+ }).
association_facet({
name: 'memberof_group',
associator: IPA.serial_associator,
@@ -167,8 +169,9 @@ IPA.entity_factories.user = function() {
}
]
});
+ };
- return builder.build();
+ return that;
};
IPA.user_adder_dialog = function(spec) {
@@ -461,3 +464,5 @@ IPA.user_password_widget = function(spec) {
return that;
};
+
+IPA.register('user', IPA.user.entity);