Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added a trigger for theme support #2538

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions js/qsm-quiz.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down
Loading