summaryrefslogtreecommitdiff
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
parent4996d8ccfed98a5052413cdc4f4b9192fac04a89 (diff)
remove old-style markup from exception dialog
-rw-r--r--js/App.js44
-rw-r--r--themes/compact.css15
-rw-r--r--themes/compact_night.css15
-rw-r--r--themes/light.css15
-rw-r--r--themes/light/tt-rss.less28
-rw-r--r--themes/night.css15
-rw-r--r--themes/night_blue.css15
7 files changed, 45 insertions, 102 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();
diff --git a/themes/compact.css b/themes/compact.css
index 36c5aec9f..24380d428 100644
--- a/themes/compact.css
+++ b/themes/compact.css
@@ -526,22 +526,13 @@ body.ttrss_main #feed_browser_spinner {
height: 18px;
width: 18px;
}
-body.ttrss_main #exceptionDlg .dijitDialogTitleBar {
- background: red;
- color: white;
-}
-body.ttrss_main #exceptionDlg .dijitDialogPaneContent {
- background: #fcc;
-}
-body.ttrss_main #exceptionDlg .error-contents .message {
+body.ttrss_main .exception-contents h3 {
color: red;
}
-body.ttrss_main #exceptionDlg .error-contents textarea {
+body.ttrss_main .exception-contents textarea {
width: 99%;
height: 200px;
-}
-body.ttrss_main #exceptionDlg .error-contents .dlgButtons {
- text-align: center;
+ font-size: 11px;
}
body.ttrss_main #content-wrap {
padding: 0px;
diff --git a/themes/compact_night.css b/themes/compact_night.css
index e39b7020a..a366404a4 100644
--- a/themes/compact_night.css
+++ b/themes/compact_night.css
@@ -526,22 +526,13 @@ body.ttrss_main #feed_browser_spinner {
height: 18px;
width: 18px;
}
-body.ttrss_main #exceptionDlg .dijitDialogTitleBar {
- background: red;
- color: white;
-}
-body.ttrss_main #exceptionDlg .dijitDialogPaneContent {
- background: #fcc;
-}
-body.ttrss_main #exceptionDlg .error-contents .message {
+body.ttrss_main .exception-contents h3 {
color: red;
}
-body.ttrss_main #exceptionDlg .error-contents textarea {
+body.ttrss_main .exception-contents textarea {
width: 99%;
height: 200px;
-}
-body.ttrss_main #exceptionDlg .error-contents .dlgButtons {
- text-align: center;
+ font-size: 11px;
}
body.ttrss_main #content-wrap {
padding: 0px;
diff --git a/themes/light.css b/themes/light.css
index b6c487b66..d3f5d7978 100644
--- a/themes/light.css
+++ b/themes/light.css
@@ -526,22 +526,13 @@ body.ttrss_main #feed_browser_spinner {
height: 18px;
width: 18px;
}
-body.ttrss_main #exceptionDlg .dijitDialogTitleBar {
- background: red;
- color: white;
-}
-body.ttrss_main #exceptionDlg .dijitDialogPaneContent {
- background: #fcc;
-}
-body.ttrss_main #exceptionDlg .error-contents .message {
+body.ttrss_main .exception-contents h3 {
color: red;
}
-body.ttrss_main #exceptionDlg .error-contents textarea {
+body.ttrss_main .exception-contents textarea {
width: 99%;
height: 200px;
-}
-body.ttrss_main #exceptionDlg .error-contents .dlgButtons {
- text-align: center;
+ font-size: 11px;
}
body.ttrss_main #content-wrap {
padding: 0px;
diff --git a/themes/light/tt-rss.less b/themes/light/tt-rss.less
index 65ec33bc3..d13ffff3e 100644
--- a/themes/light/tt-rss.less
+++ b/themes/light/tt-rss.less
@@ -609,28 +609,14 @@ body.ttrss_main {
width : 18px;
}
- #exceptionDlg {
- .dijitDialogTitleBar {
- background : red;
- color : white;
- }
-
- .dijitDialogPaneContent {
- background : #fcc;
+ .exception-contents {
+ h3 {
+ color : red;
}
-
- .error-contents {
- .message {
- color : red;
- }
-
- textarea {
- width : 99%;
- height : 200px;
- }
- .dlgButtons {
- text-align : center;
- }
+ textarea {
+ width : 99%;
+ height : 200px;
+ font-size : 11px;
}
}
diff --git a/themes/night.css b/themes/night.css
index 5941fd8e1..87a68a3c0 100644
--- a/themes/night.css
+++ b/themes/night.css
@@ -527,22 +527,13 @@ body.ttrss_main #feed_browser_spinner {
height: 18px;
width: 18px;
}
-body.ttrss_main #exceptionDlg .dijitDialogTitleBar {
- background: red;
- color: white;
-}
-body.ttrss_main #exceptionDlg .dijitDialogPaneContent {
- background: #fcc;
-}
-body.ttrss_main #exceptionDlg .error-contents .message {
+body.ttrss_main .exception-contents h3 {
color: red;
}
-body.ttrss_main #exceptionDlg .error-contents textarea {
+body.ttrss_main .exception-contents textarea {
width: 99%;
height: 200px;
-}
-body.ttrss_main #exceptionDlg .error-contents .dlgButtons {
- text-align: center;
+ font-size: 11px;
}
body.ttrss_main #content-wrap {
padding: 0px;
diff --git a/themes/night_blue.css b/themes/night_blue.css
index 99bb191a2..02a66656b 100644
--- a/themes/night_blue.css
+++ b/themes/night_blue.css
@@ -527,22 +527,13 @@ body.ttrss_main #feed_browser_spinner {
height: 18px;
width: 18px;
}
-body.ttrss_main #exceptionDlg .dijitDialogTitleBar {
- background: red;
- color: white;
-}
-body.ttrss_main #exceptionDlg .dijitDialogPaneContent {
- background: #fcc;
-}
-body.ttrss_main #exceptionDlg .error-contents .message {
+body.ttrss_main .exception-contents h3 {
color: red;
}
-body.ttrss_main #exceptionDlg .error-contents textarea {
+body.ttrss_main .exception-contents textarea {
width: 99%;
height: 200px;
-}
-body.ttrss_main #exceptionDlg .error-contents .dlgButtons {
- text-align: center;
+ font-size: 11px;
}
body.ttrss_main #content-wrap {
padding: 0px;