quick fix for treelist layout
This commit is contained in:
parent
7b13e834a7
commit
e7f132f121
2 changed files with 26 additions and 19 deletions
|
@ -1469,6 +1469,8 @@ Ox.List = function(options, self) {
|
||||||
self.listLength = self.options.items.length;
|
self.listLength = self.options.items.length;
|
||||||
//loadItems();
|
//loadItems();
|
||||||
updatePositions();
|
updatePositions();
|
||||||
|
emptyFirstPage();
|
||||||
|
fillFirstPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*@
|
/*@
|
||||||
|
@ -1580,6 +1582,8 @@ Ox.List = function(options, self) {
|
||||||
self.listLength = self.options.items.length;
|
self.listLength = self.options.items.length;
|
||||||
updatePositions();
|
updatePositions();
|
||||||
}
|
}
|
||||||
|
emptyFirstPage();
|
||||||
|
fillFirstPage();
|
||||||
}
|
}
|
||||||
/*@
|
/*@
|
||||||
scrollToSelection <f> scroll list to current selection
|
scrollToSelection <f> scroll list to current selection
|
||||||
|
|
|
@ -43,25 +43,28 @@ Ox.TreeList = function(options, self) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
that.$element = Ox.List({
|
that.setElement(
|
||||||
_tree: true,
|
self.$list = Ox.List({
|
||||||
construct: constructItem,
|
_tree: true,
|
||||||
itemHeight: 16,
|
construct: constructItem,
|
||||||
items: parseItems(),
|
itemHeight: 16,
|
||||||
itemWidth: self.options.width,
|
items: parseItems(),
|
||||||
keys: ['expanded', 'id', 'items', 'level', 'title'],
|
itemWidth: self.options.width,
|
||||||
max: self.options.max,
|
keys: ['expanded', 'id', 'items', 'level', 'title'],
|
||||||
min: self.options.min,
|
max: self.options.max,
|
||||||
unique: 'id'
|
min: self.options.min,
|
||||||
}, Ox.copy(self))
|
unique: 'id'
|
||||||
.addClass('OxTextList OxTreeList')
|
}, Ox.copy(self))
|
||||||
.css({
|
.addClass('OxTextList OxTreeList')
|
||||||
width: self.options.width + 'px'
|
.css({
|
||||||
})
|
width: self.options.width + 'px',
|
||||||
.bindEvent({
|
overflowY: 'scroll'
|
||||||
anyclick: clickItem,
|
})
|
||||||
toggle: toggleItems
|
.bindEvent({
|
||||||
});
|
anyclick: clickItem,
|
||||||
|
toggle: toggleItems
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
function clickItem(e) {
|
function clickItem(e) {
|
||||||
var $target = $(e.target),
|
var $target = $(e.target),
|
||||||
|
|
Loading…
Reference in a new issue