diff options
author | Petr Vobornik <pvoborni@redhat.com> | 2013-09-17 10:48:24 +0200 |
---|---|---|
committer | Petr Viktorin <pviktori@redhat.com> | 2014-03-12 17:29:27 +0100 |
commit | 9e6cc48be6185a0fdd85cef45a33438355e11e1a (patch) | |
tree | 5646c6e6874f7d063861ecb30bb9896903343edf /install/ui/src/freeipa/details.js | |
parent | d6a7923f71eb69bac53d6ff904086a9abd103dbc (diff) | |
download | freeipa-9e6cc48be6185a0fdd85cef45a33438355e11e1a.tar.gz freeipa-9e6cc48be6185a0fdd85cef45a33438355e11e1a.tar.xz freeipa-9e6cc48be6185a0fdd85cef45a33438355e11e1a.zip |
Added empty value meaning to boolean formatter
Boolean object properties can have different default meaning for not defined
value. This patch allows to defined this meaning to `boolean_formatter` by
introduction of `emty_value` property. `boolean_state_evaluator` was modified
to leverage it as well.
Reviewed-By: Adam Misnyovszki <amisnyov@redhat.com>
Diffstat (limited to 'install/ui/src/freeipa/details.js')
-rw-r--r-- | install/ui/src/freeipa/details.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/install/ui/src/freeipa/details.js b/install/ui/src/freeipa/details.js index 00134a23d..907eae47c 100644 --- a/install/ui/src/freeipa/details.js +++ b/install/ui/src/freeipa/details.js @@ -1490,17 +1490,21 @@ exp.boolean_state_evaluator = IPA.boolean_state_evaluator = function(spec) { that.false_state = spec.false_state || that.field_name + '-false'; /** - * Inverted logic + * Inverts evaluation logic + * + * NOTE: is ignored when custom parser is set + * * @property {boolean} */ that.invert_value = spec.invert_value; /** * Value parser + * * @property {IPA.boolean_formatter} */ - that.parser = IPA.build({ - $factory: spec.parser || IPA.boolean_formatter, + that.parser = IPA.build(spec.parser || { + $factory: IPA.boolean_formatter, invert_value: that.invert_value }); |