commit f8f403eca49346e447328c5e1d635024107a82ba
parent 2827f70daaf571765a37a5f4a1ddda8f13a1b76f
Author: Adomas VenĨkauskas <adomas.ven@gmail.com>
Date: Tue, 29 Aug 2017 16:01:04 +0300
Display a refresh notice instead of bibliography when citing delayed
Diffstat:
2 files changed, 13 insertions(+), 0 deletions(-)
diff --git 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
@@ -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"