Skip to content

Commit

Permalink
feat: #8734, move bootbox to package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
barisusakli committed Oct 11, 2020
1 parent 420a312 commit 300a875
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 842 deletions.
1 change: 1 addition & 0 deletions install/package.json
Expand Up @@ -36,6 +36,7 @@
"bcryptjs": "2.4.3",
"benchpressjs": "2.0.4",
"body-parser": "^1.19.0",
"bootbox": "4.4.0",
"bootstrap": "^3.4.1",
"chart.js": "^2.9.3",
"cli-graph": "^3.2.2",
Expand Down
14 changes: 4 additions & 10 deletions public/src/app.js
Expand Up @@ -18,10 +18,6 @@ app.cacheBuster = null;

app.cacheBuster = config['cache-buster'];

bootbox.setDefaults({
locale: config.userLang,
});

$(document).ready(function () {
ajaxify.parseData();
app.load();
Expand Down Expand Up @@ -319,12 +315,10 @@ app.cacheBuster = null;
break;

case 'modal':
require(['translator'], function (translator) {
translator.translate(message || messages[type].message, function (translated) {
bootbox.alert({
title: messages[type].title,
message: translated,
});
require(['bootbox'], function (bootbox) {
bootbox.alert({
title: messages[type].title,
message: message || messages[type].message,
});
});
break;
Expand Down

0 comments on commit 300a875

Please sign in to comment.