]> _ Git - fluidbook-toolbox-quiz.git/commitdiff
wait #6624 @1:00
authorsoufiane <soufiane@cubedesigners.com>
Thu, 18 Jan 2024 10:07:30 +0000 (11:07 +0100)
committersoufiane <soufiane@cubedesigners.com>
Thu, 18 Jan 2024 10:07:30 +0000 (11:07 +0100)
js/quiz.screens.js

index 03e0d40585ee64dd35f89b56e4a4f14ed354dec1..72a540259e0d182d42ce6000aef9290d9192b9cf 100644 (file)
@@ -27,6 +27,9 @@ QuizScreens.prototype = {
     initEvents: function () {
         const $this = this;
 
+        // enabled click on item
+        $(".list-item").css("pointer-events","auto")
+
         // RĂ©initialiser les rĂ©ponses
         $(document).on("click", ".btn.reset", function () {
             $this.resetForm();
@@ -58,6 +61,10 @@ QuizScreens.prototype = {
                 return false;
             }
 
+            if($this.getActiveScreenType() === 'draganddrop' && $this.activeScreen.find(".list-item").length > 0) {
+                return false;
+            }
+
             //
             if ($(this).hasClass('validate')) {
                 let review = $this.sendUserAnswers();
@@ -108,8 +115,11 @@ QuizScreens.prototype = {
                 this.quiz.animations.fadeOut($el.find(".access"));
             }
         }
+        // disabled click on item
+        this.activeScreen.find(".list-item").css("pointer-events","none")
     },
 
+
     nextQuestion: function () {
         let nextQuestionIndex = this.quiz.question.currentPosition() + 1;
         let nextScreen;