diff --git a/js/qsm-quiz.js b/js/qsm-quiz.js index acf5af775..fb362c7aa 100644 --- a/js/qsm-quiz.js +++ b/js/qsm-quiz.js @@ -338,7 +338,7 @@ var qsmTimerInterval = []; jQuery(document).trigger('qsm_init_progressbar_after', [quizID, qmn_quiz_data]); } QSM.goToPage(quizID, 1); - jQuery(document).on('click', '.qsm-quiz-container-' + quizID + ' .qsm-pagination .qsm-next', function (event) { + jQuery(document).on('click', '.qsm-quiz-container-' + quizID + ' .qsm-next', function (event) { jQuery(document).trigger('qsm_next_button_click_before', [quizID]); event.preventDefault(); let $quizForm = QSM.getQuizForm(quizID); @@ -365,7 +365,7 @@ var qsmTimerInterval = []; } jQuery(document).trigger('qsm_next_button_click_after', [quizID]); }); - jQuery(document).on('click', '.qsm-quiz-container-' + quizID + ' .qsm-pagination .qsm-previous', function (event) { + jQuery(document).on('click', '.qsm-quiz-container-' + quizID + ' .qsm-previous', function (event) { jQuery(document).trigger('qsm_previous_button_click_before', [quizID]); event.preventDefault(); QSM.prevPage(quizID); @@ -1466,7 +1466,7 @@ jQuery(function () { }); }); - jQuery(document).on('change', '.qmn-multiple-choice-input, .qsm_dropdown' , function (e) { + jQuery(document).on('change', '.qmn-multiple-choice-input, .qsm_dropdown, .mlw_answer_date ' , function (e) { let $i_this = jQuery(this); var quizID = jQuery(this).parents('.qsm-quiz-container').find('.qmn_quiz_id').val(); var $quizForm = QSM.getQuizForm(quizID); @@ -1607,6 +1607,8 @@ jQuery(function () { $this.parent('.quiz_section').find('.qsm-file-upload-status').text('').text(obj.message); $this.parent('.quiz_section').find('.qsm-file-upload-status').show(); } + // triggers after file remove + jQuery(document).trigger('qsm_after_file_remove', [$this.parent(), obj]); } }); return false;