diff --git a/chrome/content/zotero/bindings/itembox.xml b/chrome/content/zotero/bindings/itembox.xml index 622fd0b66..d004a9cc0 100644 --- a/chrome/content/zotero/bindings/itembox.xml +++ b/chrome/content/zotero/bindings/itembox.xml @@ -1745,7 +1745,7 @@ this._addCreatorRow = false; //Filter out bad names - var nameArray = [tempName for each(tempName in rawNameArray) if(tempName)]; + var nameArray = rawNameArray.filter(name => name); //If not adding names at the end of the creator list, make new creator //entries and then shift down existing creators. diff --git a/chrome/content/zotero/fileInterface.js b/chrome/content/zotero/fileInterface.js index 5c2936a2f..0b3f58a28 100644 --- a/chrome/content/zotero/fileInterface.js +++ b/chrome/content/zotero/fileInterface.js @@ -346,7 +346,7 @@ var Zotero_File_Interface = new function() { // Add items to import collection if(importCollection) { yield Zotero.DB.executeTransaction(function* () { - yield importCollection.addItems([item.id for (item of translation.newItems)]); + yield importCollection.addItems(translation.newItems.map(item => item.id)); for(let i=0; i ({ id: item.id })), + properties: {} + }; // add HTML var bibliography = style.previewCitationCluster(citation, [], [], "html"); diff --git a/chrome/content/zotero/integration/editBibliographyDialog.js b/chrome/content/zotero/integration/editBibliographyDialog.js index f9663dde2..067bedcbe 100644 --- a/chrome/content/zotero/integration/editBibliographyDialog.js +++ b/chrome/content/zotero/integration/editBibliographyDialog.js @@ -99,7 +99,7 @@ var Zotero_Bibliography_Dialog = new function () { _addButton.disabled = true; _removeButton.disabled = false; _updateRevertButtonStatus(); - [_itemList.toggleItemSelection(item) for each(item in itemsToSelect)]; + itemsToSelect.forEach(item => _itemList.toggleItemSelection(item)); _itemList.ensureIndexIsVisible(itemsToSelect[0]); } _suppressAllSelectEvents = false; diff --git a/chrome/content/zotero/integration/quickFormat.js b/chrome/content/zotero/integration/quickFormat.js index ead6a5b3d..ef2465049 100644 --- a/chrome/content/zotero/integration/quickFormat.js +++ b/chrome/content/zotero/integration/quickFormat.js @@ -303,9 +303,13 @@ var Zotero_QuickFormat = new function () { citedItemsMatchingSearch = []; for(var i=0, iCount=citedItems.length; i { + creator.ref.firstName + " " + creator.ref.lastName + }) + .concat([item.getField("title"), item.getField("date", true, true).substr(0, 4)]) + .join(" "); // See if words match for(var j=0, jCount=splits.length; j