mirror of
https://github.com/zotero/zotero.git
synced 2026-10-06 02:50:03 +00:00
Asyncify errorReport.xhtml
This commit is contained in:
parent
0937d47721
commit
499ce2709c
1 changed files with 8 additions and 8 deletions
|
|
@ -35,15 +35,15 @@
|
|||
var diagnosticInfo = false;
|
||||
|
||||
|
||||
this.init = Zotero.Promise.coroutine(function* () {
|
||||
this.init = async function () {
|
||||
// Allow Continue button to be populated
|
||||
yield Zotero.Promise.delay(100);
|
||||
await Zotero.Promise.delay(100);
|
||||
|
||||
var wizard = document.querySelector('wizard');
|
||||
var continueButton = wizard.getButton('next');
|
||||
continueButton.disabled = true;
|
||||
|
||||
diagnosticInfo = yield Zotero.getSystemInfo();
|
||||
diagnosticInfo = await Zotero.getSystemInfo();
|
||||
var errorDataText = errorData.length
|
||||
? data.errorData.join('\n\n')
|
||||
: Zotero.getString('errorReport.noErrorsLogged', Zotero.appName);
|
||||
|
|
@ -69,9 +69,9 @@
|
|||
|
||||
var pageSending = document.querySelector('wizardpage[pageid="report-sending"]');
|
||||
pageSending.addEventListener('pageshow', () => Zotero_Error_Report.sendErrorReport());
|
||||
});
|
||||
};
|
||||
|
||||
this.sendErrorReport = Zotero.Promise.coroutine(function* () {
|
||||
this.sendErrorReport = async function () {
|
||||
var wizard = document.querySelector('wizard');
|
||||
var continueButton = wizard.getButton('next');
|
||||
continueButton.disabled = true;
|
||||
|
|
@ -88,7 +88,7 @@
|
|||
body += key + '=' + encodeURIComponent(parts[key]) + '&';
|
||||
}
|
||||
body = body.substr(0, body.length - 1);
|
||||
var req = yield Zotero.HTTP.request(
|
||||
var req = await Zotero.HTTP.request(
|
||||
"POST",
|
||||
ZOTERO_CONFIG.REPOSITORY_URL + "report",
|
||||
{
|
||||
|
|
@ -98,7 +98,7 @@
|
|||
}
|
||||
);
|
||||
_sendErrorReportCallback(req);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
function _sendErrorReportCallback(xmlhttp) {
|
||||
|
|
@ -196,4 +196,4 @@
|
|||
<description>&zotero.errorReport.notReviewed;</description>
|
||||
</wizardpage>
|
||||
</wizard>
|
||||
</window>
|
||||
</window>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue