allow for checking a menu item that is part of a group
This commit is contained in:
parent
b7e626ace5
commit
237d12ece7
1 changed files with 9 additions and 2 deletions
|
@ -140,8 +140,15 @@ Ox.MainMenu = function(options, self) {
|
|||
checkItem <f> checkItem
|
||||
@*/
|
||||
that.checkItem = function(id) {
|
||||
var item = that.getItem(id);
|
||||
item && item.options({checked: true});
|
||||
var ids = id.split('_'),
|
||||
item = that.getItem(id);
|
||||
if (item) {
|
||||
if (item.options('group')) {
|
||||
item.options('menu').checkItem(ids[ids.length - 1]);
|
||||
} else {
|
||||
item.options({checked: true});
|
||||
}
|
||||
}
|
||||
return that;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue