Fix note insertion dialog not appearing when classic mode is enabled.

Closes #2463
This commit is contained in:
Adomas Venčkauskas 2022-03-23 11:58:06 +02:00
parent 1b124bff2d
commit c083c69be1

View file

@ -1429,21 +1429,19 @@ Zotero.Integration.Session.prototype.cite = async function (field, addNote=false
Zotero.debug(`Editing citation:`);
Zotero.debug(JSON.stringify(citation.toJSON()));
if (Zotero.Prefs.get("integration.useClassicAddCitationDialog")) {
var mode = (!Zotero.isMac && Zotero.Prefs.get('integration.keepAddCitationDialogRaised')
? 'popup' : 'alwaysRaised')+',resizable=false';
if (addNote) {
Zotero.Integration.displayDialog('chrome://zotero/content/integration/insertNoteDialog.xul',
mode, io);
}
else if (Zotero.Prefs.get("integration.useClassicAddCitationDialog")) {
Zotero.Integration.displayDialog('chrome://zotero/content/integration/addCitationDialog.xul',
'alwaysRaised,resizable', io);
}
else {
var mode = (!Zotero.isMac && Zotero.Prefs.get('integration.keepAddCitationDialogRaised')
? 'popup' : 'alwaysRaised')+',resizable=false';
if (addNote) {
Zotero.Integration.displayDialog('chrome://zotero/content/integration/insertNoteDialog.xul',
mode, io);
}
else {
Zotero.Integration.displayDialog('chrome://zotero/content/integration/quickFormat.xul',
mode, io);
}
Zotero.Integration.displayDialog('chrome://zotero/content/integration/quickFormat.xul',
mode, io);
}
// -------------------