let posInit = 0
this.positionsX = [{top: "10"},{top: "39"}]
this.counter = 0
+ this.quiz.screens.currentQuestionAnswers = [];
$(document).on("click", ".move-slide", function () {
let move = $(this).attr("aria-keyshortcuts")
},*/
confirmTheMatch: function() {
- let lastIndex = this.swiperBottom.slides.length - 1
+ let lastIndex = this.swiperTop.slides.length - 1
+ let answer = this.swiperBottom.activeIndex
+ this.quiz.screens.currentQuestionAnswers.push(answer)
+
if(this.swiperTop.activeIndex === lastIndex) {
- let response = "validate"
- } else {
- let response = this.swiperBottom.activeIndex
- this.swiperTop.slideNext()
+ this.validateButton()
+ return false
}
+
+ this.swiperTop.slideNext()
+ },
+
+ validateButton: function() {
+ let btn = $(".active-screen").find(".confirmMatch"),
+ text = this.quiz.l10n.__('Validate answer');
+
+ btn.removeClass("confirmMatch").addClass("action validate").find('.text').text(text)
}
}
<div class="swiper-pagination-bottom"></div>
</div>
</div>
+ <div class="screen-image">
+ <img src="{{$theme->standardImage}}"/>
+ <img class="mobile question-multiple" src="{{$theme->standardImageMobile}}"/>
+ </div>
@include('footer', ['question' => $question, 'data' => $data, 'reset' => true, 'text' => $__('Validate answer'), 'info' => true, 'matchMaking' => true])
</div>