Add icon for linked PDF files
This commit is contained in:
parent
e2c4e3e86a
commit
8cd5b09053
5 changed files with 8 additions and 6 deletions
|
@ -460,6 +460,7 @@ Zotero.ItemTypes = new function() {
|
||||||
// HiDPI images available
|
// HiDPI images available
|
||||||
case 'attachment-link':
|
case 'attachment-link':
|
||||||
case 'attachment-pdf':
|
case 'attachment-pdf':
|
||||||
|
case 'attachment-pdf-link':
|
||||||
case 'attachment-snapshot':
|
case 'attachment-snapshot':
|
||||||
case 'attachment-web-link':
|
case 'attachment-web-link':
|
||||||
case 'artwork':
|
case 'artwork':
|
||||||
|
|
|
@ -3686,12 +3686,13 @@ Zotero.Item.prototype.getImageSrc = function() {
|
||||||
if (itemType == 'attachment') {
|
if (itemType == 'attachment') {
|
||||||
var linkMode = this.attachmentLinkMode;
|
var linkMode = this.attachmentLinkMode;
|
||||||
|
|
||||||
// Quick hack to use PDF icon for imported files and URLs --
|
if (this.attachmentContentType == 'application/pdf') {
|
||||||
// extend to support other document types later
|
if (linkMode == Zotero.Attachments.LINK_MODE_LINKED_FILE) {
|
||||||
if ((linkMode == Zotero.Attachments.LINK_MODE_IMPORTED_FILE ||
|
itemType += '-pdf-link';
|
||||||
linkMode == Zotero.Attachments.LINK_MODE_IMPORTED_URL) &&
|
}
|
||||||
this.attachmentContentType == 'application/pdf') {
|
else {
|
||||||
itemType += '-pdf';
|
itemType += '-pdf';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (linkMode == Zotero.Attachments.LINK_MODE_IMPORTED_FILE) {
|
else if (linkMode == Zotero.Attachments.LINK_MODE_IMPORTED_FILE) {
|
||||||
itemType += "-file";
|
itemType += "-file";
|
||||||
|
|
BIN
chrome/skin/default/zotero/treeitem-attachment-pdf-link.png
Normal file
BIN
chrome/skin/default/zotero/treeitem-attachment-pdf-link.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
BIN
chrome/skin/default/zotero/treeitem-attachment-pdf-link@2x.png
Normal file
BIN
chrome/skin/default/zotero/treeitem-attachment-pdf-link@2x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.7 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Loading…
Add table
Add a link
Reference in a new issue