Don't switch to Retracted Items for single item from banner View button
Only for multiple items
This commit is contained in:
parent
45f6492494
commit
ae7a262592
1 changed files with 5 additions and 3 deletions
|
@ -4800,13 +4800,15 @@ var ZoteroPane = new function()
|
||||||
link.textContent = Zotero.getString('retraction.alert.view.' + suffix);
|
link.textContent = Zotero.getString('retraction.alert.view.' + suffix);
|
||||||
link.onclick = async function () {
|
link.onclick = async function () {
|
||||||
this.hideRetractionBanner();
|
this.hideRetractionBanner();
|
||||||
var libraryID = this.getSelectedLibraryID();
|
|
||||||
// Select the Retracted Items collection
|
|
||||||
await this.collectionsView.selectByID("R" + libraryID);
|
|
||||||
// Select newly detected item if only one
|
// Select newly detected item if only one
|
||||||
if (items.length == 1) {
|
if (items.length == 1) {
|
||||||
await this.selectItem(items[0].id);
|
await this.selectItem(items[0].id);
|
||||||
}
|
}
|
||||||
|
// Otherwise select Retracted Items collection
|
||||||
|
else {
|
||||||
|
let libraryID = this.getSelectedLibraryID();
|
||||||
|
await this.collectionsView.selectByID("R" + libraryID);
|
||||||
|
}
|
||||||
}.bind(this);
|
}.bind(this);
|
||||||
|
|
||||||
close.onclick = function () {
|
close.onclick = function () {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue