properly sort top-level keys in data of treelist

This commit is contained in:
rlx 2011-08-05 23:39:15 +00:00
parent b428f3b3e2
commit 4642b56a95

View file

@ -34,8 +34,8 @@ Ox.TreeList = function(options, self) {
if (self.options.data) {
self.options.items = [];
//Ox.print('d', self.options.data, 'i', self.options.items)
Ox.forEach(self.options.data, function(value, key) {
self.options.items.push(parseData(key, value));
Ox.forEach(Ox.sort(Ox.keys(self.options.data)), function(key) {
self.options.items.push(parseData(key, self.options.data[key]));
});
//Ox.print('d', self.options.data, 'i', self.options.items)
}