diff --git a/js/qsm-admin.js b/js/qsm-admin.js index d366354e5..dc7c58849 100644 --- a/js/qsm-admin.js +++ b/js/qsm-admin.js @@ -3714,6 +3714,7 @@ var import_button; 'value': $(this).find('.results-page-condition-value').val() }); }); + jQuery(document).trigger('qsm_save_result_page_before', [this, page]); pages.push(page); }); let _X_validation = false; diff --git a/js/qsm-common.js b/js/qsm-common.js index 936a1eb97..86b340fca 100644 --- a/js/qsm-common.js +++ b/js/qsm-common.js @@ -175,6 +175,7 @@ jQuery('.question-section-id-'+questionID+' .question-type-polar-s').find( '.right-polar-title img').css('opacity', "0.8"); } + jQuery(document).trigger('qsm_polar_slider_change_after', [ui,questionID, answer1, answer2, value , isReverse]); } function qsmPolarSliderQuestionCreate(questionID){ @@ -187,5 +188,6 @@ '.right-polar-title').css('font-weight', '400'); jQuery('.question-section-id-'+questionID+' .question-type-polar-s img').find( '.right-polar-title img').css('opacity', "0.5"); + jQuery(document).trigger('qsm_polar_slider_create_after', [questionID]); } }(jQuery)); 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; diff --git a/php/admin/options-page-results-page-tab.php b/php/admin/options-page-results-page-tab.php index 38ee12fbc..b463bd960 100644 --- a/php/admin/options-page-results-page-tab.php +++ b/php/admin/options-page-results-page-tab.php @@ -36,6 +36,7 @@ function qsm_options_results_tab_content() { 'rest_user_nonce' => wp_create_nonce( 'wp_rest_nonce_' . $quiz_id . '_' . $user_id ), ); wp_localize_script( 'qsm_admin_js', 'qsmResultsObject', $js_data ); + do_action( 'qsm_options_results_tab_content_before' ); ?> @@ -218,6 +219,7 @@ function qsm_options_results_tab_template(){