Don't suggest to create note if only ink annotations exist
This commit is contained in:
parent
3ed23e5cce
commit
cdb826e358
1 changed files with 2 additions and 2 deletions
|
@ -2865,7 +2865,7 @@ var ZoteroPane = new function()
|
||||||
popup.textContent = '';
|
popup.textContent = '';
|
||||||
let eligibleAttachments = Zotero.Items.get(item.getAttachments())
|
let eligibleAttachments = Zotero.Items.get(item.getAttachments())
|
||||||
.filter(item => item.isPDFAttachment());
|
.filter(item => item.isPDFAttachment());
|
||||||
let attachmentsWithAnnotations = eligibleAttachments.filter(x => x.numAnnotations());
|
let attachmentsWithAnnotations = eligibleAttachments.filter(x => x.getAnnotations().some(x => x.annotationType != 'ink'));
|
||||||
if (attachmentsWithAnnotations.length) {
|
if (attachmentsWithAnnotations.length) {
|
||||||
// Display submenu if there's more than one PDF attachment, even if
|
// Display submenu if there's more than one PDF attachment, even if
|
||||||
// there's only attachment with annotations, so it's clear which one
|
// there's only attachment with annotations, so it's clear which one
|
||||||
|
@ -4429,7 +4429,7 @@ var ZoteroPane = new function()
|
||||||
var attachment;
|
var attachment;
|
||||||
if (item.isRegularItem()) {
|
if (item.isRegularItem()) {
|
||||||
attachment = Zotero.Items.get(item.getAttachments())
|
attachment = Zotero.Items.get(item.getAttachments())
|
||||||
.find(x => x.isPDFAttachment() && x.numAnnotations());
|
.find(x => x.isPDFAttachment() && x.getAnnotations().some(x => x.annotationType != 'ink'));
|
||||||
}
|
}
|
||||||
else if (item.isFileAttachment()) {
|
else if (item.isFileAttachment()) {
|
||||||
attachment = item;
|
attachment = item;
|
||||||
|
|
Loading…
Add table
Reference in a new issue