Skip to content

Commit

Permalink
Fixed issue: Language changer not working correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
lacrioque committed Jun 13, 2018
1 parent 47355fa commit 9625698
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions themes/survey/vanilla/scripts/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,23 +107,21 @@ var ThemeScripts = function(){
});
};

/*
var initLanguageChanger = function(selectorItem, selectorGlobalForm){
$(selectorItem).on('change',function() {
var initLanguageChanger = function(selectorItem){
$(selectorItem).on('change',function(e) {
var lang = $(this).val();
logObject.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;
$("<form>", {
"class":'ls-js-hidden',
"html": '<input type="hidden" name="lang" value="' + lang + '" />',
"action": target,
"method": 'get'
$('<form>', {
'class':'ls-js-hidden',
'html': '<input type="hidden" name="lang" value="' + lang + '" />',
'action': target,
'method': 'get'
}).appendTo('body').submit();
});
};
*/

var initTopMenuLanguageChanger = function(selectorItem, selectorGlobalForm){
// $(selectorContainer).height($('#main-row').height());
Expand Down Expand Up @@ -310,6 +308,7 @@ var ThemeScripts = function(){
initUserForms: initUserForms,
initGlobal: initGlobal,
initWelcomePage: initWelcomePage,
initLanguageChanger: initLanguageChanger,
focusFirst: focusFirst,
sliderSuffixClone : sliderSuffixClone,
fixBodyPadding : fixBodyPadding,
Expand Down

0 comments on commit 9625698

Please sign in to comment.