forked from 0x2620/oxjs
use Ox.break
This commit is contained in:
parent
3d4a79b6a2
commit
04784630d3
42 changed files with 117 additions and 118 deletions
|
|
@ -607,10 +607,9 @@ Ox.List = function(options, self) {
|
|||
// fixme: is this really needed?
|
||||
var pos = -1;
|
||||
Ox.forEach(self.$items, function($item, i) {
|
||||
//Ox.Log('List', '$item', i, self.options.unique, $item.options('data')[self.options.unique])
|
||||
if ($item.options('data')[self.options.unique] == id) {
|
||||
pos = i;
|
||||
return false;
|
||||
Ox.break();
|
||||
}
|
||||
});
|
||||
return pos;
|
||||
|
|
@ -698,7 +697,7 @@ Ox.List = function(options, self) {
|
|||
ids.push(self.$items[pos].options('data')[self.options.unique]);
|
||||
} else {
|
||||
notFound = true;
|
||||
return false;
|
||||
Ox.break();
|
||||
}
|
||||
});
|
||||
if (notFound) {
|
||||
|
|
@ -1156,7 +1155,7 @@ Ox.List = function(options, self) {
|
|||
if (Ox.toLatin(v.title).toUpperCase().indexOf(str) == 0) {
|
||||
select(i);
|
||||
scrollToPosition(i);
|
||||
return false;
|
||||
Ox.break();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -1343,7 +1342,7 @@ Ox.List = function(options, self) {
|
|||
if (oldIds.indexOf(item.id) > -1) {
|
||||
newIds.push(item.id);
|
||||
}
|
||||
return newIds.length < oldIds.length;
|
||||
newIds.length == oldIds.length && Ox.break();
|
||||
});
|
||||
setSelected(newIds);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue