only sort object keys in treelist

This commit is contained in:
j 2012-05-30 02:29:38 +02:00
parent 6847102507
commit 888bf094ad

View file

@ -173,10 +173,9 @@ Ox.TreeList = function(options, self) {
if (type == 'array' || type == 'object') {
ret.title += Ox.toTitleCase(type)
+ ' <span class="OxLight">[' + Ox.len(value) + ']</span>';
ret.items = Ox.sort(
type == 'array' ? value.map(function(v, i) {
ret.items = type == 'array' ? value.map(function(v, i) {
return parseData(i, v);
}) : Object.keys(value).map(function(k) {
}) : Ox.sort(Object.keys(value)).map(function(k) {
return parseData(k, value[k]);
})
);