From fdd91affd9816657c37fe0000bc8ef8356c99694 Mon Sep 17 00:00:00 2001 From: Aurimas Vinckevicius Date: Tue, 28 Jul 2015 22:59:32 -0500 Subject: [PATCH] Debugging code for checking manually modified citations Re https://forums.zotero.org/discussion/50701/cant-insert-citationzotero-asks-to-modify-all-my-citations/ --- chrome/content/zotero/xpcom/integration.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/chrome/content/zotero/xpcom/integration.js b/chrome/content/zotero/xpcom/integration.js index 195b847498..d9dc3696dc 100644 --- a/chrome/content/zotero/xpcom/integration.js +++ b/chrome/content/zotero/xpcom/integration.js @@ -1584,6 +1584,10 @@ Zotero.Integration.Fields.prototype._updateDocument = function(forceCitations, f var plainCitation = field.getText(); if(plainCitation !== citation.properties.plainCitation) { // Citation manually modified; ask user if they want to save changes + Zotero.debug("[_updateDocument] Attempting to update manually modified citation.\n" + + "Original: " + citation.properties.plainCitation + "\n" + + "Current: " + plainCitation + ); field.select(); var result = this._doc.displayAlert( Zotero.getString("integration.citationChanged")+"\n\n"+Zotero.getString("integration.citationChanged.description"), @@ -1726,6 +1730,11 @@ Zotero.Integration.Fields.prototype.addEditCitation = function(field) { || (citation.properties.plainCitation && field.getText() !== citation.properties.plainCitation)) { this._doc.activate(); + Zotero.debug("[addEditCitation] Attempting to update manually modified citation.\n" + + "citation.properties.dontUpdate: " + citation.properties.dontUpdate + "\n" + + "Original: " + citation.properties.plainCitation + "\n" + + "Current: " + field.getText() + ); if(!this._doc.displayAlert(Zotero.getString("integration.citationChanged.edit"), Components.interfaces.zoteroIntegrationDocument.DIALOG_ICON_WARNING, Components.interfaces.zoteroIntegrationDocument.DIALOG_BUTTONS_OK_CANCEL)) {