diff options
author | Robert Zorko <robertz@gurucue.com> | 2015-10-16 15:17:42 +0200 |
---|---|---|
committer | Robert Zorko <robertz@gurucue.com> | 2015-10-16 15:17:42 +0200 |
commit | fe9a64861dcafadf4b1d34a4f782ff7f064f9984 (patch) | |
tree | 6e35777608ac0e48e5fb591c0b929cb87be81348 /js/codeq/core.js | |
parent | 8bee58b97d92b476b114c9af4c70b7a43172ad8e (diff) |
added layout choise to the setting screen, the layout has also been added to the codeq.settings (codeq-server and database has been updated as well)
Diffstat (limited to 'js/codeq/core.js')
-rw-r--r-- | js/codeq/core.js | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/js/codeq/core.js b/js/codeq/core.js index 6d3a5dc..a3e9589 100644 --- a/js/codeq/core.js +++ b/js/codeq/core.js @@ -378,7 +378,8 @@ 'log': log, 'settings': { - 'gui_lang': 'en' // boot sequence overrides this if the browser uses a supported language + 'gui_lang': 'en', // boot sequence overrides this if the browser uses a supported language + 'gui_layout': 'line-layout' }, 'availableLangs': [], // filled at boot from 'supportedLangs' @@ -386,7 +387,21 @@ 'en': 'English', 'sl': 'Slovenščina' }, + 'supportedLayouts':[ + 'line-layout', + 'square-layout' + ], 'isWebApp': false, // this is a PhoneGap/Cordova build, will be overridden in cordova.js for webapp + + 'setLayout': function(newLayout){ + codeq.settings['gui_layout'] = newLayout; + codeq.fire('layoutchange'); + }, + + 'getLayout': function(){ + return codeq.settings['gui_layout']; + }, + 'setLang': function (newLang) { codeq.settings['gui_lang'] = newLang; codeq.fire('langchange', {'lang': newLang}); |