use Ox.break()

This commit is contained in:
rolux 2012-05-22 09:22:38 +02:00
parent bac207bddd
commit 958c868c9f
4 changed files with 9 additions and 9 deletions

View file

@ -545,7 +545,7 @@ pandora.ui.mainMenu = function() {
Ox.forEach(elements, function(element, i) { Ox.forEach(elements, function(element, i) {
if (element.hasFocus()) { if (element.hasFocus()) {
index = i; index = i;
return false; Ox.break();
} }
}); });
elements[Ox.mod((index + direction), elements.length)].gainFocus(); elements[Ox.mod((index + direction), elements.length)].gainFocus();
@ -675,7 +675,6 @@ pandora.ui.mainMenu = function() {
}, function(result) { }, function(result) {
lists[folder] = result.data.items; lists[folder] = result.data.items;
if (++counter == 3) { if (++counter == 3) {
Ox.Log('', '--------------------------------------------', lists)
pandora.$ui.mainMenu.replaceMenu('listMenu', getListMenu(lists)); pandora.$ui.mainMenu.replaceMenu('listMenu', getListMenu(lists));
} }
}); });

View file

@ -570,7 +570,7 @@ pandora.ui.statisticsDialog = function() {
Ox.forEach(names, function(v) { Ox.forEach(names, function(v) {
if (new RegExp('^' + v).test(version)) { if (new RegExp('^' + v).test(version)) {
name = v; name = v;
return false; Ox.break();
} }
}); });
return name; return name;

View file

@ -217,7 +217,7 @@ pandora.ui.usersDialog = function() {
Ox.forEach(systems, function(s) { Ox.forEach(systems, function(s) {
if (new RegExp('^' + s).test(value)) { if (new RegExp('^' + s).test(value)) {
system = s; system = s;
return false; Ox.break();
} }
}); });
return system ? Ox.Element({ return system ? Ox.Element({
@ -252,7 +252,7 @@ pandora.ui.usersDialog = function() {
Ox.forEach(browsers, function(b) { Ox.forEach(browsers, function(b) {
if (new RegExp('^' + b).test(value)) { if (new RegExp('^' + b).test(value)) {
browser = b; browser = b;
return false; Ox.break();
} }
}); });
return browser ? Ox.Element({ return browser ? Ox.Element({
@ -595,7 +595,7 @@ pandora.ui.usersDialog = function() {
).options('items'), function($item) { ).options('items'), function($item) {
if ($item.options('id') == id) { if ($item.options('id') == id) {
ret = $item; ret = $item;
return false; Ox.break();
} }
}); });
return ret; return ret;

View file

@ -627,7 +627,7 @@ pandora.getItemFind = function(find) {
&& ['=', '=='].indexOf(condition.operator) > -1 && ['=', '=='].indexOf(condition.operator) > -1
) { ) {
itemFind = condition.value; itemFind = condition.value;
return false; Ox.break();
} }
}) })
return itemFind; return itemFind;
@ -651,7 +651,8 @@ pandora.getListData = function(list) {
} else if (!Ox.isEmpty($list.value(list))) { } else if (!Ox.isEmpty($list.value(list))) {
folder = id folder = id
ret = false; ret = false;
} }
// FIXME: Is there a `return ret` statement missing here?
}); });
if (folder) { if (folder) {
data = pandora.$ui.folderList[folder].value(pandora.user.ui._list); data = pandora.$ui.folderList[folder].value(pandora.user.ui._list);
@ -1266,7 +1267,7 @@ pandora.unloadWindow = function() {
Ox.forEach(pandora.user.ui.filters, function(key) { Ox.forEach(pandora.user.ui.filters, function(key) {
if (everyCondition(find.conditions, key, '==')) { if (everyCondition(find.conditions, key, '==')) {
state.key = '*'; state.key = '*';
return false; Ox.break();
} }
}); });
} }