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 @@ - +