diff options
author | Timotej Lazar <timotej.lazar@araneo.org> | 2015-10-09 12:29:17 +0200 |
---|---|---|
committer | Timotej Lazar <timotej.lazar@araneo.org> | 2015-10-09 12:29:17 +0200 |
commit | 406c109aeca67d1d88589d8ba09d66605ba55a07 (patch) | |
tree | 538ed66662b99296435773c38481704c21137110 /js/codeq | |
parent | 084e0806bc5aff00fc697cb51dee7b4a331e4b64 (diff) |
Fix setting the resources var in boot sequence
Diffstat (limited to 'js/codeq')
-rw-r--r-- | js/codeq/core.js | 4 | ||||
-rw-r--r-- | js/codeq/init.js | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/js/codeq/core.js b/js/codeq/core.js index d60c7e4..9c32279 100644 --- a/js/codeq/core.js +++ b/js/codeq/core.js @@ -403,6 +403,10 @@ codeq.fire('langchange', {'lang': newLang}); }, + 'setResources': function (newResources) { + resources = newResources; + }, + 'escapeHtml': function (s) { return ('' + s).replace(regexpAmp, '&').replace(regexpLt, '<').replace(regexpGt, '>'); }, diff --git a/js/codeq/init.js b/js/codeq/init.js index dfd9253..811d781 100644 --- a/js/codeq/init.js +++ b/js/codeq/init.js @@ -67,7 +67,7 @@ loadGuiTranslations() .then(codeq.comms.getResourceTree) .then(function (resourceTree) { - resources = resourceTree; // save the loaded resource tree to the internal variable + codeq.setResources(resourceTree); // save the loaded resource tree codeq.fire('init'); // tell any interested modules that we are now initialized, perhaps they want to initialize too codeq.setLang(lang || 'en'); // initial language setting, this also translates the GUI |