- Note icon in toolbar no longer opens a new window by default, though it does if you hold down the shift key when clicking (let's hear it for undocumented features)

- Removed Note from New Item (+) menu
- Replaced "#" column with "+", at Dan C.'s suggestion
This commit is contained in:
Dan Stillman 2006-10-02 06:44:16 +00:00
parent f27d748246
commit 40c9e620e7
4 changed files with 23 additions and 11 deletions

View file

@ -84,7 +84,7 @@ var ScholarPane = new function()
var itemsTree = document.getElementById('items-tree');
itemsTree.controllers.appendController(new Scholar.ItemTreeCommandController(itemsTree));
// Create the add menu with each item type
// Create the New Item (+) menu with each item type
var addMenu = document.getElementById('tb-add').firstChild;
var separator = document.getElementById('tb-add').firstChild.firstChild;
var moreMenu = document.getElementById('tb-add-more');
@ -643,13 +643,25 @@ var ScholarPane = new function()
}
}
function newNote()
function newNote(popup)
{
var c = getSelectedCollection();
if(c)
openNoteWindow(null, c.getID());
if (!popup)
{
var item = this.newItem(Scholar.ItemTypes.getID('note'));
document.getElementById('scholar-note-editor').focus();
}
else
openNoteWindow();
{
var c = getSelectedCollection();
if (c)
{
openNoteWindow(null, c.getID());
}
else
{
openNoteWindow();
}
}
}
function openNoteWindow(id, parent)

View file

@ -92,7 +92,7 @@
<vbox id="items-pane" persist="width" flex="1">
<toolbar align="center">
<toolbarbutton id="tb-add" tooltiptext="&toolbar.newItem.label;" type="menu">
<!-- Built in overlay.js::onLoad() -->
<!-- New Item drop-down built in overlay.js::onLoad() -->
<menupopup>
<menuseparator/>
<menuitem label="&toolbar.attachment.linked;" oncommand="ScholarPane.addAttachmentFromDialog(true);"/>
@ -107,7 +107,7 @@
<toolbarseparator/>
<toolbarbutton id="tb-link-page" tooltiptext="&toolbar.attachment.weblink;" oncommand="ScholarPane.addAttachmentFromPage(true)"/>
<toolbarbutton id="tb-snapshot-page" tooltiptext="&toolbar.attachment.snapshot;" oncommand="ScholarPane.addAttachmentFromPage()"/>
<toolbarbutton id="tb-note-add" tooltiptext="&toolbar.note.standalone;" oncommand="ScholarPane.newNote();"/>
<toolbarbutton id="tb-note-add" tooltiptext="&toolbar.note.standalone;" oncommand="ScholarPane.newNote(event.shiftKey);"/>
<spacer flex="1"/>
<label value="&toolbar.search.label;" control="tb-search"/>
<textbox id="tb-search" type="timed" timeout="250" command="cmd_scholar_search" dir="reverse" onkeypress="if(event.keyCode == event.DOM_VK_ESCAPE) { this.value = ''; this.doCommand('cmd_scholar_search'); return false; }">

View file

@ -12,7 +12,7 @@
<!ENTITY items.creator_column "Creator">
<!ENTITY items.source_column "Source">
<!ENTITY items.rights_column "Rights">
<!ENTITY items.numChildren_column "#">
<!ENTITY items.numChildren_column "+">
<!ENTITY items.dateAdded_column "Date Added">
<!ENTITY items.dateModified_column "Date Modified">

View file

@ -1,4 +1,4 @@
-- 4
-- 5
-- This file creates system tables that can be safely wiped and reinitialized
-- at any time, as long as existing ids are preserved.
@ -115,7 +115,7 @@
INSERT INTO "fieldFormats" VALUES(2, '[0-9]*', 1);
INSERT INTO "fieldFormats" VALUES(3, '[0-9]{4}', 1);
INSERT INTO itemTypes VALUES (1,'note',NULL,2);
INSERT INTO itemTypes VALUES (1,'note',NULL,0);
INSERT INTO itemTypes VALUES (2,'book',NULL,2);
INSERT INTO itemTypes VALUES (3,'bookSection',2,2);
INSERT INTO itemTypes VALUES (4,'journalArticle',NULL,2);