minor changes in tree list
This commit is contained in:
parent
4b1eadc021
commit
ff1714013c
1 changed files with 5 additions and 5 deletions
|
@ -138,19 +138,19 @@ Ox.TreeList = function(options, self) {
|
||||||
//Ox.print('parseData', key, value)
|
//Ox.print('parseData', key, value)
|
||||||
var ret = {
|
var ret = {
|
||||||
id: Ox.uid(),
|
id: Ox.uid(),
|
||||||
title: key.toString()
|
title: key.toString() + ': '
|
||||||
},
|
},
|
||||||
type = Ox.typeOf(value);
|
type = Ox.typeOf(value);
|
||||||
if (type == 'array' || type == 'object') {
|
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) {
|
ret.items = Ox.map(Ox.sort(Ox.keys(value)), function(k) {
|
||||||
return parseData(k, value[k]);
|
return parseData(k, value[k]);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
ret.title += ': ' + (
|
ret.title += (
|
||||||
type == 'function' ?
|
type == 'function' ?
|
||||||
value.toString().split('{')[0] :
|
value.toString().split('{')[0] :
|
||||||
JSON.stringify(value)
|
JSON.stringify(value)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in a new issue