Allow attachmentLinkMode to be specified as a string ('linked_url')
This commit is contained in:
parent
93a6a4ffdb
commit
b0f52a0f07
|
@ -2699,6 +2699,14 @@ Zotero.defineProperty(Zotero.Item.prototype, 'attachmentLinkMode', {
|
|||
throw (".attachmentLinkMode can only be set for attachment items");
|
||||
}
|
||||
|
||||
// Allow 'imported_url', etc.
|
||||
if (typeof val == 'string') {
|
||||
let code = Zotero.Attachments["LINK_MODE_" + val.toUpperCase()];
|
||||
if (code !== undefined) {
|
||||
val = code;
|
||||
}
|
||||
}
|
||||
|
||||
switch (val) {
|
||||
case Zotero.Attachments.LINK_MODE_IMPORTED_FILE:
|
||||
case Zotero.Attachments.LINK_MODE_IMPORTED_URL:
|
||||
|
|
Loading…
Reference in New Issue
Block a user