Merge pull request #814 from aurimasv/citation-update-debug
Debugging code for checking manually modified citations
This commit is contained in:
commit
b9cdf3f6d3
1 changed files with 9 additions and 0 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Reference in a new issue