From 40c9e620e70b56723b0dd522ea68c15de66d2709 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Mon, 2 Oct 2006 06:44:16 +0000 Subject: [PATCH] - 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 --- chrome/chromeFiles/content/scholar/overlay.js | 24 ++++++++++++++----- .../chromeFiles/content/scholar/overlay.xul | 4 ++-- .../locale/en-US/scholar/scholar.dtd | 2 +- system.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 index 783287f67d..c8ba510831 100644 --- 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 index 73c4f8a3c4..3284cc93ad 100644 --- a/chrome/chromeFiles/content/scholar/overlay.xul +++ b/chrome/chromeFiles/content/scholar/overlay.xul @@ -92,7 +92,7 @@ - + @@ -107,7 +107,7 @@ - +