diff options
author | Petr Vobornik <pvoborni@redhat.com> | 2013-04-17 16:18:26 +0200 |
---|---|---|
committer | Petr Vobornik <pvoborni@redhat.com> | 2013-05-06 16:22:27 +0200 |
commit | c206249bd2321535883d36493d76b7de4ed59299 (patch) | |
tree | ffb4933e34151e80d928ba44204869ffc615545e /install/ui/src/freeipa/details.js | |
parent | bee39848d302a968fccecba7619ad1f9b71554bd (diff) | |
download | freeipa-c206249bd2321535883d36493d76b7de4ed59299.tar.gz freeipa-c206249bd2321535883d36493d76b7de4ed59299.tar.xz freeipa-c206249bd2321535883d36493d76b7de4ed59299.zip |
Make summary conditions declarative
https://fedorahosted.org/freeipa/ticket/3235
Diffstat (limited to 'install/ui/src/freeipa/details.js')
-rw-r--r-- | install/ui/src/freeipa/details.js | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/install/ui/src/freeipa/details.js b/install/ui/src/freeipa/details.js index 4388eb856..425e885b0 100644 --- a/install/ui/src/freeipa/details.js +++ b/install/ui/src/freeipa/details.js @@ -24,6 +24,7 @@ /* IPA Object Details - populating definiton lists from entry data */ define([ + 'dojo/_base/lang', './builder', './ipa', './jquery', @@ -32,7 +33,7 @@ define([ './text', './facet', './add'], - function(builder, IPA, $, phases, reg, text) { + function(lang, builder, IPA, $, phases, reg, text) { var exp = {}; @@ -1194,21 +1195,26 @@ exp.delete_action = IPA.delete_action = function(spec) { exp.enabled_summary_cond = IPA.enabled_summary_cond = function() { - return { + + var that = IPA.object(); + lang.mixin(that, { pos: ['enabled'], neg: [], description: text.get('@i18n:status.enabled'), state: ['enabled'] - }; + }); + return that; }; exp.disabled_summary_cond = IPA.disabled_summary_cond = function() { - return { + var that = IPA.object(); + lang.mixin(that, { pos: [], neg: ['enabled'], description: text.get('@i18n:status.disabled'), state: ['disabled'] - }; + }); + return that; }; exp.register = function() { |