From 7f98cd19f22e41a0b6fc90a390f503bf4fd410ae Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Sun, 18 Sep 2011 02:06:33 +0000 Subject: [PATCH] fix a bug in Ox.ButtonGroup --- source/Ox.UI/js/Form/Ox.ButtonGroup.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/Ox.UI/js/Form/Ox.ButtonGroup.js b/source/Ox.UI/js/Form/Ox.ButtonGroup.js index b17ebc3f..0615277a 100644 --- a/source/Ox.UI/js/Form/Ox.ButtonGroup.js +++ b/source/Ox.UI/js/Form/Ox.ButtonGroup.js @@ -63,12 +63,12 @@ Ox.ButtonGroup = function(options, self) { function selectButton(pos) { var toggled = self.optionGroup.toggle(pos); if (toggled.length) { - toggled.forEach(function(pos, i) { + toggled.forEach(function(pos) { self.$buttons[pos].toggleSelected(); }); that.triggerEvent('change', { selected: self.optionGroup.selected().map(function(i) { - return self.options.buttons[v].id; + return self.options.buttons[i].id; }) }); }