use getImageSrc() functions in place of hard-coded image URLs

This commit is contained in:
Simon Kornblith 2006-12-20 00:29:18 +00:00
parent cfb9397638
commit 04db363691
2 changed files with 3 additions and 3 deletions

View File

@ -103,7 +103,7 @@ var Zotero_Citation_Dialog = new function () {
itemNode.setAttribute("value", itemID);
itemNode.setAttribute("label", item.getField("title"));
itemNode.setAttribute("class", "listitem-iconic");
itemNode.setAttribute("image", "chrome://zotero/skin/treeitem-"+Zotero.ItemTypes.getName(item.getType())+".png");
itemNode.setAttribute("image", item.getImageSrc());
document.getElementById("citation-list").appendChild(itemNode);
// don't let someone select it again

View File

@ -348,7 +348,7 @@ Zotero_Ingester_Interface._updateStatus = function(data) {
// Use folder icon for multiple types, for now
Zotero_Ingester_Interface.statusImage.src = "chrome://zotero/skin/treesource-collection.png";
} else {
Zotero_Ingester_Interface.statusImage.src = "chrome://zotero/skin/treeitem-"+itemType+".png";
Zotero_Ingester_Interface.statusImage.src = Zotero.ItemTypes.getImageSrc(itemType);
}
Zotero_Ingester_Interface.statusImage.hidden = false;
} else {
@ -361,7 +361,7 @@ Zotero_Ingester_Interface._updateStatus = function(data) {
*/
Zotero_Ingester_Interface._itemDone = function(obj, item, collection) {
var title = item.getField("title");
var icon = "chrome://zotero/skin/treeitem-"+Zotero.ItemTypes.getName(item.getField("itemTypeID"))+".png"
var icon = item.getImageSrc();
Zotero_Ingester_Interface.Progress.addLines([title], [icon]);
// add item to collection, if one was specified