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) {
|
function parseData(key, value) {
|
||||||
//Ox.print('parseData', key, value)
|
//Ox.print('parseData', key, value)
|
||||||
var ret = {
|
var ret = {
|
||||||
id: key,
|
id: Ox.uid(),
|
||||||
title: key.toString().split('.').pop()
|
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(Ox.typeOf(value));
|
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(key + '.' + k, value[k]);
|
return parseData(k, value[k]);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
ret.title += ': ' + (
|
ret.title += ': ' + (
|
||||||
|
|
Loading…
Reference in a new issue