Allow to show/hide citations in notes (#2288)

This commit is contained in:
Martynas Bagdonas 2022-02-11 12:50:43 +02:00 committed by GitHub
parent bcfd93bc79
commit e6c835abc8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 8 deletions

View file

@ -589,11 +589,15 @@ class EditorInstance {
if (!item) {
return;
}
let attachments = Zotero.Items.get(item.getAttachments()).filter(x => x.isPDFAttachment());
if (citationItem.locator && attachments.length === 1) {
let zp = Zotero.getActiveZoteroPane();
if (zp) {
zp.viewPDF(attachments[0].id, { pageLabel: citationItem.locator });
if (citationItem.locator) {
let attachments = await item.getBestAttachments();
attachments = attachments.filter(x => x.isPDFAttachment());
if (attachments.length) {
let zp = Zotero.getActiveZoteroPane();
if (zp) {
zp.viewPDF(attachments[0].id, { pageLabel: citationItem.locator });
}
}
}
else {

View file

@ -1333,10 +1333,13 @@ noteEditor.unlink = Unlink
noteEditor.set = Set
noteEditor.edit = Edit
noteEditor.addCitation = Add Citation
noteEditor.removeCitation = Hide Citation
noteEditor.findAndReplace = Find and Replace
noteEditor.editInWindow = Edit in a Separate Window
noteEditor.applyAnnotationColors = Apply Annotation Colors
noteEditor.removeAnnotationColors = Remove Annotation Colors
noteEditor.applyAnnotationColors = Show Annotation Colors
noteEditor.removeAnnotationColors = Hide Annotation Colors
noteEditor.addCitations = Show Annotation Citations
noteEditor.removeCitations = Hide Annotation Citations
pdfReader.annotations = Annotations
pdfReader.showAnnotations = Show Annotations

@ -1 +1 @@
Subproject commit 2c986e46bb790789d9416819c087bcfd566ad574
Subproject commit 6ba8de80ff64558f7cc727355b69eaca0ae3dcad