Some toggling options for the Scholar pane (persists).
This commit is contained in:
parent
7f1d3edf69
commit
041e607dd7
4 changed files with 18 additions and 6 deletions
|
@ -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);
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue