From 397dc8b9032c9ce58d7b99bea625857c218718c9 Mon Sep 17 00:00:00 2001 From: rolux Date: Thu, 31 Oct 2013 14:15:50 +0100 Subject: [PATCH] cosmetic changes --- source/Ox.UI/js/Form/CheckboxGroup.js | 7 ++++--- source/Ox.UI/js/Form/OptionGroup.js | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/source/Ox.UI/js/Form/CheckboxGroup.js b/source/Ox.UI/js/Form/CheckboxGroup.js index 6cbc34f0..c02ef494 100644 --- a/source/Ox.UI/js/Form/CheckboxGroup.js +++ b/source/Ox.UI/js/Form/CheckboxGroup.js @@ -19,7 +19,7 @@ Ox.CheckboxGroup = function(options, self) { self = self || {}; var that = Ox.Element({}, self) .defaults({ - // fixme: should 'checkboxes' be 'items'? + // fixme: 'checkboxes' should be 'items'? checkboxes: [], max: 1, min: 1, @@ -30,9 +30,10 @@ Ox.CheckboxGroup = function(options, self) { .options(options || {}) .update({ value: function() { + var value = Ox.clone(self.options.value); self.options.checkboxes.forEach(function(checkbox, index) { - var value = Ox.contains(self.options.value, checkbox.id); - if (checkbox.checked != value) { + var checked = Ox.contains(value, checkbox.id); + if (checked != checkbox.checked) { toggleCheckbox(index); } }); diff --git a/source/Ox.UI/js/Form/OptionGroup.js b/source/Ox.UI/js/Form/OptionGroup.js index 0c71d678..184f349e 100644 --- a/source/Ox.UI/js/Form/OptionGroup.js +++ b/source/Ox.UI/js/Form/OptionGroup.js @@ -105,7 +105,7 @@ Ox.OptionGroup = function(items, min, max, property) { } } return toggled; - } + }; /*@ value get value