Move feeds below groups
This commit is contained in:
parent
cbcfb6b92e
commit
cf2318ec5a
1 changed files with 29 additions and 28 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue