Make PDF reader File menu "Show in Library" option to show parent item
Fixes #2266
This commit is contained in:
parent
aefd3dd94a
commit
86965988b4
1 changed files with 3 additions and 1 deletions
|
@ -276,7 +276,9 @@ class ReaderInstance {
|
||||||
else if (cmd === 'showInLibrary') {
|
else if (cmd === 'showInLibrary') {
|
||||||
let win = Zotero.getMainWindow();
|
let win = Zotero.getMainWindow();
|
||||||
if (win) {
|
if (win) {
|
||||||
win.ZoteroPane.selectItems([this._itemID]);
|
let item = Zotero.Items.get(this._itemID);
|
||||||
|
let id = item.parentID || item.id;
|
||||||
|
win.ZoteroPane.selectItems([id]);
|
||||||
win.Zotero_Tabs.select('zotero-pane');
|
win.Zotero_Tabs.select('zotero-pane');
|
||||||
win.focus();
|
win.focus();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue