From fe9a64861dcafadf4b1d34a4f782ff7f064f9984 Mon Sep 17 00:00:00 2001 From: Robert Zorko Date: Fri, 16 Oct 2015 15:17:42 +0200 Subject: 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) --- js/codeq/core.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'js/codeq/core.js') 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}); -- cgit v1.2.1