diff --git a/chrome/content/zotero/xpcom/data/cachedTypes.js b/chrome/content/zotero/xpcom/data/cachedTypes.js index 06b03136db..1d9277c24c 100644 --- a/chrome/content/zotero/xpcom/data/cachedTypes.js +++ b/chrome/content/zotero/xpcom/data/cachedTypes.js @@ -460,6 +460,7 @@ Zotero.ItemTypes = new function() { // HiDPI images available case 'attachment-link': case 'attachment-pdf': + case 'attachment-pdf-link': case 'attachment-snapshot': case 'attachment-web-link': case 'artwork': diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js index 74a6428c9a..83f47f8430 100644 --- a/chrome/content/zotero/xpcom/data/item.js +++ b/chrome/content/zotero/xpcom/data/item.js @@ -3686,12 +3686,13 @@ Zotero.Item.prototype.getImageSrc = function() { if (itemType == 'attachment') { var linkMode = this.attachmentLinkMode; - // Quick hack to use PDF icon for imported files and URLs -- - // extend to support other document types later - if ((linkMode == Zotero.Attachments.LINK_MODE_IMPORTED_FILE || - linkMode == Zotero.Attachments.LINK_MODE_IMPORTED_URL) && - this.attachmentContentType == 'application/pdf') { - itemType += '-pdf'; + if (this.attachmentContentType == 'application/pdf') { + if (linkMode == Zotero.Attachments.LINK_MODE_LINKED_FILE) { + itemType += '-pdf-link'; + } + else { + itemType += '-pdf'; + } } else if (linkMode == Zotero.Attachments.LINK_MODE_IMPORTED_FILE) { itemType += "-file"; diff --git a/chrome/skin/default/zotero/treeitem-attachment-pdf-link.png b/chrome/skin/default/zotero/treeitem-attachment-pdf-link.png new file mode 100644 index 0000000000..6d36438c6c Binary files /dev/null and b/chrome/skin/default/zotero/treeitem-attachment-pdf-link.png differ diff --git a/chrome/skin/default/zotero/treeitem-attachment-pdf-link@2x.png b/chrome/skin/default/zotero/treeitem-attachment-pdf-link@2x.png new file mode 100644 index 0000000000..1b190af916 Binary files /dev/null and b/chrome/skin/default/zotero/treeitem-attachment-pdf-link@2x.png differ diff --git a/chrome/skin/default/zotero/treeitem-attachment-pdf.png b/chrome/skin/default/zotero/treeitem-attachment-pdf.png index c03704d135..74084102ef 100644 Binary files a/chrome/skin/default/zotero/treeitem-attachment-pdf.png and b/chrome/skin/default/zotero/treeitem-attachment-pdf.png differ