Disable PDF annotation transfer in group libraries
This commit is contained in:
parent
cc0687a574
commit
bf9ef5fc01
1 changed files with 6 additions and 2 deletions
|
@ -154,12 +154,16 @@ const ZoteroStandalone = new function() {
|
||||||
catch (e) {}
|
catch (e) {}
|
||||||
this.updateMenuItemEnabled('manage-attachments-menu', active);
|
this.updateMenuItemEnabled('manage-attachments-menu', active);
|
||||||
|
|
||||||
|
// PDF annotation transfer ("Import Annotation"/"Store Annotations in File")
|
||||||
let reader = Zotero.Reader.getByTabID(Zotero_Tabs.selectedID);
|
let reader = Zotero.Reader.getByTabID(Zotero_Tabs.selectedID);
|
||||||
if (reader) {
|
if (reader) {
|
||||||
let item = Zotero.Items.get(reader.itemID);
|
let item = Zotero.Items.get(reader.itemID);
|
||||||
|
let library = Zotero.Libraries.get(item.libraryID);
|
||||||
if (item
|
if (item
|
||||||
&& Zotero.Libraries.get(item.libraryID).editable
|
// Don't allow annotation transfer in group libraries
|
||||||
&& !(item.deleted || item.parentItem && item.parentItem.deleted)) {
|
&& library.libraryType == 'user'
|
||||||
|
&& library.editable
|
||||||
|
&& !(item.deleted || item.parentItem && item.parentItem.deleted)) {
|
||||||
let annotations = item.getAnnotations();
|
let annotations = item.getAnnotations();
|
||||||
let canTransferFromPDF = annotations.find(x => x.annotationIsExternal);
|
let canTransferFromPDF = annotations.find(x => x.annotationIsExternal);
|
||||||
let canTransferToPDF = annotations.find(x => !x.annotationIsExternal);
|
let canTransferToPDF = annotations.find(x => !x.annotationIsExternal);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue