use random ids for data tree list items
This commit is contained in:
parent
719ffc050a
commit
57ae6e5c64
1 changed files with 4 additions and 4 deletions
|
@ -137,14 +137,14 @@ Ox.TreeList = function(options, self) {
|
|||
function parseData(key, value) {
|
||||
//Ox.print('parseData', key, value)
|
||||
var ret = {
|
||||
id: key,
|
||||
title: key.toString().split('.').pop()
|
||||
id: Ox.uid(),
|
||||
title: key.toString()
|
||||
},
|
||||
type = Ox.typeOf(value);
|
||||
if (type == 'array' || type == 'object') {
|
||||
ret.title += ': ' + Ox.toTitleCase(Ox.typeOf(value));
|
||||
ret.title += ': ' + Ox.toTitleCase(type);
|
||||
ret.items = Ox.map(Ox.sort(Ox.keys(value)), function(k) {
|
||||
return parseData(key + '.' + k, value[k]);
|
||||
return parseData(k, value[k]);
|
||||
});
|
||||
} else {
|
||||
ret.title += ': ' + (
|
||||
|
|
Loading…
Reference in a new issue