From 2be758e4882b52d056b36e4a571c6d02634afa7b Mon Sep 17 00:00:00 2001 From: David Norton Date: Thu, 1 Jun 2006 03:50:34 +0000 Subject: [PATCH] Updated trees to work with new setup. Some New Item functionality. etc. --- .../content/scholar/folderTreeView.js | 40 +++++++++---------- .../content/scholar/metadataPane.js | 2 +- chrome/chromeFiles/content/scholar/overlay.js | 10 ++--- .../chromeFiles/content/scholar/overlay.xul | 19 ++++----- chrome/chromeFiles/content/scholar/view.js | 20 ++++++++-- chrome/chromeFiles/content/scholar/view.xul | 10 ++--- .../locale/en-US/scholar/scholar.dtd | 4 +- .../skin/default/scholar/overlay.css | 2 + 8 files changed, 61 insertions(+), 46 deletions(-) diff --git a/chrome/chromeFiles/content/scholar/folderTreeView.js b/chrome/chromeFiles/content/scholar/folderTreeView.js index 2d2192846..ff534f214 100644 --- a/chrome/chromeFiles/content/scholar/folderTreeView.js +++ b/chrome/chromeFiles/content/scholar/folderTreeView.js @@ -12,9 +12,9 @@ Scholar.FolderTreeView.prototype.setTree = function(treebox) return; this._treebox = treebox; - var newRows = Scholar.Items.getTreeRows(0,'folders'); + var newRows = Scholar.getCollections(); for(var i = 0; i < newRows.length; i++) - this._showItem(new Scholar.ItemGroup('folder',newRows[i]), 0, this._dataItems.length); //item ref, level, beforeRow + this._showItem(new Scholar.ItemGroup('collection',newRows[i]), 0, this._dataItems.length); //item ref, level, beforeRow this._refreshHashMap(); } @@ -29,13 +29,13 @@ Scholar.FolderTreeView.prototype.getCellText = function(row, column) return ""; } -Scholar.FolderTreeView.prototype.isContainer = function(row) { return this._getItemAtRow(row).isFolder(); } +Scholar.FolderTreeView.prototype.isContainer = function(row) { return this._getItemAtRow(row).isCollection(); } Scholar.FolderTreeView.prototype.isContainerOpen = function(row) { return this._dataItems[row][1]; } Scholar.FolderTreeView.prototype.isContainerEmpty = function(row) { var itemGroup = this._getItemAtRow(row); - if(itemGroup.isFolder()) - return !itemGroup.ref.hasChildFolders(); + if(itemGroup.isCollection()) + return !itemGroup.ref.hasChildCollections(); else return true; } @@ -79,12 +79,12 @@ Scholar.FolderTreeView.prototype.toggleOpenState = function(row) } else { - var newRows = Scholar.Items.getTreeRows(this._getItemAtRow(row).ref.getID(),'folders'); //Get children + var newRows = Scholar.getCollections(this._getItemAtRow(row).ref.getID()); //Get children for(var i = 0; i < newRows.length; i++) { count++; - this._showItem(new Scholar.ItemGroup('folder',newRows[i]), thisLevel+1, row+i+1); //insert new row + this._showItem(new Scholar.ItemGroup('collection',newRows[i]), thisLevel+1, row+i+1); //insert new row } } this._dataItems[row][1] = !this._dataItems[row][1]; //toggle container open value @@ -117,12 +117,12 @@ Scholar.FolderTreeView.prototype.deleteSelection = function() if(this.selection.count == 0) return; - //collapse open folders + //collapse open collections for(var i=0; i - - - - - @@ -23,4 +18,9 @@ + + + + + \ No newline at end of file diff --git a/chrome/chromeFiles/locale/en-US/scholar/scholar.dtd b/chrome/chromeFiles/locale/en-US/scholar/scholar.dtd index b548d47db..dd1d7762a 100644 --- a/chrome/chromeFiles/locale/en-US/scholar/scholar.dtd +++ b/chrome/chromeFiles/locale/en-US/scholar/scholar.dtd @@ -5,7 +5,7 @@ - + @@ -18,7 +18,7 @@ - + diff --git a/chrome/chromeFiles/skin/default/scholar/overlay.css b/chrome/chromeFiles/skin/default/scholar/overlay.css index d4569f5ed..7b0f3aaff 100644 --- a/chrome/chromeFiles/skin/default/scholar/overlay.css +++ b/chrome/chromeFiles/skin/default/scholar/overlay.css @@ -13,6 +13,7 @@ tree #folders-tree #scholar-tree-splitter { + background: #f5f5f5; } @@ -24,6 +25,7 @@ tree #items-tree #scholar-toolbar { border-bottom: none; + background: #f5f5f5; } #scholar-toolbar toolbarbutton