www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 78b4c3c820c7560b573c34e35c27862891b4848f
parent fffe67967b719bad9dd6e60cadc37e9c730cbb51
Author: Dan Stillman <dstillman@zotero.org>
Date:   Sat,  6 Aug 2011 05:55:50 +0000

Fix source list glitch


Diffstat:
Mchrome/content/zotero/xpcom/collectionTreeView.js | 11++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/chrome/content/zotero/xpcom/collectionTreeView.js b/chrome/content/zotero/xpcom/collectionTreeView.js @@ -162,21 +162,22 @@ Zotero.CollectionTreeView.prototype.refresh = function() var header = { id: "group-libraries-header", label: "Group Libraries", // TODO: localize - expand: function (groups) { + expand: function (beforeRow, groups) { if (!groups) { var groups = Zotero.Groups.getAll(); } + var newRows = 0; for (var i = 0, len = groups.length; i < len; i++) { - var row = self._showRow(new Zotero.ItemGroup('group', groups[i]), 1); - self._expandRow(row); + var row = self._showRow(new Zotero.ItemGroup('group', groups[i]), 1, beforeRow ? beforeRow + i + newRows : null); + newRows += self._expandRow(row); } } } var row = this._showRow(new Zotero.ItemGroup('header', header)); if (this._containerState.HG) { this._dataItems[row][1] = true; - header.expand(groups); + header.expand(null, groups); } } @@ -547,7 +548,7 @@ Zotero.CollectionTreeView.prototype.toggleOpenState = function(row) var itemGroup = this._getItemAtRow(row); if (itemGroup.type == 'header') { - itemGroup.ref.expand(); + itemGroup.ref.expand(row + 1); } else if (itemGroup.isLibrary(true) || itemGroup.isCollection()) { this._expandRow(row, true);