update listLengh in addItems/removeItems

This commit is contained in:
j 2011-12-29 16:15:59 +05:30
parent ac4dd51ed7
commit 1a7a5985d9
3 changed files with 6 additions and 3 deletions

View file

@ -32,8 +32,8 @@ Ox.load('UI', {
} }
}, },
select: function(data) { select: function(data) {
if (data.ids) { if (data.id) {
document.location.hash = data.ids[0]; document.location.hash = data.id;
} }
} }
}); });

View file

@ -125,7 +125,8 @@ Ox.DocPanel = function(options, self) {
}); });
self.$list = Ox.TreeList({ self.$list = Ox.TreeList({
items: treeItems, items: treeItems,
width: self.options.width //fixme causes strange layout
//width: self.options.size
}) })
.bindEvent({ .bindEvent({
select: selectItem select: selectItem

View file

@ -1507,6 +1507,7 @@ Ox.List = function(options, self) {
}); });
self.options.items.splice.apply(self.options.items, Ox.merge([pos, 0], items)); 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.$items.splice.apply(self.$items, Ox.merge([pos, 0], $items));
self.listLength += length;
//loadItems(); //loadItems();
updatePositions(); updatePositions();
} }
@ -1656,6 +1657,7 @@ Ox.List = function(options, self) {
self.selected[i] -= length; self.selected[i] -= length;
} }
}); });
self.listLength -= length;
updatePositions(); updatePositions();
} }
} }