www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 4d4b7cf47ecec0ed2b10c60c3006637f5cf79145
parent 3dd8351478b193c6f8f82ba808603e136a5e4be6
Author: David Norton <david@nortoncrew.com>
Date:   Fri, 17 Mar 2006 03:45:30 +0000


Diffstat:
Mchrome/chromeFiles/content/scholar/sidebar.js | 33++++++++++++++++++++++++++++-----
1 file changed, 28 insertions(+), 5 deletions(-)

diff --git a/chrome/chromeFiles/content/scholar/sidebar.js b/chrome/chromeFiles/content/scholar/sidebar.js @@ -1,10 +1,33 @@ var treeView = { - rowCount : 100, - getCellText : function(row,column){ - if (column.id == "title_column") return "Row "+row; - else return "February 18"; + treebox: null, + dataObjects: null, + + get rowCount() { return this.dataObjects.length; }, + getCellText: function(row,column){ + obj = this.dataObjects[row]; + + if(column.id == "title_column") + { + return obj.getField("title"); + } + else if(column.id == "creator_column") + { + return obj.getField("firstCreator"); + } + else + { + return obj.getField("source"); + } + }, + setTree: function(treebox){ + this.treebox = treebox; + this.dataObjects = Scholar_Objects.getAll(); + + //Dan S: Check out the debug output created by this + for(var i = 0; i < this.dataObjects.length; i++) + Scholar.debug(Scholar.varDump(this.dataObjects[i]),5); + }, - setTree: function(treebox){ this.treebox = treebox; }, isContainer: function(row){ return false; }, isSeparator: function(row){ return false; }, isSorted: function(){ return false; },