summaryrefslogtreecommitdiff
path: root/js/common.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2018-12-11 13:18:38 +0300
committerAndrew Dolgov <[email protected]>2018-12-11 13:18:38 +0300
commit7a98105960dcbb53b4a221e2337ac7d1c955bd92 (patch)
tree172e824190957b44612489ddf0a10d67647d0c4e /js/common.js
parent071ca5aa9632c519f8eade427a7eb8241a7182ae (diff)
remove old fatalError(), move everything to App.Error
update exception dialog css
Diffstat (limited to 'js/common.js')
-rwxr-xr-xjs/common.js45
1 files changed, 0 insertions, 45 deletions
diff --git a/js/common.js b/js/common.js
index 17d1fe444..e93087eb4 100755
--- a/js/common.js
+++ b/js/common.js
@@ -246,51 +246,6 @@ function displayIfChecked(checkbox, elemId) {
}
}
-function fatalError(code, msg, ext_info) {
- if (code == 6) {
- window.location.href = "index.php";
- } else if (code == 5) {
- window.location.href = "public.php?op=dbupdate";
- } else {
-
- if (msg == "") msg = "Unknown error";
-
- if (ext_info) {
- if (ext_info.responseText) {
- ext_info = ext_info.responseText;
- }
- }
-
- /* global ERRORS */
- if (ERRORS && ERRORS[code] && !msg) {
- msg = ERRORS[code];
- }
-
- let content = `<div><b>Error code:</b> ${code} </div>
- <p>${msg}</p>`;
-
- if (ext_info) {
- content = content + `<div><b>Additional information:</b></div>
- <textarea style='width: 100%' readonly="1">${ext_info}</textarea>`;
- }
-
- content += `<div style='text-align : center'>
- <button dojoType="dijit.form.Button" onclick="window.location.reload()">
- ${__('Try again')}</button></div>`;
-
- const dialog = new dijit.Dialog({
- title: "Fatal error",
- style: "width: 600px",
- content: content});
-
- dialog.show();
-
- }
-
- return false;
-
-}
-
/* function strip_tags(s) {
return s.replace(/<\/?[^>]+(>|$)/g, "");
} */