commit cebd6bde5b3e5184eb53e6efa9967fac5f5db284 parent 68fed95e8f908348a05350ddd405c7cbd5162c42 Author: David Norton <david@nortoncrew.com> Date: Fri, 9 Jun 2006 16:36:18 +0000 [interface] Images now appear on the collections tree and items tree. (yes, they are ugly). Diffstat:
6 files changed, 17 insertions(+), 4 deletions(-)
diff --git 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 @@ -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<len; i++) @@ -310,5 +319,4 @@ Scholar.ItemTreeView.prototype.isContainer = function(row) { return false; Scholar.ItemTreeView.prototype.getLevel = function(row) { return 0; } Scholar.ItemTreeView.prototype.getRowProperties = function(row, prop) { } Scholar.ItemTreeView.prototype.getColumnProperties = function(col, prop) { } -Scholar.ItemTreeView.prototype.getCellProperties = function(row, col, prop) { } -Scholar.ItemTreeView.prototype.getImageSrc = function(row, col) { } -\ No newline at end of file +Scholar.ItemTreeView.prototype.getCellProperties = function(row, col, prop) { } +\ No newline at end of file diff --git a/chrome/chromeFiles/skin/default/scholar/treeitem-book.png b/chrome/chromeFiles/skin/default/scholar/treeitem-book.png Binary files differ. diff --git a/chrome/chromeFiles/skin/default/scholar/treeitem-journalArticle.png b/chrome/chromeFiles/skin/default/scholar/treeitem-journalArticle.png Binary files differ. diff --git a/chrome/chromeFiles/skin/default/scholar/treesource-collection.png b/chrome/chromeFiles/skin/default/scholar/treesource-collection.png Binary files differ. diff --git a/chrome/chromeFiles/skin/default/scholar/treesource-library.png b/chrome/chromeFiles/skin/default/scholar/treesource-library.png Binary files differ.