www

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

commit 041e607dd7e1f364fc47da595fbf18369a9e1c87
parent 7f1d3edf69fa5e7d094967782c50258ee7302dd3
Author: David Norton <david@nortoncrew.com>
Date:   Wed, 31 May 2006 22:01:31 +0000

Some toggling options for the Scholar pane (persists).

Diffstat:
Mchrome/chromeFiles/content/scholar/overlay.js | 9+++++++++
Mchrome/chromeFiles/content/scholar/overlay.xul | 11++++++-----
Mchrome/chromeFiles/content/scholar/view.xul | 1+
Mchrome/chromeFiles/skin/default/scholar/overlay.css | 3++-
4 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/chrome/chromeFiles/content/scholar/overlay.js b/chrome/chromeFiles/content/scholar/overlay.js @@ -6,6 +6,7 @@ var ScholarPane = new function() var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService); this.init = init; + this.toggleScholar = toggleScholar; this.newItem = newItem; this.newFolder = newFolder; this.folderSelected = folderSelected; @@ -30,6 +31,14 @@ var ScholarPane = new function() } } + function toggleScholar() + { + var visible = document.getElementById('scholar-pane').getAttribute('collapsed') == 'true'; + + document.getElementById('scholar-pane').setAttribute('collapsed',!visible); + document.getElementById('scholar-splitter').setAttribute('collapsed',!visible); + } + function newItem(typeID) { alert("new item of type: "+typeID); diff --git a/chrome/chromeFiles/content/scholar/overlay.xul b/chrome/chromeFiles/content/scholar/overlay.xul @@ -18,7 +18,7 @@ <command id="cmd_scholar_search" oncommand="ScholarPane.search();"/> <vbox id="appcontent"> - <vbox id="scholar-pane" position="1" persist="height"> + <vbox id="scholar-pane" position="1" persist="height collapsed"> <hbox flex="1"> <tree id="folders-tree" style="-moz-user-focus: ignore;" hidecolumnpicker="true" @@ -74,7 +74,7 @@ <treechildren/> </tree> </hbox> - <toolbar id="scholar-toolbar"> + <toolbar id="scholar-toolbar" align="center"> <toolbarbutton label="&menuitem.newFolder.label;" command="cmd_scholar_newFolder"/> <toolbarbutton id="tb-add" label="&menuitem.newItem.label;" type="menu"> <menupopup> @@ -83,13 +83,14 @@ <spacer flex="1"/> <label value="Search:" control="tb-search"/> <textbox id="tb-search" type="timed" timeout="500" command="cmd_scholar_search"/> + <toolbarbutton class="tabs-closebutton" oncommand="ScholarPane.toggleScholar()"/> </toolbar> </vbox> - <splitter id="scholar-splitter" resizebefore="closest" resizeafter="closest" position="2"/> + <splitter id="scholar-splitter" resizebefore="closest" resizeafter="closest" position="2" persist="collapsed"/> </vbox> <statusbar id="status-bar"> - <statusbarpanel id="scholar-load-status" label="Scholar is NOT loaded"/> + <statusbarpanel id="scholar-load-status" label="Scholar is NOT loaded" onclick="ScholarPane.toggleScholar();"/> </statusbar> <script> @@ -103,7 +104,7 @@ <menupopup id="menu_ToolsPopup"> <menuseparator id="scholarSeparator" insertbefore="devToolsSeparator"/> <menuitem id="tools-scholar" insertbefore="devToolsSeparator" - oncommand="document.getElementById('scholar-pane').collapsed='false';" label="Scholar" + oncommand="ScholarPane.toggleScholar();" label="Scholar" key="key_openScholar"/> </menupopup> diff --git a/chrome/chromeFiles/content/scholar/view.xul b/chrome/chromeFiles/content/scholar/view.xul @@ -1,6 +1,7 @@ <?xml version="1.0"?> <?xml-stylesheet href="chrome://scholar/skin/scholar.css" type="text/css"?> <?xml-stylesheet href="chrome://scholar/skin/view.css" type="text/css"?> +<?xml-stylesheet href="chrome://browser/content/browser.css" type="text/css"?> <page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> diff --git a/chrome/chromeFiles/skin/default/scholar/overlay.css b/chrome/chromeFiles/skin/default/scholar/overlay.css @@ -2,6 +2,7 @@ vbox #scholar-pane { background: #f5f5f5; min-height: 150px; + padding: 4px; } tree #folders-tree @@ -22,7 +23,7 @@ tree #items-tree #scholar-toolbar { - + border-bottom: none; } #scholar-toolbar toolbarbutton