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
|
|
@ -33,7 +33,7 @@ Ox.TreeList = function(options, self) {
|
|||
|
||||
if (self.options.data) {
|
||||
self.options.items = [];
|
||||
Ox.forEach(Ox.sort(Ox.keys(self.options.data)), function(key) {
|
||||
Ox.sort(Object.keys(self.options.data)).forEach(function(key) {
|
||||
self.options.items.push(parseData(key, self.options.data[key]));
|
||||
});
|
||||
}
|
||||
|
|
@ -123,12 +123,12 @@ Ox.TreeList = function(options, self) {
|
|||
ret = Ox.extend(item, {
|
||||
level: level
|
||||
});
|
||||
return false;
|
||||
Ox.break();
|
||||
}
|
||||
if (item.items) {
|
||||
ret = getItemById(id, item.items, level + 1);
|
||||
if (ret) {
|
||||
return false;
|
||||
Ox.break();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
@ -145,7 +145,7 @@ Ox.TreeList = function(options, self) {
|
|||
ret = getParent(id, item.items);
|
||||
}
|
||||
if (ret) {
|
||||
return false;
|
||||
Ox.break();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue