v1.18.x
psychobunny 10 years ago
parent 12518e095f
commit 0caa095ea4

@ -23,5 +23,9 @@
"composer.user_said": "%1 said:",
"composer.discard": "Are you sure you wish to discard this post?",
"composer.submit_and_lock": "Submit and Lock",
"composer.toggle_dropdown": "Toggle Dropdown"
"composer.toggle_dropdown": "Toggle Dropdown",
"bootbox.ok": "OK",
"bootbox.cancel": "Cancel",
"bootbox.confirm": "Confirm"
}

@ -130,6 +130,36 @@ app.cacheBuster = null;
}
}
function overrideBootbox() {
var dialog = bootbox.dialog,
prompt = bootbox.prompt,
confirm = bootbox.confirm;
function translate(modal) {
translator.translate(modal.html(), function(html) {
modal.html(html);
});
}
bootbox.dialog = function() {
var modal = $(dialog.apply(this, arguments)[0]);
translate(modal);
return modal;
}
bootbox.prompt = function() {
var modal = $(prompt.apply(this, arguments)[0]);
translate(modal);
return modal;
}
bootbox.confirm = function() {
var modal = $(confirm.apply(this, arguments)[0]);
translate(modal);
return modal;
}
}
app.logout = function() {
require(['csrf'], function(csrf) {
$.ajax(RELATIVE_PATH + '/logout', {
@ -528,6 +558,7 @@ app.cacheBuster = null;
}
});
overrideBootbox();
createHeaderTooltips();
app.showEmailConfirmWarning();

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save