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