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
|
|
@ -395,7 +395,7 @@ Ox.Filter = function(options, self) {
|
|||
Ox.forEach(self.options.query.conditions, function(condition) {
|
||||
if (condition.conditions) {
|
||||
hasGroups = true;
|
||||
Ox.Break();
|
||||
return false; // break
|
||||
}
|
||||
});
|
||||
hasGroups && renderConditions();
|
||||
|
|
@ -424,12 +424,11 @@ Ox.Filter = function(options, self) {
|
|||
&& (
|
||||
self.options.query.operator == '&' ? ['', '^', '$'] : ['!', '!^', '!$']
|
||||
).indexOf(condition.operator) > -1
|
||||
&& condition.value === ''
|
||||
// FIXME: this used to be `return isUseless` - but was it intended
|
||||
// to be the other way around, i.e. `isUseless && Ox.Break()`?
|
||||
!isUseless && Ox.Break();
|
||||
&& condition.value === '';
|
||||
if (!isUseless) {
|
||||
return false; // break if one of the conditions is not useless
|
||||
}
|
||||
});
|
||||
Ox.Log('Form', 'isUseless', isUseless);
|
||||
return isUseless;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ Ox.Form = function(options, self) {
|
|||
return Ox.every(valid);
|
||||
}
|
||||
})
|
||||
.options(options || {}) // fixme: the || {} can be done once, in the options function
|
||||
.options(options || {})
|
||||
.addClass('OxForm');
|
||||
|
||||
Ox.extend(self, {
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ Ox.InputGroup = function(options, self) {
|
|||
Ox.forEach(self.options.inputs, function($input) {
|
||||
if ($input.focusInput) {
|
||||
$input.focusInput(true);
|
||||
Ox.Break();
|
||||
return false; // break
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -150,7 +150,7 @@ Ox.InputGroup = function(options, self) {
|
|||
Ox.forEach(self.options.inputs, function(v, i) {
|
||||
if (v.options('id') == self.options.id + Ox.toTitleCase(id)) {
|
||||
input = v;
|
||||
Ox.Break();
|
||||
return false; // break
|
||||
}
|
||||
});
|
||||
return input;
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ Ox.OptionGroup = function(items, min, max, property) {
|
|||
), function(v) {
|
||||
if (items[v][property]) {
|
||||
last = v;
|
||||
Ox.Break();
|
||||
return false; // break
|
||||
}
|
||||
});
|
||||
return last;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue