forked from 0x2620/oxjs
remove Ox.Break
This commit is contained in:
parent
4139e171ca
commit
bda90f6b6b
44 changed files with 152 additions and 165 deletions
|
|
@ -208,7 +208,7 @@ Ox.Menu = function(options, self) {
|
|||
Ox.forEach(that.items, function(item, i) {
|
||||
if (item.options('id') == id) {
|
||||
position = i;
|
||||
Ox.Break();
|
||||
return false; // break
|
||||
}
|
||||
});
|
||||
return position;
|
||||
|
|
@ -224,7 +224,7 @@ Ox.Menu = function(options, self) {
|
|||
Ox.forEach(that.items, function(item, i) {
|
||||
if (i < self.options.selected && !item.options('disabled')) {
|
||||
ret = false;
|
||||
Ox.Break();
|
||||
return false; // break
|
||||
}
|
||||
});
|
||||
return ret;
|
||||
|
|
@ -235,7 +235,7 @@ Ox.Menu = function(options, self) {
|
|||
Ox.forEach(that.items, function(item, i) {
|
||||
if (i > self.options.selected && !item.options('disabled')) {
|
||||
ret = false;
|
||||
Ox.Break();
|
||||
return false; // break
|
||||
}
|
||||
});
|
||||
return ret;
|
||||
|
|
@ -481,7 +481,7 @@ Ox.Menu = function(options, self) {
|
|||
Ox.forEach(that.submenus, function(submenu, id) {
|
||||
if (!submenu.is(':hidden')) {
|
||||
submenu.hideMenu();
|
||||
Ox.Break();
|
||||
return false; // break
|
||||
}
|
||||
});
|
||||
item.options('items').length && that.submenus[item.options('id')].showMenu();
|
||||
|
|
@ -663,13 +663,15 @@ Ox.Menu = function(options, self) {
|
|||
Ox.forEach(that.items, function(v) {
|
||||
if (v.options('id') == id) {
|
||||
item = v;
|
||||
Ox.Break();
|
||||
return false; // break
|
||||
}
|
||||
});
|
||||
if (!item) {
|
||||
Ox.forEach(that.submenus, function(submenu) {
|
||||
item = submenu.getItem(id);
|
||||
item && Ox.Break();
|
||||
if (item) {
|
||||
return false; // break
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
|
|
@ -703,7 +705,7 @@ Ox.Menu = function(options, self) {
|
|||
Ox.forEach(that.items, function(item) {
|
||||
if (!item.options('disabled')) {
|
||||
ret = true;
|
||||
Ox.Break();
|
||||
return false; // break
|
||||
}
|
||||
});
|
||||
return ret;
|
||||
|
|
@ -720,7 +722,7 @@ Ox.Menu = function(options, self) {
|
|||
Ox.forEach(that.submenus, function(submenu) {
|
||||
if (submenu.is(':visible')) {
|
||||
submenu.hideMenu();
|
||||
Ox.Break();
|
||||
return false; // break
|
||||
}
|
||||
});
|
||||
selectItem(-1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue