1
0
Fork 0
forked from 0x2620/oxjs

allow for separators in option groups

This commit is contained in:
rlx 2011-11-10 09:54:33 +00:00
commit 08919e7b37
2 changed files with 4 additions and 7 deletions

View file

@ -183,13 +183,15 @@ Ox.Menu = function(options, self) {
self.optionGroups = {};
items.forEach(function(item, i) {
if (item.group) {
items[i] = item.items.map(function(v, i) {
items[i] = item.items.map(function(v) {
return Ox.extend(v, {
group: item.group
});
});
self.optionGroups[item.group] = new Ox.OptionGroup(
items[i],
items[i].filter(function(v) {
return 'id' in v;
}),
'min' in item ? item.min : 1,
'max' in item ? item.max : 1
);