From f904df0f0dfd4734f978cdc3ddf5badabc067ed6 Mon Sep 17 00:00:00 2001 From: Adam Young Date: Wed, 19 Jan 2011 21:10:18 -0500 Subject: declarative defintions Delay the creation of entities until after ipa init is called made the user and group entity definitions declarative removed unused facet from groups adjusted unit tests made review changes: factories are now in an associative array entity init called right after factory init dialogs in entity init fixed type on search --- install/ui/aci.js | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) (limited to 'install/ui/aci.js') diff --git a/install/ui/aci.js b/install/ui/aci.js index b1ac1d529..f7d7266f5 100644 --- a/install/ui/aci.js +++ b/install/ui/aci.js @@ -561,7 +561,7 @@ IPA.target_section = function () { }; -IPA.permission = function () { +IPA.entity_factories.permission = function () { var that = IPA.entity({ 'name': 'permission' @@ -593,9 +593,6 @@ IPA.permission = function () { }; -IPA.add_entity(IPA.permission()); - - IPA.permission_add_dialog = function (spec) { @@ -675,7 +672,7 @@ IPA.permission_details_facet = function () { }; -IPA.add_entity( function() { +IPA.entity_factories.privilege = function() { var that = IPA.entity({ 'name': 'privilege' }); @@ -715,10 +712,10 @@ IPA.add_entity( function() { that.entity_init(); }; return that; -}()); +}; -IPA.add_entity( function() { +IPA.entity_factories.role = function() { var that = IPA.entity({ 'name': 'role' }); @@ -756,10 +753,10 @@ IPA.add_entity( function() { that.entity_init(); }; return that; -}()); +}; -IPA.add_entity( function() { +IPA.entity_factories.selfservice = function() { var that = IPA.entity({ 'name': 'selfservice' }); @@ -783,7 +780,8 @@ IPA.add_entity( function() { that.init = function() { that.add_section( - IPA.stanza({name:'general', label:'General'}). + IPA.stanza({name:'general', label:'General', + entity_name:'selfservice'}). input({name:'aciname'}). custom_input(IPA.attribute_table_widget({ object_type:'user', @@ -793,7 +791,6 @@ IPA.add_entity( function() { return that; }()); - that.parent_init = that.init; that.init = function(){ that.parent_init(); @@ -810,10 +807,10 @@ IPA.add_entity( function() { dialog.init(); }; return that; -}()); +}; -IPA.add_entity( function() { +IPA.entity_factories.delegation = function() { var that = IPA.entity({ 'name': 'delegation' }); @@ -870,4 +867,5 @@ IPA.add_entity( function() { }; return that; -}()); + +}; -- cgit