From f8f403eca49346e447328c5e1d635024107a82ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adomas=20Ven=C4=8Dkauskas?= Date: Tue, 29 Aug 2017 16:01:04 +0300 Subject: [PATCH] Display a refresh notice instead of bibliography when citing delayed --- chrome/content/zotero/xpcom/integration.js | 12 ++++++++++++ chrome/locale/en-US/zotero/zotero.properties | 1 + 2 files changed, 13 insertions(+) diff --git a/chrome/content/zotero/xpcom/integration.js b/chrome/content/zotero/xpcom/integration.js index d386fa2dc..2d82a8d04 100644 --- a/chrome/content/zotero/xpcom/integration.js +++ b/chrome/content/zotero/xpcom/integration.js @@ -1604,6 +1604,18 @@ Zotero.Integration.Session.prototype.writeDelayedCitation = Zotero.Promise.corou field.code = citation.serialize(); field.text = text; field.writeToDoc(); + + // Update bibliography with a static string + var fields = yield this.fields.get(); + var bibliographyField; + for (let i = fields.length-1; i >= 0; i--) { + let field = Zotero.Integration.Field.loadExisting(fields[i]); + if (field.type == INTEGRATION_TYPE_BIBLIOGRAPHY) { + field.setText(Zotero.getString('integration.delayCitationUpdates.bibliography'), false) + break; + } + } + }); diff --git a/chrome/locale/en-US/zotero/zotero.properties b/chrome/locale/en-US/zotero/zotero.properties index fe621bbb9..e9e3ac3ad 100644 --- a/chrome/locale/en-US/zotero/zotero.properties +++ b/chrome/locale/en-US/zotero/zotero.properties @@ -871,6 +871,7 @@ integration.citationChanged = You have modified this citation since Zotero ge integration.citationChanged.description = Clicking "Yes" will prevent Zotero from updating this citation if you add additional citations, switch styles, or modify the item to which it refers. Clicking "No" will erase your changes. integration.citationChanged.edit = You have modified this citation since Zotero generated it. Editing will clear your modifications. Do you want to continue? integration.delayCitationUpdates.alert = Updating citations in this document is taking a long time. Would you like to delay citation updates until manual refresh?\n\nYou can change this setting later in the document preferences. +integration.delayCitationUpdates.bibliography = Delayed citing mode is enabled. To see the bibliography click Refresh in Zotero plugin. styles.install.title = Install Style styles.install.unexpectedError = An unexpected error occurred while installing "%1$S"