www

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

commit 40c9e620e70b56723b0dd522ea68c15de66d2709
parent f27d748246f112752bcc2795ace3759e40600b60
Author: Dan Stillman <dstillman@zotero.org>
Date:   Mon,  2 Oct 2006 06:44:16 +0000

- 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


Diffstat:
Mchrome/chromeFiles/content/scholar/overlay.js | 24++++++++++++++++++------
Mchrome/chromeFiles/content/scholar/overlay.xul | 4++--
Mchrome/chromeFiles/locale/en-US/scholar/scholar.dtd | 2+-
Msystem.sql | 4++--
4 files changed, 23 insertions(+), 11 deletions(-)

diff --git a/chrome/chromeFiles/content/scholar/overlay.js b/chrome/chromeFiles/content/scholar/overlay.js @@ -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) diff --git a/chrome/chromeFiles/content/scholar/overlay.xul b/chrome/chromeFiles/content/scholar/overlay.xul @@ -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; }"> diff --git a/chrome/chromeFiles/locale/en-US/scholar/scholar.dtd b/chrome/chromeFiles/locale/en-US/scholar/scholar.dtd @@ -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"> diff --git a/system.sql b/system.sql @@ -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);