1
0
Fork 0
forked from 0x2620/oxjs

fix a bug where menus would modify item objects passed by reference

This commit is contained in:
rlx 2011-09-19 06:33:52 +00:00
commit 636f772820
3 changed files with 6 additions and 11 deletions

View file

@ -2,6 +2,7 @@
/*@
Ox.OptionGroup <f> OptionGroup
Helper object, used by ButtonGroup, CheckboxGroup, Select and Menu
(items, min, max, property) -> <f> OptionGroup
items <a> array of items
min <n> minimum number of selected items
@ -11,9 +12,6 @@ Ox.OptionGroup <f> OptionGroup
Ox.OptionGroup = function(items, min, max, property) {
/*
to be used by ButtonGroup, CheckboxGroup, Select and Menu
*/
var length = items.length;
property = property || 'checked';
max = max == -1 ? length : max;