mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-17 03:01:08 +01:00
Fixed translator backwards compatibility issue
Also removed the _clearMenus global object because populating the global namespace is bad, bad, bad
This commit is contained in:
@@ -295,11 +295,13 @@
|
|||||||
if (typeof define === 'function' && define.amd) {
|
if (typeof define === 'function' && define.amd) {
|
||||||
define('translator', translator);
|
define('translator', translator);
|
||||||
|
|
||||||
|
var _translator = translator;
|
||||||
|
|
||||||
// Expose a global `translator` object for backwards compatibility
|
// Expose a global `translator` object for backwards compatibility
|
||||||
window.translator = {
|
window.translator = {
|
||||||
translate: function() {
|
translate: function() {
|
||||||
console.warn('[translator] Global invocation of the translator is now deprecated, please `require` the module instead.');
|
console.warn('[translator] Global invocation of the translator is now deprecated, please `require` the module instead.');
|
||||||
translator.translate.apply(translator, arguments);
|
_translator.translate.apply(_translator, arguments);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ if ('undefined' !== typeof window) {
|
|||||||
|
|
||||||
})(jQuery || {fn:{}});
|
})(jQuery || {fn:{}});
|
||||||
|
|
||||||
|
(function(){
|
||||||
// FIX FOR #1245 - https://github.com/NodeBB/NodeBB/issues/1245
|
// FIX FOR #1245 - https://github.com/NodeBB/NodeBB/issues/1245
|
||||||
// from http://stackoverflow.com/questions/15931962/bootstrap-dropdown-disappear-with-right-click-on-firefox
|
// from http://stackoverflow.com/questions/15931962/bootstrap-dropdown-disappear-with-right-click-on-firefox
|
||||||
// obtain a reference to the original handler
|
// obtain a reference to the original handler
|
||||||
@@ -100,4 +100,6 @@ if ('undefined' !== typeof window) {
|
|||||||
_clearMenus();
|
_clearMenus();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
})();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user