1
0
Fork 0
forked from 0x2620/oxjs

fix bugs with deeply nested menus

This commit is contained in:
rlx 2011-09-17 23:25:22 +00:00
commit ff0b83fa89
2 changed files with 26 additions and 21 deletions

View file

@ -138,10 +138,8 @@ Ox.MainMenu = function(options, self) {
checkItem <f> checkItem
@*/
that.checkItem = function(id) {
var ids = id.split('_'),
itemId = ids.pop(),
menuId = ids.join('_');
that.getMenu(menuId).checkItem(itemId);
var ids = id.split('_');
that.getMenu(ids.shift()).checkItem(ids.join('_'));
return that;
};