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