Skip to content

Commit

Permalink
console errors
Browse files Browse the repository at this point in the history
  • Loading branch information
smartinkc committed Mar 2, 2020
1 parent 387bb36 commit caab56e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions js/multilingual.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
var id;
for(id in translations['questions']){
if(translations['questions'][id]['matrix'] != null){
if(!(translations['questions'][id]['matrix'] in matrixProcessed) && settings['hide-matrix-questions-without-translation']['value']) {
if(!(translations['questions'][id]['matrix'] in matrixProcessed) && settings['hide-matrix-questions-without-translation'] && settings['hide-matrix-questions-without-translation']['value']) {
$('tr[mtxgrp="'+translations['questions'][id]['matrix']+'"].mtxfld').each(function(){
var curMtxQuestionId = $(this).attr('id');
curMtxQuestionId = curMtxQuestionId.replace('-tr', '');
Expand Down Expand Up @@ -166,7 +166,7 @@
if($(this).val() == id2){
$(this).text(translations['answers'][id]['text'][id2]);
$(this).data('lang', lang);
} else if(settings['hide-answers-without-translation']['value'] && $(this).val() !== '' && $(this).data('lang') !== lang) {
} else if(settings['hide-answers-without-translation'] && settings['hide-answers-without-translation']['value'] && $(this).val() !== '' && $(this).data('lang') !== lang) {
$(this).hide();
}
});
Expand Down Expand Up @@ -199,7 +199,7 @@
if($(this).val() == id2){
$(this).parent().contents().last().html(' ' + translations['answers'][id]['text'][id2]);
$(this).data('lang', lang);
} else if(settings['hide-answers-without-translation']['value'] && $(this).data('lang') !== lang) {
} else if(settings['hide-answers-without-translation'] && settings['hide-answers-without-translation']['value'] && $(this).data('lang') !== lang) {
$(this).parent().contents().last().hide();
$(this).hide();
}
Expand All @@ -214,7 +214,7 @@
if($(this).find('[name="__chk__' + id + '_RC_' + id2 + '"]').length) {
$(this).contents().last().html(' ' + translations['answers'][id]['text'][id2]);
$(this).data('lang', lang);
} else if(settings['hide-answers-without-translation']['value'] && $(this).data('lang') !== lang) {
} else if(settings['hide-answers-without-translation'] && settings['hide-answers-without-translation']['value'] && $(this).data('lang') !== lang) {
$(this).hide();
}
});
Expand Down
12 changes: 6 additions & 6 deletions js/multilingual_survey.js
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@
var id;
for(id in translations['questions']){
if(translations['questions'][id]['matrix'] != null){
if(!(translations['questions'][id]['matrix'] in matrixProcessed) && settings['hide-matrix-questions-without-translation-survey']['value']) {
if(!(translations['questions'][id]['matrix'] in matrixProcessed) && settings['hide-matrix-questions-without-translation-survey'] && settings['hide-matrix-questions-without-translation-survey']['value']) {
$('tr[mtxgrp="'+translations['questions'][id]['matrix']+'"].mtxfld').each(function(){
var curMtxQuestionId = $(this).attr('id');
curMtxQuestionId = curMtxQuestionId.replace('-tr', '');
Expand Down Expand Up @@ -567,7 +567,7 @@
if($(this).val() == id2){
$(this).text(translations['answers'][id]['text'][id2]);
$(this).data('lang', lang);
} else if(settings['hide-answers-without-translation-survey']['value'] && $(this).val() !== '' && $(this).data('lang') !== lang) {
} else if(settings['hide-answers-without-translation-survey'] && settings['hide-answers-without-translation-survey']['value'] && $(this).val() !== '' && $(this).data('lang') !== lang) {
$(this).hide();
}
});
Expand Down Expand Up @@ -609,7 +609,7 @@
if($(this).val() == id2){
$(this).parent().contents().last().html(' ' + translations['answers'][id]['text'][id2]);
$(this).data('lang', lang);
} else if(settings['hide-answers-without-translation-survey']['value'] && $(this).data('lang') !== lang) {
} else if(settings['hide-answers-without-translation-survey'] && settings['hide-answers-without-translation-survey']['value'] && $(this).data('lang') !== lang) {
$(this).parent().contents().last().hide();
$(this).hide();
}
Expand All @@ -623,7 +623,7 @@
if(tmp[0] == id && tmp[2] == id2) {
$(this).html(' ' + translations['answers'][id]['text'][id2]);
$(this).data('lang', lang);
} else if(settings['hide-answers-without-translation-survey']['value'] && $(this).data('lang') !== lang) {
} else if(settings['hide-answers-without-translation-survey'] && settings['hide-answers-without-translation-survey']['value'] && $(this).data('lang') !== lang) {
$(this).hide();
}
});
Expand All @@ -637,7 +637,7 @@
if($(this).find('[name="__chk__' + id + '_RC_' + id2 + '"]').length) {
$(this).contents().last().html(' ' + translations['answers'][id]['text'][id2]);
$(this).data('lang', lang);
} else if(settings['hide-answers-without-translation-survey']['value'] && $(this).data('lang') !== lang) {
} else if(settings['hide-answers-without-translation-survey'] && settings['hide-answers-without-translation-survey']['value'] && $(this).data('lang') !== lang) {
$(this).hide();
}
});
Expand All @@ -650,7 +650,7 @@
if(tmp[0] == id && tmp[2] == id2) {
$(this).html(translations['answers'][id]['text'][id2]);
$(this).data('lang', lang);
} else if(settings['hide-answers-without-translation-survey']['value'] && $(this).data('lang') !== lang) {
} else if(settings['hide-answers-without-translation-survey'] && settings['hide-answers-without-translation-survey']['value'] && $(this).data('lang') !== lang) {
$(this).hide();
}
});
Expand Down

0 comments on commit caab56e

Please sign in to comment.