diff --git a/application/models/TemplateConfig.php b/application/models/TemplateConfig.php index 3f6353ba7e0..805bacbf5e9 100644 --- a/application/models/TemplateConfig.php +++ b/application/models/TemplateConfig.php @@ -661,12 +661,12 @@ public function getClassAndAttributes() // Language changer $aClassAndAttributes['id']['lctdropdown'] = 'langs-container'; - $aClassAndAttributes['class']['lctli'] = ' dropdown ls-no-js-hidden lctli '; - $aClassAndAttributes['class']['lctla'] = ' dropdown-toggle '; - $aClassAndAttributes['class']['lctspan'] = ' caret '; - $aClassAndAttributes['class']['lctdropdown'] = ' dropdown-menu '; - $aClassAndAttributes['class']['lctdropdownli'] = ' index-item '; - $aClassAndAttributes['class']['lctdropdownlia'] = ' ls-language-link '; + $aClassAndAttributes['class']['lctli'] = 'dropdown ls-no-js-hidden form-change-lang '; + $aClassAndAttributes['class']['lctla'] = 'dropdown-toggle '; + $aClassAndAttributes['class']['lctspan'] = 'caret '; + $aClassAndAttributes['class']['lctdropdown'] = 'dropdown-menu '; + $aClassAndAttributes['class']['lctdropdownli'] = 'index-item '; + $aClassAndAttributes['class']['lctdropdownlia'] = 'ls-language-link '; $aClassAndAttributes['attr']['lctla'] = ' data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false" '; $aClassAndAttributes['attr']['lctdropdown'] = ' style="overflow: scroll" '; diff --git a/templates/default/css/template.css b/templates/default/css/template.css index 47b8dfdb3c4..ed771faf867 100644 --- a/templates/default/css/template.css +++ b/templates/default/css/template.css @@ -13,6 +13,9 @@ body { .surveys-list .btn-group { width: 50%; } + .language_change_container{ + height: 90vh; + } } .group-title-container { diff --git a/templates/default/scripts/template.js b/templates/default/scripts/template.js index 08556aa6c29..7b96643423e 100644 --- a/templates/default/scripts/template.js +++ b/templates/default/scripts/template.js @@ -85,6 +85,34 @@ var Template = function(){ }); } + var initLanguageChanger = function(selectorItem, selectorGlobalForm){ + $(selectorItem).on('change',function() { + var lang = $(this).val(); + console.log(lang, 'changed'); + // If there are no form : we can't use it */ + /* No form, not targeturl : just see what happen */ + var target = window.location.href; + $("