Skip to content

Commit

Permalink
Display a refresh notice instead of bibliography when citing delayed
Browse files Browse the repository at this point in the history
  • Loading branch information
adomasven committed Jan 3, 2018
1 parent 2827f70 commit f8f403e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions chrome/content/zotero/xpcom/integration.js
Expand Up @@ -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;
}
}

});


Expand Down
1 change: 1 addition & 0 deletions chrome/locale/en-US/zotero/zotero.properties
Expand Up @@ -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"
Expand Down

0 comments on commit f8f403e

Please sign in to comment.