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

View file

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

View file

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

View file

@ -627,7 +627,7 @@ pandora.getItemFind = function(find) {
&& ['=', '=='].indexOf(condition.operator) > -1
) {
itemFind = condition.value;
return false;
Ox.break();
}
})
return itemFind;
@ -652,6 +652,7 @@ pandora.getListData = function(list) {
folder = id
ret = false;
}
// FIXME: Is there a `return ret` statement missing here?
});
if (folder) {
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) {
if (everyCondition(find.conditions, key, '==')) {
state.key = '*';
return false;
Ox.break();
}
});
}