Closes #424, "Create Zotero Note from Selection" should create a webpage item automatically

Also make "Add Selection to Zotero Note" note not add two newlines before the text if the note is empty
This commit is contained in:
Dan Stillman 2007-01-03 01:41:28 +00:00
parent 0db91db680
commit 09920275ac
3 changed files with 5 additions and 3 deletions

View File

@ -1165,7 +1165,7 @@ var ZoteroPane = new function()
if (itemsView.selection.count == 1 && items[0] && items[0].isNote())
{
var note = items[0].getNote()
items[0].updateNote(note + "\n\n" + text);
items[0].updateNote(note == '' ? text : note + "\n\n" + text);
var noteElem = document.getElementById('zotero-note-editor')
noteElem.focus();
noteElem.id('noteField').inputField.editor.
@ -1242,6 +1242,8 @@ var ZoteroPane = new function()
{
addAttachmentFromPage(false, item.getID(), true);
}
return item.getID();
}

View File

@ -51,7 +51,7 @@
oncommand="ZoteroPane.addTextToNote(window.content.getSelection().toString())"/>
<menuitem id="zotero-context-add-to-new-note" class="menu-iconic"
label="&zotero.contextMenu.addTextToNewNote;"
oncommand="ZoteroPane.newNote(false, false, window.content.getSelection().toString())"/>
oncommand="var itemID = ZoteroPane.addItemFromPage(); ZoteroPane.newNote(false, itemID, window.content.getSelection().toString())"/>
<menuitem id="zotero-context-save-link-as-snapshot" class="menu-iconic"
label="&zotero.contextMenu.saveLinkAsSnapshot;"
oncommand="Zotero.Attachments.importFromURL(window.gContextMenu.linkURL)"/>

View File

@ -1,5 +1,5 @@
<!ENTITY zotero.contextMenu.addTextToCurrentNote "Add Selection to Zotero Note">
<!ENTITY zotero.contextMenu.addTextToNewNote "Create Zotero Note from Selection">
<!ENTITY zotero.contextMenu.addTextToNewNote "Create Zotero Item and Note from Selection">
<!ENTITY zotero.contextMenu.saveLinkAsSnapshot "Save Link As Zotero Snapshot">
<!ENTITY zotero.contextMenu.saveImageAsSnapshot "Save Image As Zotero Snapshot">