diff --git a/chrome/content/zotero/note.js b/chrome/content/zotero/note.js index 0b6c101c1b..45e91c80fe 100644 --- a/chrome/content/zotero/note.js +++ b/chrome/content/zotero/note.js @@ -41,7 +41,6 @@ async function onLoad() { } let itemID = parseInt(io.itemID); - let collectionIDs = io.collectionIDs.split(",").filter(x => x).map(x => parseInt(x)); let parentItemKey = io.parentItemKey; let ref; @@ -65,10 +64,6 @@ async function onLoad() { ref = Zotero.Items.getByLibraryAndKey(parentItemKey); noteEditor.parentItem = ref; } - else if (collectionIDs.length) { - // DEBUG: Was 'collection', but seemingly unused? - noteEditor.collections = Zotero.Collections.get(collectionIDs); - } noteEditor.refresh(); } diff --git a/chrome/content/zotero/xpcom/data/notes.js b/chrome/content/zotero/xpcom/data/notes.js index 738b6f923d..092e582479 100644 --- a/chrome/content/zotero/xpcom/data/notes.js +++ b/chrome/content/zotero/xpcom/data/notes.js @@ -43,7 +43,7 @@ Zotero.Notes = new function () { * @returns {Promise} Instance of Zotero.EditorInstance for the note. * If the note tab is opened in background (unloaded), returns null. */ - this.open = async function (itemID, location, { title, tabIndex, tabID, openInBackground, openInWindow, allowDuplicate, preventJumpback, parentItemKey, collections } = {}) { + this.open = async function (itemID, location, { title, tabIndex, tabID, openInBackground, openInWindow, allowDuplicate, preventJumpback, parentItemKey } = {}) { let { libraryID } = Zotero.Items.getLibraryAndKeyFromID(itemID); let library = Zotero.Libraries.get(libraryID); let win = Zotero.getMainWindow(); @@ -117,14 +117,10 @@ Zotero.Notes = new function () { if (itemID) { // Create a name for this window so we can focus it later - // - // Collection is only used on new notes, so we don't need to - // include it in the name name = 'zotero-note-' + itemID; } - - let collectionIDs = collections ? collections.map(c => c.id).join(',') : ''; - let io = { itemID, parentItemKey, collectionIDs, location, _initPromise: Zotero.Promise.defer() }; + + let io = { itemID, parentItemKey, location, _initPromise: Zotero.Promise.defer() }; Services.ww.openWindow( win, 'chrome://zotero/content/note.xhtml', diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js index d3c3b9ed2d..90c0f03b65 100644 --- a/chrome/content/zotero/zoteroPane.js +++ b/chrome/content/zotero/zoteroPane.js @@ -4787,14 +4787,7 @@ var ZoteroPane = new function () { if (popup) { // TODO: _text_ - let collections = this.getSelectedCollections(); - this.openNote( - null, - { - collections: collections.length ? collections : undefined, - parentKey - } - ); + this.openNote(null, { parentKey }); return null; } @@ -4888,12 +4881,10 @@ var ZoteroPane = new function () { this.openNote = function (itemID, options = { - collections: undefined, parentKey: undefined, openInWindow: undefined }) { let { - collections, parentKey, openInWindow, } = options; @@ -4903,7 +4894,6 @@ var ZoteroPane = new function () { return Zotero.Notes.open(itemID, undefined, { openInWindow, - collections, }); };