mirror of
https://github.com/zotero/zotero.git
synced 2026-10-06 02:50:03 +00:00
Define "snapshot" the same way everywhere
This commit is contained in:
parent
8ddb6bfd17
commit
fb9aab3bb0
1 changed files with 9 additions and 6 deletions
|
|
@ -2485,12 +2485,10 @@ Zotero.Item.prototype.isEmbeddedImageAttachment = function() {
|
|||
* @return {Boolean} - Returns true if item is a snapshot
|
||||
*/
|
||||
Zotero.Item.prototype.isSnapshotAttachment = function () {
|
||||
return this.attachmentLinkMode == Zotero.Attachments.LINK_MODE_IMPORTED_URL
|
||||
&& this.attachmentContentType == 'text/html';
|
||||
return this.isFileAttachment() && this.attachmentContentType == 'text/html';
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @return {Boolean} - Returns true if item is a stored or linked PDF attachment
|
||||
*/
|
||||
|
|
@ -4600,6 +4598,14 @@ Zotero.Item.prototype.getItemTypeIconName = function (skipLinkMode = false) {
|
|||
itemType += 'EPUB';
|
||||
}
|
||||
}
|
||||
else if (this.isSnapshotAttachment()) {
|
||||
if (!skipLinkMode && linkMode == Zotero.Attachments.LINK_MODE_LINKED_FILE) {
|
||||
itemType += 'WebLink';
|
||||
}
|
||||
else {
|
||||
itemType += 'Snapshot';
|
||||
}
|
||||
}
|
||||
else if (this.isImageAttachment()) {
|
||||
itemType += linkMode == (!skipLinkMode && Zotero.Attachments.LINK_MODE_LINKED_FILE) ? 'ImageLink' : 'Image';
|
||||
}
|
||||
|
|
@ -4612,9 +4618,6 @@ Zotero.Item.prototype.getItemTypeIconName = function (skipLinkMode = false) {
|
|||
else if (!skipLinkMode && linkMode == Zotero.Attachments.LINK_MODE_LINKED_FILE) {
|
||||
itemType += "Link";
|
||||
}
|
||||
else if (linkMode == Zotero.Attachments.LINK_MODE_IMPORTED_URL) {
|
||||
itemType += "Snapshot";
|
||||
}
|
||||
else if (linkMode == Zotero.Attachments.LINK_MODE_LINKED_URL) {
|
||||
itemType += "WebLink";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue