quick fix for treelist layout

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

View file

@ -1469,6 +1469,8 @@ Ox.List = function(options, self) {
self.listLength = self.options.items.length;
//loadItems();
updatePositions();
emptyFirstPage();
fillFirstPage();
}
/*@
@ -1580,6 +1582,8 @@ Ox.List = function(options, self) {
self.listLength = self.options.items.length;
updatePositions();
}
emptyFirstPage();
fillFirstPage();
}
/*@
scrollToSelection <f> scroll list to current selection

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),