From 4642b56a95fc08091340089dffb5a94519b849ac Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Fri, 5 Aug 2011 23:39:15 +0000 Subject: [PATCH] properly sort top-level keys in data of treelist --- source/Ox.UI/js/List/Ox.TreeList.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/Ox.UI/js/List/Ox.TreeList.js b/source/Ox.UI/js/List/Ox.TreeList.js index cbe880f9..3888517e 100644 --- a/source/Ox.UI/js/List/Ox.TreeList.js +++ b/source/Ox.UI/js/List/Ox.TreeList.js @@ -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) }