Skip to content

Commit caab56e

Browse files
committed
console errors
1 parent 387bb36 commit caab56e

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

js/multilingual.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
var id;
132132
for(id in translations['questions']){
133133
if(translations['questions'][id]['matrix'] != null){
134-
if(!(translations['questions'][id]['matrix'] in matrixProcessed) && settings['hide-matrix-questions-without-translation']['value']) {
134+
if(!(translations['questions'][id]['matrix'] in matrixProcessed) && settings['hide-matrix-questions-without-translation'] && settings['hide-matrix-questions-without-translation']['value']) {
135135
$('tr[mtxgrp="'+translations['questions'][id]['matrix']+'"].mtxfld').each(function(){
136136
var curMtxQuestionId = $(this).attr('id');
137137
curMtxQuestionId = curMtxQuestionId.replace('-tr', '');
@@ -166,7 +166,7 @@
166166
if($(this).val() == id2){
167167
$(this).text(translations['answers'][id]['text'][id2]);
168168
$(this).data('lang', lang);
169-
} else if(settings['hide-answers-without-translation']['value'] && $(this).val() !== '' && $(this).data('lang') !== lang) {
169+
} else if(settings['hide-answers-without-translation'] && settings['hide-answers-without-translation']['value'] && $(this).val() !== '' && $(this).data('lang') !== lang) {
170170
$(this).hide();
171171
}
172172
});
@@ -199,7 +199,7 @@
199199
if($(this).val() == id2){
200200
$(this).parent().contents().last().html(' ' + translations['answers'][id]['text'][id2]);
201201
$(this).data('lang', lang);
202-
} else if(settings['hide-answers-without-translation']['value'] && $(this).data('lang') !== lang) {
202+
} else if(settings['hide-answers-without-translation'] && settings['hide-answers-without-translation']['value'] && $(this).data('lang') !== lang) {
203203
$(this).parent().contents().last().hide();
204204
$(this).hide();
205205
}
@@ -214,7 +214,7 @@
214214
if($(this).find('[name="__chk__' + id + '_RC_' + id2 + '"]').length) {
215215
$(this).contents().last().html(' ' + translations['answers'][id]['text'][id2]);
216216
$(this).data('lang', lang);
217-
} else if(settings['hide-answers-without-translation']['value'] && $(this).data('lang') !== lang) {
217+
} else if(settings['hide-answers-without-translation'] && settings['hide-answers-without-translation']['value'] && $(this).data('lang') !== lang) {
218218
$(this).hide();
219219
}
220220
});

js/multilingual_survey.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@
531531
var id;
532532
for(id in translations['questions']){
533533
if(translations['questions'][id]['matrix'] != null){
534-
if(!(translations['questions'][id]['matrix'] in matrixProcessed) && settings['hide-matrix-questions-without-translation-survey']['value']) {
534+
if(!(translations['questions'][id]['matrix'] in matrixProcessed) && settings['hide-matrix-questions-without-translation-survey'] && settings['hide-matrix-questions-without-translation-survey']['value']) {
535535
$('tr[mtxgrp="'+translations['questions'][id]['matrix']+'"].mtxfld').each(function(){
536536
var curMtxQuestionId = $(this).attr('id');
537537
curMtxQuestionId = curMtxQuestionId.replace('-tr', '');
@@ -567,7 +567,7 @@
567567
if($(this).val() == id2){
568568
$(this).text(translations['answers'][id]['text'][id2]);
569569
$(this).data('lang', lang);
570-
} else if(settings['hide-answers-without-translation-survey']['value'] && $(this).val() !== '' && $(this).data('lang') !== lang) {
570+
} else if(settings['hide-answers-without-translation-survey'] && settings['hide-answers-without-translation-survey']['value'] && $(this).val() !== '' && $(this).data('lang') !== lang) {
571571
$(this).hide();
572572
}
573573
});
@@ -609,7 +609,7 @@
609609
if($(this).val() == id2){
610610
$(this).parent().contents().last().html(' ' + translations['answers'][id]['text'][id2]);
611611
$(this).data('lang', lang);
612-
} else if(settings['hide-answers-without-translation-survey']['value'] && $(this).data('lang') !== lang) {
612+
} else if(settings['hide-answers-without-translation-survey'] && settings['hide-answers-without-translation-survey']['value'] && $(this).data('lang') !== lang) {
613613
$(this).parent().contents().last().hide();
614614
$(this).hide();
615615
}
@@ -623,7 +623,7 @@
623623
if(tmp[0] == id && tmp[2] == id2) {
624624
$(this).html(' ' + translations['answers'][id]['text'][id2]);
625625
$(this).data('lang', lang);
626-
} else if(settings['hide-answers-without-translation-survey']['value'] && $(this).data('lang') !== lang) {
626+
} else if(settings['hide-answers-without-translation-survey'] && settings['hide-answers-without-translation-survey']['value'] && $(this).data('lang') !== lang) {
627627
$(this).hide();
628628
}
629629
});
@@ -637,7 +637,7 @@
637637
if($(this).find('[name="__chk__' + id + '_RC_' + id2 + '"]').length) {
638638
$(this).contents().last().html(' ' + translations['answers'][id]['text'][id2]);
639639
$(this).data('lang', lang);
640-
} else if(settings['hide-answers-without-translation-survey']['value'] && $(this).data('lang') !== lang) {
640+
} else if(settings['hide-answers-without-translation-survey'] && settings['hide-answers-without-translation-survey']['value'] && $(this).data('lang') !== lang) {
641641
$(this).hide();
642642
}
643643
});
@@ -650,7 +650,7 @@
650650
if(tmp[0] == id && tmp[2] == id2) {
651651
$(this).html(translations['answers'][id]['text'][id2]);
652652
$(this).data('lang', lang);
653-
} else if(settings['hide-answers-without-translation-survey']['value'] && $(this).data('lang') !== lang) {
653+
} else if(settings['hide-answers-without-translation-survey'] && settings['hide-answers-without-translation-survey']['value'] && $(this).data('lang') !== lang) {
654654
$(this).hide();
655655
}
656656
});

0 commit comments

Comments
 (0)