Ox.Menu: allow leaf items to have ids with underscores

This commit is contained in:
rolux 2015-02-15 17:26:04 +00:00
parent 862fe8c6bd
commit cfea71af38

View file

@ -648,7 +648,7 @@ Ox.Menu = function(options, self) {
that.checkItem = function(id, checked) {
Ox.Log('Menu', 'checkItem id', id)
var group,
ids = id.split('_'),
ids = Ox.isEmpty(that.submenus) ? [id] : id.split('_'),
item,
offset,
position,
@ -690,7 +690,7 @@ Ox.Menu = function(options, self) {
@*/
that.getItem = function(id) {
//Ox.Log('Menu', 'getItem id', id)
var ids = id.split('_'),
var ids = Ox.isEmpty(that.submenus) ? [id] : id.split('_'),
item;
if (ids.length == 1) {
Ox.forEach(that.items, function(v) {