1
0
Fork 0
forked from 0x2620/oxjs

in Ox.TreeList, use OxLight style for length of arrays and objects

This commit is contained in:
rolux 2012-04-15 14:19:52 +02:00
commit 1d53a14cc1

View file

@ -26,10 +26,10 @@ Ox.TreeList = function(options, self) {
.defaults({ .defaults({
data: null, data: null,
items: [], items: [],
max: -1, max: 1,
min: 0, min: 0,
selected: [], selected: [],
width: 256 width: 'auto'
}) })
.options(options || {}); .options(options || {});
@ -162,7 +162,8 @@ Ox.TreeList = function(options, self) {
}, },
type = Ox.typeOf(value); type = Ox.typeOf(value);
if (type == 'array' || type == 'object') { if (type == 'array' || type == 'object') {
ret.title += Ox.toTitleCase(type) + ' [' + Ox.len(value) + ']'; ret.title += Ox.toTitleCase(type)
+ ' <span class="OxLight">[' + Ox.len(value) + ']</span>';
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]);
}); });