minor changes in tree list

This commit is contained in:
rolux 2011-07-26 16:36:31 +02:00
parent 4b1eadc021
commit ff1714013c

View file

@ -138,19 +138,19 @@ Ox.TreeList = function(options, self) {
//Ox.print('parseData', key, value)
var ret = {
id: Ox.uid(),
title: key.toString()
title: key.toString() + ': '
},
type = Ox.typeOf(value);
if (type == 'array' || type == 'object') {
ret.title += ': ' + Ox.toTitleCase(type);
ret.title += Ox.toTitleCase(type);
ret.items = Ox.map(Ox.sort(Ox.keys(value)), function(k) {
return parseData(k, value[k]);
});
} else {
ret.title += ': ' + (
ret.title += (
type == 'function' ?
value.toString().split('{')[0] :
JSON.stringify(value)
value.toString().split('{')[0] :
JSON.stringify(value)
);
}
return ret;