Skip to content

Commit

Permalink
Merge pull request #2343 from QuizandSurveyMaster/dev
Browse files Browse the repository at this point in the history
Release 8.1.15
  • Loading branch information
etvarun authored Sep 12, 2023
2 parents 9999217 + 3cf5fb7 commit 31f8785
Show file tree
Hide file tree
Showing 14 changed files with 165 additions and 98 deletions.
161 changes: 103 additions & 58 deletions css/common-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,40 +34,33 @@ body .quiz_section .qsm_contact_div .mlw_qmn_question {
line-height: 20px;
}

.question-type-polar-s {
display: inline-block !important;
position: relative;
width: 100%;
div .quiz_section .question-type-polar-s, .qsm_questions_answers_section .mlw_qmn_question .question-type-polar-s, .qsm-quiz-container .mlw_qmn_question .question-type-polar-s {
display: inline-flex;
flex-wrap: wrap;
width: 100%;
align-content: space-between;
align-items: center;
}

.question-type-polar-s br {
display: none;
}

.question-type-polar-s .left-polar-title {
width: 25%;
position: absolute;
right: 0;
top: 50%;
transform: translateY(-50%);
line-height: normal;
width: auto;
max-width: 25%;
order: 3;
}

.question-type-polar-s .slider-main-wrapper {
width: 45%;
position: absolute;
right: 50%;
top: 50%;
transform: translate(50%, -50%);
width: calc(50% - 20px);
padding-left: 10px;
padding-right: 10px;
order: 2;
}

.question-type-polar-s .right-polar-title {
width: 25%;
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
line-height: normal;
width: auto;
max-width: 25%;
order: 1;
}

.question-type-polar-s .ui-widget-content {
Expand All @@ -79,10 +72,18 @@ body .quiz_section .qsm_contact_div .mlw_qmn_question {

.question-type-polar-s .ui-widget-content .ui-slider-handle {
background: rgb(119, 113, 113);
height: 32px;
border-color: rgb(119, 113, 113);
top: -7px;
border-radius: 0px;
height: 32px;
border-color: rgb(119, 113, 113);
top: -7px;
border-radius: 0px;
color: #fff;
text-align: center;
text-decoration: none;
}

div .qsm-quiz-form .qmn_error::after{
left: 0;
right: calc(100% - 15px);
}

.qsm-deselect-answer {
Expand Down Expand Up @@ -169,15 +170,19 @@ footer.qsm-popup__footer button.qsm-popup-secondary-button:hover {
min-height: 315px !important;
}

.qsm-progress-bar {
display: flex;
flex-direction: row-reverse;
align-items: center;
padding-right: 5px;
}

.qsm-progress-bar .progressbar-text {
position: absolute;
padding: 0px;
margin: 0px;
top: 10px !important;
left: 10px;
font-size: 13px;
font-weight: bold;
color: rgb(52, 152, 219);
font-weight: bold;
color: rgb(52, 152, 219);
width: 50px;
margin-right: 10px;
}

.quiz_section .mlw-file-upload-error-msg {
Expand All @@ -198,60 +203,89 @@ footer.qsm-popup__footer button.qsm-popup-secondary-button:hover {
* Design for new template variable QUESTION_WITH_ANSWER
*/
.mlw_qmn_question .qsm-text-wrong-option {
display: block;
display: flex;
color: #dc3232;
margin-bottom: 5px;
padding-right: 10px;
}

.mlw_qmn_question span.qsm-text-wrong-option::after {
.mlw_qmn_question span.qsm-text-wrong-option::before {
content: "\f335";
font-family: dashicons;
position: relative;
top: 3px;
right: -10px;
right: -8px;
}

.mlw_qmn_question .qsm-text-correct-option {
display: block;
display: flex;
color: green;
margin-bottom: 5px;
padding-right: 10px;
}

.mlw_qmn_question .qsm-text-correct-option:after {
.mlw_qmn_question .qsm-text-correct-option:before {
content: "\f159";
font-family: dashicons;
position: relative;
top: 3px;
right: -10px;
}

.mlw_qmn_question .qsm-text-correct-option.qsm-text-user-correct-answer:after {
.mlw_qmn_question .qsm-text-correct-option.qsm-text-user-correct-answer:before {
content: "\f12a";
top: 4px;
}

div .qsm-results-page .qmn_image_option {
display: inline-block !important;
height: auto;
}
.mlw_qmn_question span.qsm-text-wrong-option.qmn_image_option::before,
.mlw_qmn_question span.qsm-text-simple-option.qmn_image_option:before,
.mlw_qmn_question span.qsm-text-correct-option.qmn_image_option::before {
display: none;
}
.mlw_qmn_question span.qsm-text-simple-option.qmn_image_option::after,
.mlw_qmn_question span.qsm-text-correct-option.qmn_image_option::after,
.mlw_qmn_question span.qsm-text-wrong-option.qmn_image_option::after {
content: "\f335";
font-family: dashicons;
position: relative;
top: 3px;
right: 0;
float: right;
}
.qsm-results-page span.qsm_image_result_caption_default {
float: left;
width: calc(100% - 22px);
display: block;
}
.mlw_qmn_question span.qsm-text-correct-option.qmn_image_option::after {
content: "\f159";
}
.mlw_qmn_question .qsm-text-simple-option {
display: block;
display: flex;
margin-bottom: 5px;
color: #808080;
padding-right: 10px;
}

.mlw_qmn_question .qsm-text-simple-option:after {
.mlw_qmn_question .qsm-text-simple-option:before {
content: "\f159";
font-family: dashicons;
position: relative;
top: 3px;
right: -10px;
right: -8px;
}

.qsm-results-page .qmn_question_answer.qsm-add-border-bottom {
border-bottom: 1px solid #808080;
padding-bottom: 25px;
}

.qmn_question_answer img {
max-width: 100%;
}
.qmn_quiz_container.qsm_auto_pagination_enabled {
position: relative;
}
Expand Down Expand Up @@ -304,20 +338,6 @@ footer.qsm-popup__footer button.qsm-popup-secondary-button:hover {

@media screen and (max-width: 767px) {

.question-type-polar-s .left-polar-title,
.question-type-polar-s .slider-main-wrapper,
.question-type-polar-s .right-polar-title {
width: 100%;
position: relative;
top: auto;
right: auto;
left: auto;
bottom: auto;
transform: none;
margin-bottom: 30px;
float: right;
}

.question-type-polar-s {
height: auto !important;
}
Expand Down Expand Up @@ -358,4 +378,29 @@ footer.qsm-popup__footer button.qsm-popup-secondary-button:hover {

.qsm_tooltip:hover .qsm_tooltiptext {
visibility: visible;
}
.qmn_btn, .qsm-quiz-container.qmn_quiz_container .qmn_btn, .qsm-quiz-container.qmn_quiz_container .btn {
position: relative;
display: inline-block;
box-sizing: border-box;
color: #666;
background: #ccc;
border: 1px solid #ccc;
font-family: inherit;
font-size: 16px;
line-height: 22px;
text-align: center;
min-width: 100px;
padding: 10px 20px;
cursor: pointer;
text-decoration: none;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: 0px 0px 6px rgba(0, 0, 0, .05);
-moz-box-shadow: 0px 0px 6px rgba(0, 0, 0, .05);
box-shadow: 0px 0px 6px rgba(0, 0, 0, .05);
-webkit-transition: background .25s ease-out;
-moz-transition: background .25s ease-out;
transition: background .25s ease-out;
}
7 changes: 4 additions & 3 deletions css/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -300,11 +300,8 @@ footer.qsm-popup__footer button.qsm-popup-secondary-button:hover {
border: 1px solid red;
width: 31px;
padding: 5px 5px 0px 5px;
display: inline-block;
cursor: pointer;
}


/**
* Design for new template variable QUESTION_WITH_ANSWER
*/
Expand Down Expand Up @@ -370,6 +367,10 @@ body .qsm-results-page .mlw_qmn_question .qmn_image_option:before {
background: #fff;
border-radius: 50%;
line-height: 1;
margin-top: 5px;
}
.qmn_question_answer img {
max-width: 100%;
}
.qsm-results-page .mlw_qmn_question .qmn_image_option {
flex-direction: column;
Expand Down
1 change: 1 addition & 0 deletions css/qsm-admin-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
.qsm-option-tab-dropdown-list{right: 0;left: auto;}
.nav-tab{margin-left: .5em;margin-right: 0;}
.qsm-option-tab-dropdown-item{margin:0;}
.nav-tab-wrapper .qsm-import-export-btn{float: left;}
.overview-main-wrapper .overview-inner-wrap:last-child {margin-left: 0;}
.overview-main-wrapper .overview-inner-wrap {margin-left: 2%;margin-right: 0;}
div.qsm_icon_wrap{left:0;right:auto;}
Expand Down
1 change: 1 addition & 0 deletions css/qsm-admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -1614,6 +1614,7 @@ td.scheduled_time_start {
width: auto;
height: 25px;
}
.nav-tab-wrapper .qsm-import-export-btn{float: right;}
.qsm-option-tab-dropdown {
position: relative;
display: inline-block;
Expand Down
19 changes: 13 additions & 6 deletions js/qsm-quiz.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ var qsmTimerInterval = [];
},
type: 'POST',
success: function (response) {
jQuery('.qsm-quiz-container-' + quizID + '').prepend('<input type="hidden" name="qsm_unique_key" id="qsm_unique_key_'+quizID+'" value="'+response.data.unique_key+'"/>');
jQuery('.qsm-quiz-container-' + quizID + '').prepend('<input type="hidden" name="qsm_nonce" id="qsm_nonce_'+quizID+'" value="'+response.data.nonce+'"/>');
jQuery('.qsm-quiz-container-' + quizID + ' #qsm_unique_key_'+quizID).val(response.data.unique_key);
jQuery('.qsm-quiz-container-' + quizID + ' #qsm_nonce_'+quizID).val(response.data.nonce);
}
});
QSM.initPagination(quizID);
Expand Down Expand Up @@ -1231,6 +1231,10 @@ function qmnNextSlide(pagination, go_to_top, quiz_form_id) {
$container.find(".mlw_next").hide();
$container.find('.g-recaptcha').show();
}
if (qmn_quiz_data[quiz_id].contact_info_location == 1) {
$container.find(".qsm-submit-btn").hide();
$container.find(".mlw_next").show();
}
}
$container.find('.qsm-auto-page-row.qsm-apc-' + page_number).show();
$container.find('.slide_number_hidden').val(parseInt(slide_number) + 1);
Expand Down Expand Up @@ -1685,11 +1689,13 @@ jQuery(function () {
jQuery(".qsm-submit-btn, .mlw_custom_next").attr('disabled', false);
if (obj.type == 'success') {
$this.next().next('.remove-uploaded-file').show();
$this.next().next('.remove-uploaded-file').attr("data-nonce", obj.wp_nonoce);
$this.parent('.quiz_section').find('.mlw_file_upload_hidden_nonce').val(obj.wp_nonoce);
$this.parent('.quiz_section').find('.mlw_file_upload_hidden_path').val(obj.file_path);
$this.parent('.quiz_section').find('.mlw_file_upload_media_id').val(obj.media_id);
$this.parent('.quiz_section').find('.mlw-file-upload-error-msg').hide();
$this.parent('.quiz_section').find('.mlw-file-upload-error-msg').show();
} else {
$this.parent('.quiz_section').find('.mlw-file-upload-error-msg').removeClass('mlw-file-upload-success-msg');
$this.parent('.quiz_section').find('.mlw-file-upload-error-msg').text('').text(obj.message);
$this.parent('.quiz_section').find('.mlw-file-upload-error-msg').show();
$this.parent('.quiz_section').find('.mlw_answer_file_upload').val('');
Expand All @@ -1702,10 +1708,10 @@ jQuery(function () {
});

//Ajax remove file code
jQuery('.quiz_section .remove-uploaded-file').on('click', function () {
jQuery(document).on('click ', '.quiz_section .remove-uploaded-file', function () {
let $this = jQuery(this);
let media_id = jQuery(this).parent('.quiz_section').find('.mlw_file_upload_media_id').val();
let nonce = jQuery(this).data("nonce");
let nonce = jQuery(this).parent('.quiz_section').find('.mlw_file_upload_hidden_nonce').val();
let form_data = new FormData();
form_data.append('action', 'qsm_remove_file_fd_question');
form_data.append('media_id', media_id);
Expand All @@ -1722,9 +1728,10 @@ jQuery(function () {
if (obj.type == 'success') {
$this.hide();
$this.parent('.quiz_section').find('.mlw_file_upload_hidden_path').val('');
$this.parent('.quiz_section').find('.mlw_file_upload_hidden_nonce').val('');
$this.parent('.quiz_section').find('.mlw_file_upload_media_id').val('');
$this.parent('.quiz_section').find('.mlw_answer_file_upload').val('');
$this.parent('.quiz_section').find('.mlw-file-upload-error-msg').hide();
$this.parent('.quiz_section').find('.mlw-file-upload-error-msg').text(obj.message);
} else {
$this.parent('.quiz_section').find('.mlw-file-upload-error-msg').text('').text(obj.message);
$this.parent('.quiz_section').find('.mlw-file-upload-error-msg').show();
Expand Down
4 changes: 2 additions & 2 deletions mlw_quizmaster2.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Plugin Name: Quiz And Survey Master
* Description: Easily and quickly add quizzes and surveys to your website.
* Version: 8.1.14
* Version: 8.1.15
* Author: ExpressTech
* Author URI: https://quizandsurveymaster.com/
* Plugin URI: https://expresstech.io/
Expand Down Expand Up @@ -43,7 +43,7 @@ class MLWQuizMasterNext {
* @var string
* @since 4.0.0
*/
public $version = '8.1.14';
public $version = '8.1.15';

/**
* QSM Alert Manager Object
Expand Down
2 changes: 1 addition & 1 deletion php/admin/quiz-options-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ function qsm_generate_quiz_options() {
<?php
}
if ( class_exists( 'QSM_Export_Import' ) ) {
?><a class="button button-primary" href="<?php echo esc_url( admin_url() . 'admin.php?page=qmn_addons&tab=export-and-import' ); ?>" style="float: right;" target="_blank" rel="noopener"><?php esc_html_e( 'Import & Export', 'quiz-master-next' ); ?></a><?php
?><a class="button button-primary qsm-import-export-btn" href="<?php echo esc_url( admin_url() . 'admin.php?page=qmn_addons&tab=export-and-import' ); ?>" target="_blank" rel="noopener"><?php esc_html_e( 'Import & Export', 'quiz-master-next' ); ?></a><?php
}
?>
</nav>
Expand Down
Loading

0 comments on commit 31f8785

Please sign in to comment.