From cc195532c068222710b9dd1396993e0caba681d9 Mon Sep 17 00:00:00 2001 From: David Norton Date: Tue, 23 May 2006 21:59:31 +0000 Subject: [PATCH] Took out singular ('item' and 'folder') from getTreeRows(). Basic tree traversal in single-window mode. --- .../content/scholar/data_access.js | 2 - chrome/chromeFiles/content/scholar/scholar.js | 47 ++++- .../chromeFiles/content/scholar/scholar.xul | 29 ++- .../chromeFiles/content/scholar/treeView.js | 186 ++++++++++++++++++ 4 files changed, 253 insertions(+), 11 deletions(-) diff --git a/chrome/chromeFiles/content/scholar/data_access.js b/chrome/chromeFiles/content/scholar/data_access.js index cf51dd04a..17ad7c405 100644 --- a/chrome/chromeFiles/content/scholar/data_access.js +++ b/chrome/chromeFiles/content/scholar/data_access.js @@ -920,11 +920,9 @@ Scholar.Items = new function(){ + 'WHERE parentFolderID=' + parent; switch (type){ - case 'folder': case 'folders': sql += ' AND isFolder=1'; break; - case 'item': case 'items': sql += ' AND isFolder=0'; break; diff --git a/chrome/chromeFiles/content/scholar/scholar.js b/chrome/chromeFiles/content/scholar/scholar.js index b9b24d64a..4c2a8e8d4 100644 --- a/chrome/chromeFiles/content/scholar/scholar.js +++ b/chrome/chromeFiles/content/scholar/scholar.js @@ -1,4 +1,49 @@ +var foldersView; +var itemsView; + function init() { - // + foldersView = new Scholar.TreeView(0); //pass params here? + document.getElementById('folders-tree').view = foldersView; + itemsView = new Scholar.TreeView(0); + document.getElementById('items-tree').view = itemsView; + + var addMenu = document.getElementById('tb-add').firstChild; + var itemTypes = Scholar.ItemTypes.getTypes(); + for(var i = 0; i - + + +