diff --git a/chrome/content/zotero/integration/editBibliographyDialog.js b/chrome/content/zotero/integration/editBibliographyDialog.js index 3f9d1e137..ee32a3f39 100644 --- a/chrome/content/zotero/integration/editBibliographyDialog.js +++ b/chrome/content/zotero/integration/editBibliographyDialog.js @@ -302,7 +302,7 @@ var Zotero_Bibliography_Dialog = new function () { */ function _loadItems() { var itemIDs = bibEditInterface.bibliography[0].entry_ids; - var items = Zotero.Items.get(itemIDs); + var items = [Zotero.Cite.getItem(itemID[0]) for each(itemID in itemIDs)]; // delete all existing items from list var itemList = document.getElementById("item-list"); diff --git a/chrome/content/zotero/preferences/preferences.js b/chrome/content/zotero/preferences/preferences.js index c8adf326a..91ba393b3 100644 --- a/chrome/content/zotero/preferences/preferences.js +++ b/chrome/content/zotero/preferences/preferences.js @@ -74,6 +74,16 @@ var Zotero_Preferences = { function init() { + if(Zotero.isConnector) { + Zotero.activateStandalone(); + window.close(); + return; + } + + observerService.addObserver(function() { + if(Zotero.isConnector) window.close(); + }, "zotero-reloaded", false); + // Display the appropriate modifier keys for the platform var rows = document.getElementById('zotero-prefpane-keys').getElementsByTagName('row'); for (var i=0; i -1) { + plural = CSL.evaluateStringPluralism(Item[myterm]); + } else { + if (!state.tmp.shadow_numbers[myterm]) { + state.processNumber(false, Item, myterm); + } + plural = state.tmp.shadow_numbers[myterm].plural; } - } else if (["page", "page-first"].indexOf(node.variables[0]) > -1) { - plural = CSL.evaluateStringPluralism(Item[myterm]); - } else { - if (!state.tmp.shadow_numbers[myterm]) { - state.processNumber(false, Item, myterm); - } - plural = state.tmp.shadow_numbers[myterm].plural; } return CSL.castLabel(state, node, myterm, plural); }; diff --git a/chrome/content/zotero/xpcom/integration.js b/chrome/content/zotero/xpcom/integration.js index 03e6160da..c180649d4 100644 --- a/chrome/content/zotero/xpcom/integration.js +++ b/chrome/content/zotero/xpcom/integration.js @@ -1579,7 +1579,7 @@ Zotero.Integration.Session = function(doc) { this.omittedItems = {}; this.embeddedItems = {}; this.embeddedZoteroItems = {}; - this.embeddedItemsByURI = {}; + this.embeddedZoteroItemsByURI = {}; this.customBibliographyText = {}; this.reselectedItems = {}; this.resetRequest(doc); @@ -1613,9 +1613,9 @@ Zotero.Integration.Session.prototype.resetRequest = function(doc) { * @param data {Zotero.Integration.DocumentData} */ Zotero.Integration.Session.prototype.setData = function(data) { - var oldStyleID = (this.data && this.data.style.styleID ? this.data.style.styleID : false); + var oldStyle = (this.data && this.data.style ? this.data.style : false); this.data = data; - if(data.style.styleID && oldStyleID != data.style.styleID) { + if(data.style.styleID && (!oldStyle || oldStyle.styleID != data.style.styleID)) { this.styleID = data.style.styleID; try { var getStyle = Zotero.Styles.get(data.style.styleID); @@ -1631,6 +1631,8 @@ Zotero.Integration.Session.prototype.setData = function(data) { } return true; + } else if(oldStyle) { + data.style = oldStyle; } return false; } @@ -1900,37 +1902,25 @@ Zotero.Integration.Session.prototype.lookupItems = function(citation, index) { } if(!zoteroItem) { - // check embedded items - if(citationItem.uris) { - var success = false; - for(var j=0, m=citationItem.uris.length; j