summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/codeq/core.js2
-rw-r--r--js/codeq/login.js8
2 files changed, 10 insertions, 0 deletions
diff --git a/js/codeq/core.js b/js/codeq/core.js
index 1685dd7..ef3648f 100644
--- a/js/codeq/core.js
+++ b/js/codeq/core.js
@@ -199,6 +199,8 @@
'log': log,
+ 'settings':{},
+
'availableLangs': [], // filled at boot from 'supportedLangs'
'supportedLangs': {
'en': 'English',
diff --git a/js/codeq/login.js b/js/codeq/login.js
index bb92325..02a6517 100644
--- a/js/codeq/login.js
+++ b/js/codeq/login.js
@@ -14,6 +14,14 @@
$('#disabled').css('display', 'none');
$('#disabled').css('cursor', '');
if (data.code !== 0) throw new Error('Login failed, code: ' + data.code + ', message: ' + data.message);
+
+ //merge these settings into the already existing default settings
+ sett = data.settings;
+ $.merge(true, codeq.settings, sett);
+ if('lang' in sett && sett['lan'] in codeq.supportedLangs){
+ codeq.setLang(sett['lan']);
+ }
+
codeq.globalStateMachine.transition('language');
//codeq.activateState('language');
})