|
531 | 531 | var id; |
532 | 532 | for(id in translations['questions']){ |
533 | 533 | 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']) { |
535 | 535 | $('tr[mtxgrp="'+translations['questions'][id]['matrix']+'"].mtxfld').each(function(){ |
536 | 536 | var curMtxQuestionId = $(this).attr('id'); |
537 | 537 | curMtxQuestionId = curMtxQuestionId.replace('-tr', ''); |
|
567 | 567 | if($(this).val() == id2){ |
568 | 568 | $(this).text(translations['answers'][id]['text'][id2]); |
569 | 569 | $(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) { |
571 | 571 | $(this).hide(); |
572 | 572 | } |
573 | 573 | }); |
|
609 | 609 | if($(this).val() == id2){ |
610 | 610 | $(this).parent().contents().last().html(' ' + translations['answers'][id]['text'][id2]); |
611 | 611 | $(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) { |
613 | 613 | $(this).parent().contents().last().hide(); |
614 | 614 | $(this).hide(); |
615 | 615 | } |
|
623 | 623 | if(tmp[0] == id && tmp[2] == id2) { |
624 | 624 | $(this).html(' ' + translations['answers'][id]['text'][id2]); |
625 | 625 | $(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) { |
627 | 627 | $(this).hide(); |
628 | 628 | } |
629 | 629 | }); |
|
637 | 637 | if($(this).find('[name="__chk__' + id + '_RC_' + id2 + '"]').length) { |
638 | 638 | $(this).contents().last().html(' ' + translations['answers'][id]['text'][id2]); |
639 | 639 | $(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) { |
641 | 641 | $(this).hide(); |
642 | 642 | } |
643 | 643 | }); |
|
650 | 650 | if(tmp[0] == id && tmp[2] == id2) { |
651 | 651 | $(this).html(translations['answers'][id]['text'][id2]); |
652 | 652 | $(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) { |
654 | 654 | $(this).hide(); |
655 | 655 | } |
656 | 656 | }); |
|
0 commit comments