[interface] Images now appear on the collections tree and items tree. (yes, they are ugly).

This commit is contained in:
David Norton 2006-06-09 16:36:18 +00:00
parent 68fed95e8f
commit cebd6bde5b
6 changed files with 16 additions and 3 deletions

View file

@ -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) { }

View file

@ -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++)
@ -311,4 +320,3 @@ 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) { }

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 544 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 B