Ox.Break() -> return false

This commit is contained in:
rolux 2012-07-04 13:40:37 +02:00
parent 323aac6a5b
commit c52a8e0953
4 changed files with 8 additions and 8 deletions

View File

@ -572,7 +572,7 @@ pandora.ui.mainMenu = function() {
Ox.forEach(elements, function(element, i) {
if (element.hasFocus()) {
index = i;
Ox.Break();
return false;
}
});
elements[Ox.mod((index + direction), elements.length)].gainFocus();

View File

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

View File

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

View File

@ -637,7 +637,7 @@ pandora.getItemFind = function(find) {
&& ['=', '=='].indexOf(condition.operator) > -1
) {
itemFind = condition.value;
Ox.Break();
return false;
}
})
return itemFind;
@ -920,7 +920,7 @@ pandora.getVideoPartsAndPoints = function(durations, points) {
Ox.loop(parts - 1, -1, -1, function(i) {
if (offsets[i] <= point) {
ret.parts[i] = i;
Ox.Break();
return false;
}
});
});
@ -1338,7 +1338,7 @@ pandora.unloadWindow = function() {
Ox.forEach(pandora.user.ui.filters, function(key) {
if (everyCondition(find.conditions, key, '==')) {
state.key = '*';
Ox.Break();
return false;
}
});
}