no need to set var, just use rjs

v1.18.x
Julian Lam 9 years ago
parent 6470f2ef53
commit ff8fb0e9ab

@ -1,17 +1,13 @@
'use strict';
/* global bootbox, translator */
/* global bootbox */
var overrides = overrides || {};
if ('undefined' !== typeof window) {
(function ($, undefined) {
var translator;
require(['translator'], function(_translator) {
translator = _translator;
});
require(['translator'], function(translator) {
$.fn.getCursorPosition = function() {
var el = $(this).get(0);
var pos = 0;
@ -80,7 +76,7 @@ if ('undefined' !== typeof window) {
});
});
}
});
})(jQuery || {fn:{}});
(function(){
@ -107,15 +103,11 @@ if ('undefined' !== typeof window) {
})();
overrides.overrideBootbox = function () {
require(['translator'], function(translator) {
var dialog = bootbox.dialog,
prompt = bootbox.prompt,
confirm = bootbox.confirm;
var translator;
require(['translator'], function(_translator) {
translator = _translator;
});
function translate(modal) {
var header = modal.find('.modal-header'),
footer = modal.find('.modal-footer');
@ -144,6 +136,7 @@ if ('undefined' !== typeof window) {
translate(modal);
return modal;
};
});
};
overrides.overrideTimeago = function() {

Loading…
Cancel
Save