summaryrefslogtreecommitdiffstats
path: root/install/ui/policy.js
diff options
context:
space:
mode:
authorAdam Young <ayoung@redhat.com>2011-01-19 21:10:18 -0500
committerAdam Young <ayoung@redhat.com>2011-01-27 16:46:44 -0500
commitf904df0f0dfd4734f978cdc3ddf5badabc067ed6 (patch)
treea9da10718ae2982b0f8721cdf7df4bad05532f93 /install/ui/policy.js
parent442d6ad30ce1156914e6245aa7502499e50ec0da (diff)
downloadfreeipa-f904df0f0dfd4734f978cdc3ddf5badabc067ed6.tar.gz
freeipa-f904df0f0dfd4734f978cdc3ddf5badabc067ed6.tar.xz
freeipa-f904df0f0dfd4734f978cdc3ddf5badabc067ed6.zip
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
Diffstat (limited to 'install/ui/policy.js')
-rw-r--r--install/ui/policy.js43
1 files changed, 22 insertions, 21 deletions
diff --git a/install/ui/policy.js b/install/ui/policy.js
index fedf40726..7f078a728 100644
--- a/install/ui/policy.js
+++ b/install/ui/policy.js
@@ -24,8 +24,7 @@
/* REQUIRES: ipa.js, details.js, search.js, add.js, entity.js */
/* DNS */
-
-IPA.add_entity(function (){
+IPA.entity_factories.dnszone = function() {
var that = IPA.entity({
name: 'dnszone'
});
@@ -74,15 +73,14 @@ IPA.add_entity(function (){
dialog.add_field(IPA.text_widget({ name: 'idnsname', undo: false}));
dialog.add_field(IPA.text_widget({ name: 'idnssoamname', undo: false}));
dialog.add_field(IPA.text_widget({ name: 'idnssoarname', undo: false}));
- dialog.init();
+
that.create_association_facets();
that.entity_init();
};
-
return that;
-}());
+};
IPA.records_facet = function (spec){
@@ -418,7 +416,6 @@ IPA.records_facet = function (spec){
options.data = data_filter;
}
-
var pkey = $.bbq.getState(that.entity_name + '-pkey', true);
IPA.cmd('dnsrecord_find',[pkey],options,load_on_win, load_on_fail);
@@ -499,7 +496,7 @@ IPA.records_facet = function (spec){
/**Automount*/
-IPA.add_entity(function (){
+IPA.entity_factories.automountlocation = function (){
var that = IPA.entity({
name: 'automountlocation'
});
@@ -530,20 +527,19 @@ IPA.add_entity(function (){
that.add_dialog(dialog);
dialog.add_field(IPA.text_widget({ name: 'cn', undo: false}));
- dialog.init();
that.create_association_facets();
that.entity_init();
};
return that;
-}());
+};
/**pwpolicy*/
-IPA.add_entity(function (){
+IPA.entity_factories.pwpolicy = function() {
var that = IPA.entity({
name: 'pwpolicy'
});
@@ -580,14 +576,13 @@ IPA.add_entity(function (){
that.add_dialog(dialog);
dialog.add_field(IPA.text_widget({ name: 'cn', undo: false}));
- dialog.init();
that.create_association_facets();
that.entity_init();
};
return that;
-}());
+};
@@ -595,13 +590,19 @@ IPA.add_entity(function (){
krbtpolicy
Does not have search
*/
+IPA.entity_factories.krbtpolicy = function() {
+ var that = IPA.entity({
+ name: 'krbtpolicy'
+ });
-IPA.entity_set_details_definition('krbtpolicy', [
- IPA.stanza({name:'identity', label:'Kerberos ticket policy'}).
- //input({name:'uid',label:' '}).
- input({name:'krbmaxrenewableage'}).
- input({name:'krbmaxticketlife'})
-]);
-
-IPA.entity_set_association_definition('krbtpolicy', {
-});
+ var details = IPA.details_facet({
+ 'name': 'details'
+ });
+ details.add_section(
+ IPA.stanza({name:'identity', label:'Kerberos ticket policy'}).
+ //input({name:'uid',label:' '}).
+ input({name:'krbmaxrenewableage'}).
+ input({name:'krbmaxticketlife'}));
+ that.add_facet(details);
+ return that;
+};