From eb94d648d7da5262796593517771ff939d130baa Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 3 Oct 2006 16:25:16 +0000 Subject: [PATCH] Closes #300, when a webpage snapshot is selected in "related" tab, disk icon appears --- chrome/content/zotero/bindings/relatedbox.xml | 24 +++++++++++++++++- .../default/zotero/item-attachments-add.png | Bin 512 -> 0 bytes .../default/zotero/treeitem-attachment.png | Bin 620 -> 0 bytes 3 files changed, 23 insertions(+), 1 deletion(-) delete mode 100755 chrome/skin/default/zotero/item-attachments-add.png delete mode 100755 chrome/skin/default/zotero/treeitem-attachment.png diff --git a/chrome/content/zotero/bindings/relatedbox.xml b/chrome/content/zotero/bindings/relatedbox.xml index d8d5d6a935..eb1d2e0ba8 100644 --- a/chrome/content/zotero/bindings/relatedbox.xml +++ b/chrome/content/zotero/bindings/relatedbox.xml @@ -58,7 +58,29 @@ for(var i = 0; i < seealso.length; i++) { var icon= document.createElement("image"); - icon.setAttribute('src','chrome://zotero/skin/treeitem-'+Zotero.ItemTypes.getName(seealso[i].getType())+'.png'); + var type = Zotero.ItemTypes.getName(seealso[i].getType()); + if (type=='attachment') + { + switch (seealso[i].getAttachmentLinkMode()) + { + case Zotero.Attachments.LINK_MODE_LINKED_URL: + type += '-web-link'; + break; + + case Zotero.Attachments.LINK_MODE_IMPORTED_URL: + type += '-snapshot'; + break; + + case Zotero.Attachments.LINK_MODE_LINKED_FILE: + type += '-link'; + break; + + case Zotero.Attachments.LINK_MODE_IMPORTED_FILE: + type += '-file'; + break; + } + } + icon.setAttribute('src','chrome://zotero/skin/treeitem-' + type + '.png'); var label = document.createElement("label"); label.setAttribute('value', seealso[i].getField('title')); diff --git a/chrome/skin/default/zotero/item-attachments-add.png b/chrome/skin/default/zotero/item-attachments-add.png deleted file mode 100755 index aa23dde3746373b393489bd56b486d59b0c0d124..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 512 zcmV+b0{{JqP)!DxxEH~}L2zn|52%xalaq@DTdhh{EVwv0IaQ=!?daer zTKp4I`l8SDt;d{8Q`5Ko;BXUi&oAG1l4}59P-{|^S(Rmord5s6qsh<&m@Ab^wqCD) zHyRD}lKLDzpYN&@q5&*47mGzGiqcXpmqR9#K|CH8kXS4RNs`(iEF%HjP%f8ItyaZK z6$%Apvsok(2>~dTO5jTZfq;N?0ch4l01f$k9?4{~Youl-#x{UDMr#AFIkz@SDwPtQ z$gQ^$2|*(Ps9LQiav_8o8Ne<=Zx1*M*syo80sEO1tB%>5 zfdHB`1z+!R@?ghPRKmL)hWEvZE$=*54ose*0JiUNTM_)cMDXhxEKg(?-pD=y<)L4J zT0dSyD0&NhJ$^_8Ko9uom%-ZM4BTM{Tw$9qyPj=-9W;N(Wi@3*-Q4pq`Gcp}^vvNr zyd&PsmG>fpCSZz?K}UIEd;HGgG%0MG>ymxKPwy{>wy(m*Atq7)0000~H+MJzd|s z^YP1Hc07G_>)Lgir!F1{Qn4GcTg%?koHo<=1qRN{}nPDolOeI^o4N5I>! zU$N=L=sg~ zDx#dOA*B0N~cqPsWI(^rbbkh)DS0_H_UN0C4l_kvWIm2#Kyy6%BCh z(yIUf003&1xdx>t$*eR2ZvXxT0001Z_R$y3Iju92q*wg58};}zm(OaAH=p|y0002M zh5O5#fxp|~jc?yi@+7$`d4Q6Hl%z;WiWG??NXR{Hx%)pMd~SE0000OQI