diff --git a/chrome/chromeFiles/content/scholar/collectionTreeView.js b/chrome/chromeFiles/content/scholar/collectionTreeView.js index 059a04a95..9de2a9d25 100644 --- a/chrome/chromeFiles/content/scholar/collectionTreeView.js +++ b/chrome/chromeFiles/content/scholar/collectionTreeView.js @@ -119,6 +119,12 @@ Scholar.CollectionTreeView.prototype.getCellText = function(row, column) return ""; } +Scholar.CollectionTreeView.prototype.getImageSrc = function(row, col) +{ + var collectionType = this._getItemAtRow(row).type; + return "chrome://scholar/skin/treesource-" + collectionType + ".png"; +} + Scholar.CollectionTreeView.prototype.isContainer = function(row) { return this._getItemAtRow(row).isCollection(); @@ -331,7 +337,6 @@ Scholar.CollectionTreeView.prototype.isEditable = function(row, idx) { retur Scholar.CollectionTreeView.prototype.getRowProperties = function(row, prop) { } Scholar.CollectionTreeView.prototype.getColumnProperties = function(col, prop) { } Scholar.CollectionTreeView.prototype.getCellProperties = function(row, col, prop) { } -Scholar.CollectionTreeView.prototype.getImageSrc = function(row, col) { } Scholar.CollectionTreeView.prototype.performAction = function(action) { } Scholar.CollectionTreeView.prototype.performActionOnCell = function(action, row, col) { } Scholar.CollectionTreeView.prototype.getProgressMode = function(row, col) { } diff --git a/chrome/chromeFiles/content/scholar/itemTreeView.js b/chrome/chromeFiles/content/scholar/itemTreeView.js index fc92ed208..faee64f94 100644 --- a/chrome/chromeFiles/content/scholar/itemTreeView.js +++ b/chrome/chromeFiles/content/scholar/itemTreeView.js @@ -122,6 +122,15 @@ Scholar.ItemTreeView.prototype.getCellText = function(row, column) return val; } +Scholar.ItemTreeView.prototype.getImageSrc = function(row, col) +{ + if(col.id == 'title') + { + var itemType = Scholar.ItemTypes.getTypeName(this._getItemAtRow(row).getType()); + return "chrome://scholar/skin/treeitem-"+itemType+".png"; + } +} + Scholar.ItemTreeView.prototype.isSorted = function() { for(var i=0, len=this._treebox.columns.count; i