Fixes #116, Make full screen button text.
Fixes #115, Windows should open with Scholar Pane closed. Fixes #105, search box loses focus after search starts. Retooled the interface a bit, and removed the top toolbar. The close and fullscreen buttons are located to the right of the items toolbar. The item pane cannot be collapsed.
This commit is contained in:
parent
c64e5c841f
commit
785954f4f5
6 changed files with 130 additions and 138 deletions
|
@ -25,6 +25,8 @@ Scholar.CollectionTreeView.prototype.setTree = function(treebox)
|
|||
if(this._treebox)
|
||||
return;
|
||||
this._treebox = treebox;
|
||||
//select Library
|
||||
this.selection.select(0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -56,9 +56,6 @@ ScholarItemPane = new function()
|
|||
*/
|
||||
function viewItem(thisItem)
|
||||
{
|
||||
if(document.commandDispatcher.focusedElement)
|
||||
document.commandDispatcher.focusedElement.blur();
|
||||
|
||||
_itemBeingEdited = thisItem;
|
||||
|
||||
reloadFields();
|
||||
|
@ -257,6 +254,7 @@ ScholarItemPane = new function()
|
|||
t.setAttribute('value',value);
|
||||
t.setAttribute('fieldname',fieldName);
|
||||
t.setAttribute('flex','1');
|
||||
t.className = 'fieldeditor';
|
||||
|
||||
var box = elem.parentNode;
|
||||
box.replaceChild(t,elem);
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
<script src="itemPane.js"/>
|
||||
<tabbox id="scholar-view-item" height="1000">
|
||||
<tabbox id="scholar-view-item" flex="1">
|
||||
<tabs>
|
||||
<tab label="&tabs.info.label;"/>
|
||||
<tab label="&tabs.notes.label;"/>
|
||||
|
|
|
@ -35,9 +35,7 @@ var ScholarPane = new function()
|
|||
collectionsView = new Scholar.CollectionTreeView();
|
||||
document.getElementById('collections-tree').view = collectionsView;
|
||||
|
||||
//select Library
|
||||
collectionsView.selection.select(0);
|
||||
|
||||
/*
|
||||
if(window.opener)
|
||||
{
|
||||
var pane = window.opener.document.getElementById('scholar-pane');
|
||||
|
@ -48,6 +46,7 @@ var ScholarPane = new function()
|
|||
toggleDisplay();
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
//Create the add menu with each item type
|
||||
var addMenu = document.getElementById('tb-add').firstChild;
|
||||
|
@ -76,10 +75,10 @@ var ScholarPane = new function()
|
|||
*/
|
||||
function toggleDisplay()
|
||||
{
|
||||
var visible = document.getElementById('scholar-pane').getAttribute('collapsed') == 'true';
|
||||
var visible = document.getElementById('scholar-pane').getAttribute('hidden') == 'true';
|
||||
|
||||
document.getElementById('scholar-pane').setAttribute('collapsed',!visible);
|
||||
document.getElementById('scholar-splitter').setAttribute('collapsed',!visible);
|
||||
document.getElementById('scholar-pane').setAttribute('hidden',!visible);
|
||||
document.getElementById('scholar-splitter').setAttribute('hidden',!visible);
|
||||
|
||||
if(!visible)
|
||||
document.getElementById('content').setAttribute('collapsed', false);
|
||||
|
@ -89,6 +88,7 @@ var ScholarPane = new function()
|
|||
{
|
||||
var visible = document.getElementById('content').getAttribute('collapsed') == 'true';
|
||||
document.getElementById('content').setAttribute('collapsed', !visible);
|
||||
document.getElementById('scholar-splitter').setAttribute('hidden', !visible);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -15,14 +15,14 @@
|
|||
<script src="fileInterface.js"/>
|
||||
|
||||
<commandset id="mainCommandSet">
|
||||
<command id="cmd_scholar_newItem" oncommand="ScholarPane.newItem(1);"/>
|
||||
<command id="cmd_scholar_newItem" oncommand="ScholarPane.newItem(2);"/>
|
||||
<command id="cmd_scholar_newCollection" oncommand="ScholarPane.newCollection();"/>
|
||||
<command id="cmd_scholar_search" oncommand="ScholarPane.search();"/>
|
||||
</commandset>
|
||||
|
||||
<vbox id="appcontent">
|
||||
<splitter id="scholar-splitter" resizebefore="closest" resizeafter="closest" persist="collapsed"/>
|
||||
<vbox id="scholar-pane" flex="1" persist="height collapsed">
|
||||
<splitter id="scholar-splitter" resizebefore="closest" resizeafter="closest" hidden="true"/>
|
||||
<hbox id="scholar-pane" hidden="true" flex="1">
|
||||
<popupset>
|
||||
<popup id="scholar-collectionmenu" onpopupshowing="ScholarPane.buildCollectionContextMenu();">
|
||||
<menuitem label="&toolbar.newCollection.label;" command="cmd_scholar_newCollection"/>
|
||||
|
@ -36,16 +36,7 @@
|
|||
<menuitem oncommand="ScholarPane.deleteSelectedItem();"/>
|
||||
</popup>
|
||||
</popupset>
|
||||
<toolbar align="end">
|
||||
<label value="Scholar" id="scholar-toolbar-name"/>
|
||||
<label value="1.0 Alpha"/>
|
||||
<label class="text-link" value="About..." onclick="window.openDialog('chrome://scholar/content/about.xul','about','chrome,modal');"/>
|
||||
<spacer flex="1"/>
|
||||
<toolbarbutton id="tb-fullscreen" tooltiptext="Toggle Fullscreen" oncommand="ScholarPane.fullScreen();"/>
|
||||
<toolbarbutton class="tabs-closebutton" oncommand="ScholarPane.toggleDisplay()"/>
|
||||
</toolbar>
|
||||
<hbox flex="1">
|
||||
<vbox id="collections-pane" persist="width">
|
||||
<vbox id="collections-pane" persist="width" flex="1">
|
||||
<toolbar>
|
||||
<toolbarbutton id="tb-collection-add" tooltiptext="&toolbar.newCollection.label;" command="cmd_scholar_newCollection"/>
|
||||
<toolbarbutton id="tb-collection-rename" tooltiptext="&toolbar.renameCollection.label;" oncommand="ScholarPane.renameSelectedCollection();" disabled="true"/>
|
||||
|
@ -148,17 +139,24 @@
|
|||
<treechildren/>
|
||||
</tree>
|
||||
</vbox>
|
||||
<splitter id="scholar-view-splitter" collapse="after" persist="state"><grippy/></splitter>
|
||||
<deck id="item-pane" selectedIndex="0">
|
||||
<box pack="center" align="center"><label id="scholar-view-selected-label"/></box>
|
||||
<splitter id="scholar-view-splitter" resizebefore="closest" resizeafter="closest"/>
|
||||
<vbox>
|
||||
<toolbar align="right">
|
||||
<toolbarbutton id="tb-fullscreen" label="Toggle Fullscreen" oncommand="ScholarPane.fullScreen();"/>
|
||||
<toolbarbutton class="tabs-closebutton" oncommand="ScholarPane.toggleDisplay()"/>
|
||||
</toolbar>
|
||||
<deck id="item-pane" selectedIndex="0" flex="1">
|
||||
<box pack="center" align="center">
|
||||
<label id="scholar-view-selected-label"/>
|
||||
</box>
|
||||
<tabbox id="scholar-view-item" flex="1"/>
|
||||
<vbox id="scholar-view-note" flex="1">
|
||||
<noteeditor id="scholar-note-editor" flex="1"/>
|
||||
<button label="Edit in a separate window" oncommand="ScholarPane.openNoteWindow(this.getAttribute('noteID'));"/>
|
||||
</vbox>
|
||||
</deck>
|
||||
</hbox>
|
||||
</vbox>
|
||||
</hbox>
|
||||
</vbox>
|
||||
|
||||
<statusbar id="status-bar">
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
vbox #scholar-pane
|
||||
#scholar-pane
|
||||
{
|
||||
background: #f5f5f5;
|
||||
min-height: 150px;
|
||||
|
@ -8,7 +8,6 @@ vbox #scholar-pane
|
|||
#collections-pane
|
||||
{
|
||||
min-width: 150px;
|
||||
max-width: 200px;
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
|
@ -17,7 +16,7 @@ vbox #scholar-pane
|
|||
margin-right: 5px;
|
||||
}
|
||||
|
||||
#scholar-tree-splitter
|
||||
#scholar-pane splitter
|
||||
{
|
||||
background: #f5f5f5;
|
||||
}
|
||||
|
@ -60,11 +59,6 @@ vbox #scholar-pane
|
|||
font-size: larger;
|
||||
}
|
||||
|
||||
#tb-fullscreen
|
||||
{
|
||||
list-style-image: url('chrome://scholar/skin/toolbar-fullscreen.png');
|
||||
}
|
||||
|
||||
#tb-collection-add
|
||||
{
|
||||
list-style-image: url('chrome://scholar/skin/toolbar-collection-add.png');
|
||||
|
|
Loading…
Add table
Reference in a new issue