www

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

commit cf2318ec5a185858f9479e04beda595170569776
parent cbcfb6b92ea6a435c9b601aafd8c66a5cb19b152
Author: Dan Stillman <dstillman@zotero.org>
Date:   Tue, 10 Jan 2017 23:53:04 -0500

Move feeds below groups

Diffstat:
Mchrome/content/zotero/xpcom/collectionTreeView.js | 57+++++++++++++++++++++++++++++----------------------------
1 file changed, 29 insertions(+), 28 deletions(-)

diff --git a/chrome/content/zotero/xpcom/collectionTreeView.js b/chrome/content/zotero/xpcom/collectionTreeView.js @@ -194,8 +194,36 @@ Zotero.CollectionTreeView.prototype.refresh = Zotero.Promise.coroutine(function* }), added++ ); - + // TODO: Unify feed and group adding code + + // Add groups + var groups = Zotero.Groups.getAll(); + if (groups.length) { + this._addRowToArray( + newRows, + new Zotero.CollectionTreeRow('separator', false), + added++ + ); + this._addRowToArray( + newRows, + new Zotero.CollectionTreeRow('header', { + id: "group-libraries-header", + label: Zotero.getString('pane.collections.groupLibraries'), + libraryID: -1 + }, 0), + added++ + ); + for (let group of groups) { + this._addRowToArray( + newRows, + new Zotero.CollectionTreeRow('group', group), + added++ + ); + added += yield this._expandRow(newRows, added - 1); + } + } + // Add feeds if (this.hideSources.indexOf('feeds') == -1) { var feeds = Zotero.Feeds.getAll(); @@ -230,33 +258,6 @@ Zotero.CollectionTreeView.prototype.refresh = Zotero.Promise.coroutine(function* } } } - - // Add groups - var groups = Zotero.Groups.getAll(); - if (groups.length) { - this._addRowToArray( - newRows, - new Zotero.CollectionTreeRow('separator', false), - added++ - ); - this._addRowToArray( - newRows, - new Zotero.CollectionTreeRow('header', { - id: "group-libraries-header", - label: Zotero.getString('pane.collections.groupLibraries'), - libraryID: -1 - }, 0), - added++ - ); - for (let group of groups) { - this._addRowToArray( - newRows, - new Zotero.CollectionTreeRow('group', group), - added++ - ); - added += yield this._expandRow(newRows, added - 1); - } - } this.selection.selectEventsSuppressed = true; this.selection.clearSelection();