From 406c109aeca67d1d88589d8ba09d66605ba55a07 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Fri, 9 Oct 2015 12:29:17 +0200 Subject: Fix setting the resources var in boot sequence --- js/codeq/core.js | 4 ++++ js/codeq/init.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'js/codeq') 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 -- cgit v1.2.1