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:
parent
0db91db680
commit
09920275ac
|
@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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)"/>
|
||||
|
|
|
@ -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">
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user