From 233a2414e70ee8ae483e7c1b780df0f52ba7dbb1 Mon Sep 17 00:00:00 2001 From: David Norton Date: Tue, 30 May 2006 22:06:33 +0000 Subject: [PATCH] Some temporary viewing in-browser. --- chrome/chromeFiles/content/scholar/overlay.js | 93 +++++++++++++++++++ .../chromeFiles/content/scholar/overlay.xul | 81 +++++++++++++++- 2 files changed, 173 insertions(+), 1 deletion(-) create mode 100644 chrome/chromeFiles/content/scholar/overlay.js diff --git a/chrome/chromeFiles/content/scholar/overlay.js b/chrome/chromeFiles/content/scholar/overlay.js new file mode 100644 index 0000000000..4e751e6c8c --- /dev/null +++ b/chrome/chromeFiles/content/scholar/overlay.js @@ -0,0 +1,93 @@ +var ScholarPane = new function() +{ + + var foldersView; + var itemsView; + var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService); + + this.init = init; + this.newItem = newItem; + this.newFolder = newFolder; + this.folderSelected = folderSelected; + this.itemSelected = itemSelected; + this.deleteSelection = deleteSelection; + this.search = search; + + function init() + { + foldersView = new Scholar.TreeView(0); //pass params here? + document.getElementById('folders-tree').view = foldersView; + itemsView = new Scholar.ItemTreeView(0); + document.getElementById('items-tree').view = itemsView; + + var addMenu = document.getElementById('tb-add').firstChild; + var itemTypes = Scholar.ItemTypes.getTypes(); + for(var i = 0; i 0 && confirm("Are you sure you want to delete the selected items?")) + itemsView.deleteSelection(); + } + + function search() + { + //TO DO: reload items tree with a search instead of a root folder + alert(document.getElementById('tb-search').value); + } +} + +window.addEventListener("load", function(e) { ScholarPane.init(e); }, false); \ No newline at end of file diff --git a/chrome/chromeFiles/content/scholar/overlay.xul b/chrome/chromeFiles/content/scholar/overlay.xul index cfa3480c87..cced40b6c6 100644 --- a/chrome/chromeFiles/content/scholar/overlay.xul +++ b/chrome/chromeFiles/content/scholar/overlay.xul @@ -8,6 +8,85 @@