1
0
Fork 0
forked from 0x2620/oxjs

quick fix for treelist layout

This commit is contained in:
rolux 2012-04-08 14:38:15 +02:00
commit e7f132f121
2 changed files with 26 additions and 19 deletions

View file

@ -43,25 +43,28 @@ Ox.TreeList = function(options, self) {
});
}
that.$element = Ox.List({
_tree: true,
construct: constructItem,
itemHeight: 16,
items: parseItems(),
itemWidth: self.options.width,
keys: ['expanded', 'id', 'items', 'level', 'title'],
max: self.options.max,
min: self.options.min,
unique: 'id'
}, Ox.copy(self))
.addClass('OxTextList OxTreeList')
.css({
width: self.options.width + 'px'
})
.bindEvent({
anyclick: clickItem,
toggle: toggleItems
});
that.setElement(
self.$list = Ox.List({
_tree: true,
construct: constructItem,
itemHeight: 16,
items: parseItems(),
itemWidth: self.options.width,
keys: ['expanded', 'id', 'items', 'level', 'title'],
max: self.options.max,
min: self.options.min,
unique: 'id'
}, Ox.copy(self))
.addClass('OxTextList OxTreeList')
.css({
width: self.options.width + 'px',
overflowY: 'scroll'
})
.bindEvent({
anyclick: clickItem,
toggle: toggleItems
})
);
function clickItem(e) {
var $target = $(e.target),