summaryrefslogtreecommitdiff
path: root/js/App.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-14 18:59:09 +0300
committerAndrew Dolgov <[email protected]>2021-02-14 18:59:09 +0300
commitff6031d3c914fa2c7ac514243394fa70a56c6bd7 (patch)
treef0692b7e902c9d53f1b6391fba86905bbe48e251 /js/App.js
parent4996d8ccfed98a5052413cdc4f4b9192fac04a89 (diff)
remove old-style markup from exception dialog
Diffstat (limited to 'js/App.js')
-rw-r--r--js/App.js44
1 files changed, 23 insertions, 21 deletions
diff --git a/js/App.js b/js/App.js
index 1e6e5fdb1..0a72d1b12 100644
--- a/js/App.js
+++ b/js/App.js
@@ -542,29 +542,31 @@ const App = {
}
try {
- let stack_msg = "";
-
- if (error.stack)
- stack_msg += `<div><b>Stack trace:</b></div>
- <textarea name="stack" readonly="1">${error.stack}</textarea>`;
-
- if (params.info)
- stack_msg += `<div><b>Additional information:</b></div>
- <textarea name="stack" readonly="1">${params.info}</textarea>`;
-
- const content = `<div class="error-contents">
- <p class="message">${message}</p>
- ${stack_msg}
- <div class="dlgButtons">
- <button dojoType="dijit.form.Button"
- onclick="dijit.byId('exceptionDlg').hide()">${__('Close this window')}</button>
- </div>
- </div>`;
-
const dialog = new fox.SingleUseDialog({
- id: "exceptionDlg",
title: params.title || __("Unhandled exception"),
- content: content
+ content: `
+ <div class='exception-contents'>
+ <h3>${message}</h3>
+
+ <header>${__('Stack trace')}</header>
+ <section>
+ <textarea readonly='readonly'>${error.stack}</textarea>
+ </section>
+
+ ${params && params.info ?
+ `
+ <header>${__('Additional information')}</header>
+ <section>
+ <textarea readonly='readonly'>${params.info}</textarea>
+ </section>
+ ` : ''}
+ </div>
+ <footer class='text-center'>
+ <button dojoType="dijit.form.Button" class='alt-primary' type='submit'>
+ ${__('Close this window')}
+ </button>
+ </footer>
+ </div>`
});
dialog.show();