update listLengh in addItems/removeItems
This commit is contained in:
parent
ac4dd51ed7
commit
1a7a5985d9
3 changed files with 6 additions and 3 deletions
|
@ -32,8 +32,8 @@ Ox.load('UI', {
|
|||
}
|
||||
},
|
||||
select: function(data) {
|
||||
if (data.ids) {
|
||||
document.location.hash = data.ids[0];
|
||||
if (data.id) {
|
||||
document.location.hash = data.id;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -125,7 +125,8 @@ Ox.DocPanel = function(options, self) {
|
|||
});
|
||||
self.$list = Ox.TreeList({
|
||||
items: treeItems,
|
||||
width: self.options.width
|
||||
//fixme causes strange layout
|
||||
//width: self.options.size
|
||||
})
|
||||
.bindEvent({
|
||||
select: selectItem
|
||||
|
|
|
@ -1507,6 +1507,7 @@ Ox.List = function(options, self) {
|
|||
});
|
||||
self.options.items.splice.apply(self.options.items, Ox.merge([pos, 0], items));
|
||||
self.$items.splice.apply(self.$items, Ox.merge([pos, 0], $items));
|
||||
self.listLength += length;
|
||||
//loadItems();
|
||||
updatePositions();
|
||||
}
|
||||
|
@ -1656,6 +1657,7 @@ Ox.List = function(options, self) {
|
|||
self.selected[i] -= length;
|
||||
}
|
||||
});
|
||||
self.listLength -= length;
|
||||
updatePositions();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue