diff --git a/assets/addons_themes.png b/assets/addons_themes.png
new file mode 100644
index 000000000..63550cf1e
Binary files /dev/null and b/assets/addons_themes.png differ
diff --git a/assets/arrow-down-s-line.svg b/assets/arrow-down-s-line.svg
new file mode 100644
index 000000000..e1bc908a9
--- /dev/null
+++ b/assets/arrow-down-s-line.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/arrow-up-down-fill.svg b/assets/arrow-up-down-fill.svg
new file mode 100644
index 000000000..056b694e3
--- /dev/null
+++ b/assets/arrow-up-down-fill.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/arrow-up-s-line.svg b/assets/arrow-up-s-line.svg
new file mode 100644
index 000000000..3a424dff0
--- /dev/null
+++ b/assets/arrow-up-s-line.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/copy.svg b/assets/copy.svg
new file mode 100644
index 000000000..84dfcd93e
--- /dev/null
+++ b/assets/copy.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/create_quiz.png b/assets/create_quiz.png
new file mode 100644
index 000000000..e63d5a296
Binary files /dev/null and b/assets/create_quiz.png differ
diff --git a/assets/create_survey.png b/assets/create_survey.png
new file mode 100644
index 000000000..3762801a1
Binary files /dev/null and b/assets/create_survey.png differ
diff --git a/assets/edit-pencil.svg b/assets/edit-pencil.svg
new file mode 100644
index 000000000..379a5f463
--- /dev/null
+++ b/assets/edit-pencil.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/eye-line.png b/assets/eye-line.png
new file mode 100644
index 000000000..4073bc892
Binary files /dev/null and b/assets/eye-line.png differ
diff --git a/assets/gear.svg b/assets/gear.svg
new file mode 100644
index 000000000..2c582a360
--- /dev/null
+++ b/assets/gear.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/linkedin.png b/assets/linkedin.png
new file mode 100644
index 000000000..6e2f555ed
Binary files /dev/null and b/assets/linkedin.png differ
diff --git a/assets/logo.png b/assets/logo.png
new file mode 100644
index 000000000..ee7763033
Binary files /dev/null and b/assets/logo.png differ
diff --git a/assets/mind-map.svg b/assets/mind-map.svg
new file mode 100644
index 000000000..34d98e652
--- /dev/null
+++ b/assets/mind-map.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/qsm-upgrade.png b/assets/qsm-upgrade.png
new file mode 100644
index 000000000..e94ef99d4
Binary files /dev/null and b/assets/qsm-upgrade.png differ
diff --git a/assets/services.png b/assets/services.png
new file mode 100644
index 000000000..c5a2ab0d9
Binary files /dev/null and b/assets/services.png differ
diff --git a/assets/setup.png b/assets/setup.png
new file mode 100644
index 000000000..f172863d4
Binary files /dev/null and b/assets/setup.png differ
diff --git a/assets/support.png b/assets/support.png
new file mode 100644
index 000000000..309d4bf77
Binary files /dev/null and b/assets/support.png differ
diff --git a/assets/trash.svg b/assets/trash.svg
new file mode 100644
index 000000000..e074d3a09
--- /dev/null
+++ b/assets/trash.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/upgrade.png b/assets/upgrade.png
new file mode 100644
index 000000000..39b5ad2fc
Binary files /dev/null and b/assets/upgrade.png differ
diff --git a/css/admin-dashboard-rtl.css b/css/admin-dashboard-rtl.css
index c415610ac..bd0583132 100644
--- a/css/admin-dashboard-rtl.css
+++ b/css/admin-dashboard-rtl.css
@@ -1,11 +1,3 @@
-.welcome-panel-column .dashicons {
- color: #606a73;
- font-size: 23px;
- margin-left: 5px;
- position: relative;
- top: unset!important;
-}
-
.welcome-panel .qsm-welcome-panel-close {
position: absolute;
top: -20px;
diff --git a/css/admin-dashboard.css b/css/admin-dashboard.css
index 778431760..5dcfd44af 100644
--- a/css/admin-dashboard.css
+++ b/css/admin-dashboard.css
@@ -1,15 +1,5 @@
-.welcome-panel-column .dashicons {
- color: #606a73;
- font-size: 23px;
- margin-right: 5px;
- position: relative;
- top: unset!important;
-}
-
.welcome-panel .qsm-welcome-panel-close {
- position: absolute;
- top: -20px;
- right: 10px;
+ position: relative;
padding: 10px 15px 10px 21px;
font-size: 13px;
line-height: 1.23076923;
@@ -58,14 +48,11 @@
}
.welcome-panel .current_version {
- color: #111827;
text-align: center;
- font-size: 16px;
- font-weight: bold;
+ font-size: 14px;
margin: 0;
padding: 0;
position: relative;
- top: -30px;
}
.welcome-panel .welcome-icon {
@@ -976,10 +963,6 @@ h2.hndle.ui-sortable-handle {
box-shadow: 0 0 3px rgba(10, 10, 10, 0.2);
}
-.qsm_dashboard_page .welcome-panel-column{
- display: block;
-}
-
.qsm_dashboard_page.welcome-panel h2 {
margin: 0;
font-size: 21px;
@@ -993,18 +976,152 @@ h2.hndle.ui-sortable-handle {
}
.qsm_dashboard_page.postbox {
- padding: 23px 10px 0;
+ padding: 10px 10px 10px 40px;
+ display: flex;
+ flex-direction: column;
+ background: #1D4ED8;
+}
+
+.qsm_dashboard_page.postbox h1,
+.qsm_dashboard_page.postbox h2,
+.qsm_dashboard_page.postbox h3,
+.qsm_dashboard_page.postbox h4,
+.qsm_dashboard_page.postbox h5,
+.qsm_dashboard_page.postbox h6,
+.qsm_dashboard_page.postbox p,
+.qsm_dashboard_page.postbox a{
+ color: #fff;
}
+.qsm_dashboard_page .welcome-panel-menu {
+ display: flex;
+ flex-direction: row;
+ justify-content: space-between;
+ min-width: 360px;
+ align-self: flex-end;
+ margin: 0;
+}
+.qsm_dashboard_page .welcome-panel-menu li {
+ position: relative;
+}
+.qsm_dashboard_page .welcome-panel-menu li a {
+ text-decoration: underline;
+}
+.qsm_dashboard_page .welcome-panel-menu li:not(:first-child)::before {
+ content: '.';
+ color: #fff;
+ text-decoration: none;
+ position: absolute;
+ bottom: 4px;
+ left: -15px;
+}
.qsm_dashboard_page .welcome-panel-content {
- margin-left: 13px;
- min-height: auto;
- display: block;
+ min-height: 180px;
+ display: flex;
+ flex-direction: row;
+ justify-content: flex-start;
+ align-items: center;
+ padding: 20px 0 45px 0;
+ box-sizing: border-box;
+}
+.qsm-welcome-panel-content {
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+ padding: 0 0 0 25px;
+}
+.qsm-welcome-panel-content img {
+ height: 40px;
+}
+.qsm-welcome-panel-content p {
+ margin: 7px 0;
+ font-size: 14px;
+ line-height: 28px;
+ font-weight: 400;
+}
+.qsm-welcome-panel-content h3 {
+ font-size: 24px;
+ font-weight: 600;
+ line-height: 31.92px;
+ letter-spacing: -0.01em;
+ text-align: left;
+ text-underline-position: from-font;
+ text-decoration-skip-ink: none;
+}
+.qsm-dashboard-cards-container {
+ display: flex;
+ flex-direction: row;
+ flex-wrap: wrap;
+ justify-content: space-between;
+ align-items: center;
+ padding: 15px 0;
+}
+
+.qsm-dashboard-cards-container .qsm-dashboard-card {
+ min-width: 400px;
+ width: 400px;
+ display: flex;
+ flex-direction: row;
+ justify-content: space-between;
+ align-items: flex-start;
+ background: #fff;
+ box-sizing: border-box;
+ padding: 25px;
+}
+
+@media (max-width: 768px) {
+ .qsm-dashboard-cards-container .qsm-dashboard-card {
+ width: 100%;
+ }
+ .qsm-dashboard-cards-container .qsm-dashboard-card:not(:last-child) {
+ margin-bottom: 10px;
+ }
+}
+
+@media (min-width: 770px) and (max-width: 1280px) {
+ .qsm-dashboard-cards-container .qsm-dashboard-card {
+ width: calc(50% - 20px);
+ }
+ .qsm-dashboard-cards-container .qsm-dashboard-card:not(:last-child) {
+ margin-bottom: 10px;
+ }
}
-.qsm_dashboard_page .welcome-panel-column-container {
- padding: 0 !important;
- margin: 1.33em 0 0 !important;
+@media (min-width: 1441px) {
+ .qsm-dashboard-cards-container .qsm-dashboard-card {
+ width: 32%;
+ }
+}
+
+.qsm-dashboard-cards-container .qsm-dashboard-card .qsm-dashboard-card-content {
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+ align-items: flex-start;
+ padding: 0 0 0 20px;
+}
+
+.qsm-dashboard-cards-container .qsm-dashboard-card .qsm-dashboard-card-content .qsm-dashboard-card-buttons {
+ display: flex;
+ flex-direction: row;
+ justify-content: space-between;
+ align-items: flex-start;
+ padding: 10px 0;
+ width: 80%;
+}
+
+.qsm-dashboard-cards-container .qsm-dashboard-card .qsm-dashboard-card-content a {
+ color: #1e1e1e;
+}
+
+.qsm-dashboard-cards-container .qsm-dashboard-card .qsm-dashboard-card-content .button-secondary {
+ border: 2px solid #1e1e1e;
+ border-radius: 5px;
+ background: transparent;
+}
+
+.qsm-dashboard-cards-container .qsm-dashboard-card .qsm-dashboard-card-content h4 {
+ margin: 0;
}
.qsm_dashboard_page p.about-description {
diff --git a/css/qsm-admin.css b/css/qsm-admin.css
index 6dc4748ba..c96cf4a7e 100644
--- a/css/qsm-admin.css
+++ b/css/qsm-admin.css
@@ -1,3 +1,6 @@
+:root {
+ --qsm-primary-button: #2272B1;
+}
/******************** Quizzes/Surveys Page *********************/
@-moz-keyframes qsm-spinner-loader {
0% {
@@ -240,6 +243,7 @@ span.qsm-quiz-name {
margin-bottom: 15px;
font-size: 14px;
font-style: normal;
+ border: 1px solid #555555;
}
.qsm_popular_addons div.popuar-addon-ul>div img {
max-width: 100%;
@@ -456,11 +460,29 @@ span.qsm-quiz-name {
box-shadow: 0px 0px 5px 1px rgba(0, 0, 0, 0.06);
}
.results-page .results-page-content, #qsm_emails .qsm-email .qsm-email-content {
- background: #f8f9f9;
- padding-right: 15px;
- padding-left: 15px;
- width: 100%;
- box-sizing: border-box;
+ background: #fff;
+ padding-right: 10px;
+ padding-left: 5px;
+ width: 100%;
+ box-sizing: border-box;
+}
+
+.results-page-condition .qsm-condition-collection-wrap p, .email-condition .qsm-condition-collection-wrap p {
+ margin-top: 0;
+ font-weight: 600;
+}
+
+.results-page-header .qsm-settings-box-details,
+.qsm-email-header .qsm-settings-box-details {
+ display: none;
+ position: absolute;
+ padding: 10px;
+ border-radius: 5px;
+ background: #fff;
+ border: 1px solid #dfd4d4;
+ margin: 3px 0 0px 25px;
+ max-width: 200px;
+ right: 45px;
}
.results-page-header, #qsm_emails .qsm-email-header {
display: flex;
@@ -485,11 +507,16 @@ span.qsm-quiz-name {
display: flex;
flex-direction: column;
}
-.results-page-when, .results-page-show, .email-when, .email-show {
+.results-page-when, .results-page-show, .qsm-email-when, .email-show {
padding: 15px;
min-width: 60%;
}
-.results-page-when, .email-when {
+.results-page-show input[type="text"], .email-show input[type="text"],
+.results-page-show input[type="url"], .email-show input[type="url"],
+.results-page-show input[type="email"], .email-show input[type="email"] {
+ max-width: 25rem;
+}
+.results-page-when, .qsm-email-when {
margin-right: 15px;
border-right: 1px solid #dfd4d4;
}
@@ -504,20 +531,20 @@ span.qsm-quiz-name {
.email-content-header h4{
font-size: 20px;
margin: 5px 0 15px;
- font-weight: 400;
+ font-weight: 600;
+ color: #1E1E1E;
}
.results-page-condition, .email-condition {
margin-bottom: 15px;
- border-radius: 2px;
- background: #fff;
+ background: #F8F9F9;
padding: 25px 20px;
position: relative;
- border: 1px solid #dfd4d4;
+ border-radius: 10px;
}
.qsm-result-condition-title,
.qsm-email-condition-title {
font-size: 14px;
- display: block;
+ display: none;
font-weight: 500;
margin-bottom: 3px;
color: #959494;
@@ -526,22 +553,51 @@ span.qsm-quiz-name {
.qsm-email-condition-mode {
margin-bottom: 25px;
}
-.results-page-condition select, .qsm_tab_content .results-page-condition .qsm-result-condition-container input[type="text"], .email-condition select, .qsm_tab_content .email-condition .qsm-email-condition-container input[type="text"] {
+.results-page-condition select,
+.qsm_tab_content .results-page-condition .qsm-result-condition-container input[type="text"],
+.email-condition select,
+.qsm_tab_content .email-condition .qsm-email-condition-container input[type="text"],
+.qsm_tab_content .results-page-show .qsm-result-page-common-section select,
+.qsm_tab_content .results-page-show .qsm-result-page-common-section input[type="text"],
+.qsm-email-content .qsm-email-page-common-section select,
+.qsm-email-content .qsm-email-page-common-section input[type="text"],
+.qsm-email-content .qsm-email-page-common-section input[type="email"] {
min-width: auto;
width: 100%;
- border-radius: 4px;
- border-color: #ccc;
+ border-radius: 5px;
+ border-color: #555555;
+ padding-top: 2px;
+ padding-bottom: 2px;
+}
+.results-page-show .mce-path.mce-flow-layout-item.mce-first{
+ display: none;
}
.results-page-condition .qsm-result-condition-container, .email-condition .qsm-email-condition-container, .qsm-result-condition-mode, .qsm-email-condition-mode {
display: flex;
flex-wrap: wrap;
- gap: 5px;
+ gap: 10px;
align-items: flex-end;
}
+
+.email-show .ms-options-wrap>button, .email-show .ms-options-wrap>button:focus,
+.results-page-show .ms-options-wrap>button, .results-page-show .ms-options-wrap>button:focus{
+ width: 100%;
+}
+
.qsm-email-condition-container-inner,
.qsm-result-condition-container-inner{
- width: 33.33%;
+ width: 50%;
}
+
+.results-page-content label, .results-page-content p, .qsm-email-content label, .qsm-email-content p {
+ color: #1E1E1E;
+}
+.qsm-common-svg-image-class {
+ height: 18px;
+ padding: 2px;
+ vertical-align: -webkit-baseline-middle;
+}
+
.delete-condition-button {
background: none;
cursor: pointer;
@@ -564,14 +620,14 @@ span.qsm-quiz-name {
.qsm_tab_content input[type="text"].qsm-email-subject,
.qsm_tab_content input[type="text"].results-page-redirect{
border-radius: 3px;
- border-color: #8C8FAC;
+ border-color: #555555;
}
@media screen and (min-width: 760px) {
.results-page-content, .qsm-email-content {
flex-direction: row;
justify-content: space-around;
}
- .results-page-when, .results-page-show, .email-when, .email-show {
+ .results-page-when, .results-page-show, .qsm-email-when, .email-show {
width: calc(50% - 15px);
min-width: unset;
}
@@ -588,8 +644,7 @@ span.qsm-quiz-name {
flex-direction: column;
}
.qsm_featured_image_preview {
- max-height: 200px;
- max-width: 300px;
+ max-width: 80%;
margin: 5px 0;
border-radius: 3px;
}
@@ -608,9 +663,8 @@ span.qsm-quiz-name {
/******************** About/Credits Page *********************/
div.qsm_icon_wrap {
position: absolute;
- top: -20px;
- right: 0;
- background-color: rgba(54, 58, 66, 1);
+ top: -24px;
+ left: -30px;
color: #111827;
background-position: center 24px;
background-size: 85px 85px;
@@ -622,12 +676,11 @@ div.qsm_icon_wrap {
height: 40px;
display: inline-block;
width: 150px;
- text-rendering: optimizeLegibility;
- border: 5px solid #106daa;
- -moz-border-radius: 20px;
- -webkit-border-radius: 20px;
- -khtml-border-radius: 20px;
- border-radius: 20px;
+}
+.qsm-about-heading img{
+ width: 100px;
+ margin-left: -5px;
+ margin-top: 13px;
}
.qsm-tab-content .feature {
margin-bottom: 20px;
@@ -833,13 +886,16 @@ ul.changelog li.update div.two:before {
.qsm_tab_content label {
margin-right: 5px;
}
+.qsm-upgrade-box .qsm-upgrade-tabs,
.qsm-sub-text-tab-menu,
.qsm-sub-tab-menu {
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items: stretch;
- border-bottom: 1px solid #cecece;
+ border-bottom: 1px solid #E5E7EB;
+ margin: 20px 0;
+ min-height: 44px;
}
.save-text-changes {
display: flex;
@@ -915,12 +971,20 @@ ul.changelog li.update div.two:before {
.currentli_general,
.currentli_variable {
border-left:4px solid #2271b1;
- background-color: #a1cef3;
+ background-color: #E9F1F7;
}
.qsm-custom-label-left-menu a {
color:black;
- padding: 10px 6px;
+ padding: 10px 6px 10px 8px;
width: 100%;
+ font-size: 14px;
+ font-weight: 400;
+ line-height: 19px;
+}
+.qsm-custom-label-left-menu.currentli_general a,
+.qsm-custom-label-left-menu.currentli_variable a,
+.qsm-custom-label-left-menu.currentli a {
+ color: #2271b1;
}
.qsm-sub-tab-menu a,
.qsm-sub-text-tab-menu a,
@@ -931,16 +995,24 @@ ul.changelog li.update div.two:before {
display: inline-block;
box-sizing: border-box;
}
+.qsm-upgrade-box .subsubsub li:first-child,
.qsm-sub-text-tab-menu .subsubsub li:first-child,
.qsm-sub-tab-menu .subsubsub li:first-child {
border-left: 0;
padding-left: 0;
}
+.qsm-upgrade-box .subsubsub li a,
.qsm-sub-text-tab-menu .subsubsub li a,
.qsm-sub-tab-menu .subsubsub li a {
font-size: 14px;
- line-height: 1.2;
- padding: 10px;
+ line-height: 20px;
+ padding: 0 4px 16px 4px;
+ color: #1E1E1E;
+}
+.qsm-upgrade-box .subsubsub li,
+.qsm-sub-text-tab-menu .subsubsub li,
+.qsm-sub-tab-menu .subsubsub li {
+ padding: 0 8px;
}
.qsm_tab_content a:hover,
.qsm_tab_content a:focus {
@@ -950,7 +1022,12 @@ ul.changelog li.update div.two:before {
}
.qsm-sub-text-tab-menu .subsubsub li a.current,
.qsm-sub-tab-menu .subsubsub li a.current{
- border-bottom: 3px solid #00BEE9;
+ border-bottom: 3px solid #2271B1;
+ color: #2271B1;
+}
+.qsm-upgrade-box .subsubsub li a.current {
+ border-bottom: 3px solid #1D4ED8;
+ color: #1D4ED8;
}
/* Popup */
.qsm-popup {
@@ -1244,20 +1321,24 @@ h3.addon_category_name {
margin-left: 15px;
}
/* The switch - the box around the slider */
-.switch {
+.qsm-checkbox-switch {
position: relative;
display: inline-block;
width: 60px;
height: 34px;
}
+.qsm-checkbox-switch.small-switch {
+ width: 50px;
+ height: 22px;
+}
/* Hide default HTML checkbox */
-.switch input[type="checkbox"] {
+.qsm-checkbox-switch input[type="checkbox"] {
opacity: 0;
width: 0;
height: 0;
}
/* The slider */
-.slider {
+.qsm-switch-slider {
position: absolute;
cursor: pointer;
top: 0;
@@ -1268,7 +1349,7 @@ h3.addon_category_name {
-webkit-transition: 0.4s;
transition: 0.4s;
}
-.slider:before {
+.qsm-switch-slider:before {
position: absolute;
content: "";
height: 26px;
@@ -1279,22 +1360,27 @@ h3.addon_category_name {
-webkit-transition: 0.4s;
transition: 0.4s;
}
-input:checked+.slider {
+.qsm-checkbox-switch.small-switch .qsm-switch-slider:before {
+ height: 14px;
+ width: 15px;
+ left: 5px;
+}
+input:checked+.qsm-switch-slider {
background-color: #2196f3;
}
-input:focus+.slider {
+input:focus+.qsm-switch-slider {
box-shadow: 0 0 1px #2196f3;
}
-input:checked+.slider:before {
+input:checked+.qsm-switch-slider:before {
-webkit-transform: translateX(26px);
-ms-transform: translateX(26px);
transform: translateX(26px);
}
/* Rounded sliders */
-.slider.round {
+.qsm-switch-slider.round {
border-radius: 34px;
}
-.slider.round:before {
+.qsm-switch-slider.round:before {
border-radius: 50%;
}
input#sc-shortcode-model-text, input#sc-shortcode-model-text-link {
@@ -1450,6 +1536,93 @@ td.scheduled_time_start {
margin: 0 10px;
width: auto;
}
+
+
+#post-body-content .qsm-popup-upgrade-warning img {
+ width: auto;
+ height: 15px;
+ margin-right: 8px;
+}
+
+.qsm-linked-list-div-block {
+ padding: 4px;
+ margin: 5px 0;
+ margin-top: -20px;
+ width: max-content;
+ background-color: #ffe684;
+ border-radius: 2px;
+}
+
+span.qsm-linked-list-view-button {
+ cursor: pointer;
+ color: #135e96;
+ text-decoration: underline;
+ font-weight: 500;
+}
+
+span.qsm-linked-list-item {
+ margin: 0 0 5px 0;
+ padding: 5px;
+ background: #f0f0f1;
+}
+
+div.qsm-linked-list-inside span.qsm-unlink-the-question {
+ color: #DC3232;
+ font-weight: 500;
+ max-width: 60px;
+ cursor: pointer;
+}
+
+.qsm-linked-list-div-block p {
+ margin: 0;
+ font-size: 13px;
+ color: #856404;
+}
+
+.qsm-linked-list-container {
+ position: absolute;
+}
+
+.qsm-linked-list-div-block .qsm-linked-list-inside {
+ position: relative;
+ right: -155px;
+ top: 20px;
+ z-index: 999;
+ width: 350px;
+ padding: 10px;
+ box-sizing: border-box;
+ border-radius: 4px;
+ background: #ffffff;
+ border: 1px solid #dfd4d4;
+ box-shadow: 0 0 6px 2px #ddd;
+ display: grid;
+ grid-template-columns: 1fr;
+}
+
+.qsm-linked-list-div-block .qsm-linked-list-inside:before {
+ content: " ";
+ position: absolute;
+ top: -24px;
+ left: 28%;
+ margin-left: -12px;
+ border-width: 12px;
+ border-style: solid;
+ border-color: transparent transparent #ffffff transparent;
+ z-index: 1;
+}
+
+.qsm-linked-list-div-block .qsm-linked-list-inside:after {
+ content: " ";
+ position: absolute;
+ top: -26px;
+ left: 28%;
+ margin-left: -12px;
+ border-width: 12px;
+ border-style: solid;
+ border-color: transparent transparent #dfd4d4 transparent;
+ z-index: 0;
+}
+
/** * Text Tab design */
.qsm-text-main-wrap {
display: inline-block;
@@ -1468,14 +1641,18 @@ td.scheduled_time_start {
border: 1px solid #dfd4d4;
}
.qsm-text-main-wrap #postbox-container-1 .qsm-text-header h5 {
- font-size: 14px;
- margin: 0;
- font-weight: bold;
+ font-size: 15px;
+ margin: 0;
+ font-weight: 600;
+ line-height: 30px;
+ color: #1E1E1E;
}
.qsm-text-main-wrap #postbox-container-1 .qsm-text-header .description {
- color: #666;
- display: block;
- font-weight: 400;
+ color: #555555;
+ display: block;
+ font-weight: 400;
+ font-size: 14px;
+ line-height: 19px;
}
.qsm-text-main-wrap .qsm-text-header {
display: flex;
@@ -1503,7 +1680,7 @@ td.scheduled_time_start {
display: inline-block;
position: relative;
text-align: center;
- padding: 0 5px;
+ padding: 0;
}
#show-all-variable-content .popup-template-span-wrap {
margin-bottom: 20px;
@@ -1530,6 +1707,7 @@ td.scheduled_time_start {
}
.qsm-text-template-span.qsm-upgrade-popup-variable .qsm-tooltips-icon {
display: block;
+ border: none;
}
.qsm-text-template-span.qsm-upgrade-popup-variable .qsm-tooltips-icon:before {
display: none;
@@ -1879,14 +2057,18 @@ td.scheduled_time_start {
.qsm-theme-color-settings .qsm-popup__header .qsm-popup__close {
position: relative;
font-size: 22px;
- border: 1px solid #ddd;
padding: 15px;
cursor: pointer;
}
+.qsm-theme-color-settings .qsm-popup__header .qsm-popup__close {
+ border: 1px solid #ddd;
+}
.qsm-standard-popup .qsm-popup__content,
.qsm-theme-color-settings .qsm-popup__content {
padding: 20px;
margin: 0;
+}
+.qsm-theme-color-settings .qsm-popup__content {
box-shadow: inset 0 0 10px 1px #ddd;
}
.qsm-standard-popup .qsm-popup__content a {
@@ -1917,7 +2099,8 @@ td.scheduled_time_start {
align-items: center;
}
.qsm-popup-upgrade .qsm-popup__container {
- max-width: 500px;
+ min-width: 600px;
+ max-width: 600px;
max-height: 90vh;
}
.qsm-popup-upgrade .qsm-popup__container .qsm-popup__content {
@@ -1953,10 +2136,126 @@ td.scheduled_time_start {
display: inline-block;
width: 100%;
box-sizing: border-box;
- padding: 10px;
+ padding: 40px;
max-width: 800px;
+ background: #fff;
+}
+.qsm-upgrade-box-base {
+ display: flex;
+ flex-direction: row;
+ justify-content: space-between;
+ margin-top: 25px;
+ align-items: center;
+ max-width: 100%;
+ width: 671px;
+ background: #EFF6FF;
+ padding: 10px 16px;
+ border-radius: 6px;
+ box-sizing: border-box;
+}
+.qsm-upgrade-box-base-title {
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+}
+.qsm-upgrade-box-base p {
+ font-weight: 500;
+ font-size: 16px;
+ line-height: 20px;
+ color: #1E1E1E;
+ position: relative;
+ right: 20px;
+ left: 15px;
+}
+.qsm-upgrade-box-base a {
+ text-decoration: none;
+ color: #1E1E1E;
+ outline: none;
+ box-shadow: none;
+ font-size: 16px;
+ font-weight: 500;
+}
+.qsm-upgrade-box-base a span {
+ margin-left: 10px;
+}
+.qsm-upgrade-box-base a.qsm-upgrade-button {
+ color: #fff;
+ box-shadow: 0px 0px 0px 2px #6366F1;
+ border: 2px solid #FFFFFF;
+ background: #1D4ED8;
+ font-size: 16px;
+ font-weight: 500;
+ line-height: 16px;
+ text-decoration-skip-ink: none;
+ border-radius: 4px;
+ padding: 6px 10px;
+ position: relative;
+ left: 60px;
+ min-width: 80px;
+ text-align: center;
+}
+.qsm-upgrade-box-base img {
+ height: 23px;
+ width: 23px;
+}
+.qsm-upgrade-box .qsm-upgrade-list-item,
+.qsm-upgrade-box .qsm-upgrade-briefing,
+.qsm-upgrade-box .qsm-upgrade-description {
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ font-size: 16px;
+ font-weight: 400;
+ line-height: 30px;
+ text-align: left;
+ text-underline-position: from-font;
+ text-decoration-skip-ink: none;
+ color: #555555;
+}
+.qsm-upgrade-box .qsm-upgrade-list-item span {
+ margin-right: 10px;
+ background: #D7E1FF;
+ color: #1D4ED8;
+ border-radius: 50%;
+ font-size: 22px;
+ width: 22px;
+ height: 22px;
+}
+.qsm-upgrade-box a,
+.qsm-upgrade-box a:focus {
+ outline: none;
+ box-shadow: none;
+}
+.qsm-upgrade-box .qsm-upgrade-tab-content {
+ padding: 0 0 15px;
+}
+.qsm-upgrade-box-title {
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ justify-content: space-between;
+}
+.qsm-popup__title.qsm-upgrade-box-title {
+ position: relative;
+ top: 10px;
+ left: 15px;
+ color: #000;
+ font-size: 24px;
+ font-weight: 500;
+ line-height: 31.92px;
+ letter-spacing: -0.01em;
+ text-align: left;
+ text-decoration-skip-ink: none;
+}
+.qsm-upgrade-box-title img {
+ margin-right: 10px;
+ height: 20px;
+ position: relative;
+ top: 1px;
+}
+.qsm-popup-upgrade .qsm-upgrade-box {
+ padding: 0 20px 30px;
}
-.qsm-popup-upgrade .qsm-upgrade-box {padding: 0;}
.qsm-popup-upgrade-close {
border:none;
padding:0px;
@@ -1966,6 +2265,7 @@ td.scheduled_time_start {
line-height: normal;
margin: 15px 0 10px;
letter-spacing: 1px;
+ width: 100%;
}
.qsm-upgrade-box .qsm-upgrade-text {
@@ -1976,23 +2276,22 @@ td.scheduled_time_start {
.qsm-upgrade-box .qsm-upgrade-read-icon {
display: flex;
flex-direction: row;
- margin: 10px 0;
+ margin: 10px 0 35px;
flex-wrap: nowrap;
align-items: center;
- font-size: 14px;
+ font-size: 15px;
}
.qsm-upgrade-box .qsm-upgrade-read-icon a {
text-decoration: none;
- font-weight: bold;
display: inline-flex;
flex-direction: row;
flex-wrap: nowrap;
align-content: center;
align-items: center;
margin: 2px 6px 0;
-}
-.qsm-upgrade-box .qsm-upgrade-read-icon img {
- height: 15px;
+ color: #1E1E1E;
+ line-height: 20px;
+ font-weight: 500;
}
.qsm-upgrade-box .qsm-upgrade-right-arrow {
font-size: 16px;
@@ -2144,12 +2443,20 @@ td.scheduled_time_start {
align-content: center;
align-items: center;
}
+.qsm-popup__container .qsm-popup__content .qsm-upgrade-box .qsm-upgrade-buttons a,
.qsm-upgrade-box .qsm-upgrade-buttons.qsm-page-upgrade-buttons a {
- width: auto;
- margin-right: 10px;
- font-weight: 500;
- font-size: 14px;
padding: 10px 20px;
+ min-width: 450px;
+ min-height: 46px;
+ border-radius: 5px;
+ background: #1D4ED8;
+ color: #fff;
+ box-sizing: border-box;
+ font-size: 18px;
+ font-weight: 600;
+ line-height: 23.94px;
+ text-align: center;
+ text-decoration-skip-ink: none;
}
#modal-6 .sc-shortcode-input {
padding: 5px;
@@ -2224,6 +2531,12 @@ td.scheduled_time_start {
display: inline-block;
margin-bottom: 30px;
}
+ .tablenav .tablenav-pages {
+ text-align: right;
+ position: relative;
+ top: 1px;
+ left: 140px
+ }
}
@media screen and (max-width: 782px) {
.form-table td fieldset label {
@@ -2240,6 +2553,11 @@ td.scheduled_time_start {
left: auto;
right: -3px;
}
+ .tablenav .tablenav-pages {
+ top: 61px;
+ width: 45%;
+ text-align: left;
+ }
}
@media screen and (max-width: 767px) {
.qsm-upgrade-box .qsm-upgrade-buttons.qsm-page-upgrade-buttons a {
@@ -2291,9 +2609,6 @@ td.scheduled_time_start {
overflow: scroll;
width: 100%;
}
- p.search-box {
- bottom: -30px;
- }
.quizzes-surveys_page_qsm_quiz_help .hndle {
padding-left: 15px;
padding-bottom: 15px;
@@ -2318,15 +2633,22 @@ td.scheduled_time_start {
margin-bottom: 10px;
}
}
-.qsm-text-template-span {
- min-width: 100px;
-}
.qsm-text-template-span .button {
- padding: 0px;
- border: none;
- min-height: unset;
- font-size: 12px;
- background: unset;
+ padding: 5px 10px;
+ border: 1px solid #2271B1;
+ min-height: unset;
+ font-size: 12px;
+ background: unset;
+ line-height: 16px;
+ font-weight: 400;
+}
+.qsm-theme-featured-image-description {
+ font-size: 16px;
+ font-weight: 400;
+ line-height: 30px;
+ text-align: left;
+ color: #555555;
+ margin: 5px 0 30px 0;
}
.qsm-text-template-span .template-variable:hover {
background: unset;
@@ -2560,20 +2882,19 @@ input#duplicate_questions {
display: inline-flex;
align-items: center;
flex-wrap: nowrap;
- box-shadow: 0 0 5px 0px #ddd;
border-radius: 5px;
margin: 0 5px;
+ border: 1px solid #1E1E1E;
}
.qsm-actions-link-box a:first-child {
border-radius: 5px 0 0 5px;
}
-.qsm-actions-link-box a:last-child {
+.qsm-actions-link-box a:last-child, .qsm-template-btn-group .qsm-actions-link-box a:last-child {
border-radius: 0 5px 5px 0;
}
.qsm-actions-link-box a {
- padding: 9px;
+ padding: 0 6px 4px 6px;
color: #3c434a;
- border: 1px solid #ddd;
cursor: pointer;
}
.qsm-actions-link-box a.disabled {
@@ -2584,6 +2905,20 @@ input#duplicate_questions {
box-shadow: none;
background: #eee;
}
+.qsm-actions-link-box a:not(:first-child) {
+ border-left: 1px solid #d6d6d6;
+}
+.qsm-actions-link-box a.qsm-settings-box-result-button:focus {
+ background-color: #ebf4fc;
+}
+.results-page-when .qsm-new-condition, .qsm-email-when .qsm-new-condition,
+.results-page-when .qsm-new-condition:active, .qsm-email-when .qsm-new-condition:active,
+.results-page-when .qsm-new-condition:focus, .qsm-email-when .qsm-new-condition:focus {
+ width: auto;
+ padding: 0;
+ color: #2271B1;
+ font-size: 14px;
+}
.qsm-actions-link-box a span {
font-size: 16px;
height: auto;
@@ -2694,6 +3029,9 @@ input#duplicate_questions {
box-sizing: border-box;
text-decoration: none;
}
+.contact-form-builder-wrap a img{
+ vertical-align: -webkit-baseline-middle;
+}
.contact-tab-content {
width: 750px;
max-width: 65%;
@@ -3316,6 +3654,15 @@ input#duplicate_questions {
position: relative;
top: 10px;
}
+ p.search-box{
+ display: inline-grid;
+ width: auto;
+ }
+ .tablenav .tablenav-pages {
+ position: relative;
+ top: 80px;
+ width: 140px;
+ }
}
body .qsm_tab_content .qsm-small-input-field input[type="number"],
body .qsm_tab_content .qsm-small-input-field input[type="text"] {
@@ -3384,7 +3731,7 @@ input#preferred-date-format-custom {
position: absolute !important;
z-index: 1000;
background-color: #ffffff;
- border: 1px solid #cccccc;
+ border: 1px solid #dfd4d4;
width: 100%;
max-height: 270px;
border-radius: 6px;
@@ -3412,7 +3759,7 @@ input#preferred-date-format-custom {
}
.mce-container .qsm-autocomplete .qsm-autocomplete-item:hover,
.mce-container .qsm-autocomplete .qsm-autocomplete-item-active {
- background-color: #f0f0f0;
+ background-color: #E8E8E8;
}
.mce-container .qsm-autocomplete .qsm-autocomplete-item .qsm-autocomplete-item-description {
color: #808992;
@@ -3428,15 +3775,16 @@ input#preferred-date-format-custom {
}
.qsm-hightlight-text,
.mce-qsm-variables-editor-btn button{
- background: #187FFA;
+ background: #DCEDFA;
border-radius: 2px;
display: inline-block;
text-align: center;
border: none;
+ color: #1E1E1E;
}
.qsm-hightlight-text,
.mce-qsm-variables-editor-btn button span.mce-txt{
- color: #ffffff;
+ color: #1E1E1E;
padding: 0px 7px;
}
/*TinyMCE Text-editor : end */
@@ -3468,25 +3816,228 @@ input#preferred-date-format-custom {
}
/* Extra shortcodes popup */
button.button.qsm-extra-shortcode-popup {
- display: flex;
+ display: inline-flex;
align-items: center;
- position: relative;
- top: 30px;
- left: 197px;
- z-index: 10;
}
-button.button.qsm-slashcommand-variables-button {
- display: flex;
+button.button.qsm-extra-shortcode-popup span.dashicons.dashicons-shortcode {
+ margin-right: 4px;
+}
+
+.results-page-show .wp-media-buttons button.button {
+ border: 1px solid #2271B1;
+ font-weight: 500;
+}
+
+.qsm_page_mlw_quiz_results .result-page-wrapper .widefat tbody td input[type="checkbox"],
+.qsm_page_mlw_quiz_results .result-page-wrapper .widefat thead th input[type="checkbox"] {
+ margin: 0 auto;
+ display: block;
+}
+
+.qsm-quiz-result-tab button.add-new-page,
+.qsm-quiz-email-tab button.add-new-email {
+ border: 1px solid #2271B1;
+ font-weight: 500;
+}
+
+.qsm-extra-shortcode-conditional-button img.qsm-common-svg-image-class {
+ vertical-align: text-top;
+ padding: 0 1px 0 0;
+}
+
+.contact-form-actions .contact-form-actions-box a.disabled {
+ opacity: 0.5;
+}
+
+@media screen and (max-width: 782px) {
+ .qsm-email-condition-container-inner, .qsm-result-condition-container-inner {
+ width: 100%;
+ }
+}
+
+.mce-container .qsm-autocomplete .qsm-autocomplete-item-title{
+ color: #1E1E1E;
+ background: #DCEDFA;
+ padding: 7px;
+ font-size: 12px;
+}
+
+.mce-container .qsm-autocomplete .qsm-autocomplete-item:hover .qsm-autocomplete-item-title,
+.mce-container .qsm-autocomplete .qsm-autocomplete-item-active .qsm-autocomplete-item-title {
+ background-color: #FFFFFF;
+}
+
+.mce-container .qsm-autocomplete .qsm-autocomplete-no-item {
+ color: #1E1E1E;
+ padding: 10px 8px;
+ font-size: 12px;
+}
+.mce-container .qsm-autocomplete .qsm-autocomplete-input-container {
+ display: flex;
+ align-items: center;
+ padding: 5px 15px;
+}
+.mce-container .qsm-autocomplete input.qsm-autocomplete-search-input{
+ width: calc(100% - 85px);
+ margin-left: 15px;
+}
+.qsm-result-page-content-buttons {
+ margin-top: 5px;
+}
+
+.results-page-show .qsm-result-page-content-buttons button.button:not(:first-child) {
+ margin-left: 7px;
+}
+
+.results-page-show .qsm-result-page-content-buttons button.button {
+ border-color: #2271B1;
+ font-weight: 500;
+}
+.results-page-show .quicktags-toolbar input[type="button"]{
+ border-color: #2271B1;
+}
+span.qsm-insert-template-variable-text {
+ line-height: 2;
+ margin-left: 7px;
+ color: #1E1E1E;
+}
+
+.qsm-quiz-result-tab p.qsm-result-redirect-text {
+ margin-bottom: 5px;
+ margin-top: 20px;
+}
+
+.qsm_page_mlw_quiz_results .widefat tbody td input[type="checkbox"],
+.qsm_page_mlw_quiz_results .widefat thead th input[type="checkbox"] {
+ margin: 0 auto;
+ display: block;
+}
+
+.qsm_page_mlw_quiz_results .result-page-wrapper .pagination-links{
+ border: 1px solid #8c8f94;
+ background-color: #fff;
+ padding: 6px 0;
+ border-radius: 3px;
+}
+
+.qsm_page_mlw_quiz_results .result-page-wrapper .pagination-links .next-page,
+.qsm_page_mlw_quiz_results .pagination-links .prev-page{
+ border: none;
+ background: none;
+ color: #000;
+ border-radius: none;
+}
+.qsm_page_mlw_quiz_results .result-page-wrapper .pagination-links .next-page{
+ border-left: 1px solid #b3aeae;
+}
+.qsm_page_mlw_quiz_results .result-page-wrapper .pagination-links .prev-page{
+ border-right: 1px solid #b3aeae;
+}
+.qsm_page_mlw_quiz_results .tablenav-pages .paging-input {
+ display: inline-flex;
align-items: center;
- position: relative;
- top: 30px;
- left: 110px;
- z-index: 10;
- margin: -30px 0;
}
-button.button.qsm-slashcommand-variables-button .qsm-slash-inside {
- margin: 0 4px 0 -1px;
- font-weight: 1000;
+.qsm_page_mlw_quiz_results .tablenav-pages .total-pages {
+ margin-left: 5px;
+ font-size: 0.9em;
+ color: #666;
+}
+.qsm_page_mlw_quiz_results .tablenav .tablenav-pages .button{
+ padding: 0;
+ line-height: 28px;
+}
+.qsm_page_mlw_quiz_results .result-page-wrapper .pagination-links a.button:hover,
+.qsm_page_mlw_quiz_results .result-page-wrapper .pagination-links a.button:focus,
+.qsm_page_mlw_quiz_results .result-page-wrapper .pagination-links a.button:active {
+ background: none;
+ box-shadow: none;
+ color: inherit;
+}
+.qsm_page_mlw_quiz_results .result-page-wrapper .tablenav-pages .pagination-links .disable{
+ background-color: #f0f0f1;
+}
+.qsm_page_mlw_quiz_results .result-page-wrapper .pagination-links .prev-page.disable:hover,
+.qsm_page_mlw_quiz_results .result-page-wrapper .pagination-links .next-page.disable:hover{
+ background-color: #f0f0f1;
+}
+.qsm_page_qsm_quiz_about .about-wrap{
+ margin: 10px 0 0;
+}
+.qsm_page_qsm_quiz_about .about-wrap .wp-person .gravatar{
+ border-radius: 30px;
+}
+.qsm_page_qsm_quiz_about .qsm-about-heading h1{
+ font-size: 18px;
+ display: inline-block;
+ position: absolute;
+ font-weight: 400;
+ line-height: 28px;
+ top: 37px;
+}
+.qsm_page_qsm_quiz_about .about-wrap h2{
+ font-size: 18px;
+ font-weight: 600;
+ line-height: 28px;
+ text-align: left;
+}
+.qsm_page_qsm_quiz_about .about-wrap div h2{
+ margin: 50px 0 30px;
+}
+.qsm_page_qsm_quiz_about .about-wrap .wp-person .web{
+ color: #000;
+ line-height: 3.5;
+}
+.qsm_page_qsm_quiz_about .about-wrap .wp-person{
+ width: 250px;
+}
+.qsm_page_qsm_quiz_about .help-slide{
+ display: flex;
+ margin: 10px;
+ flex-wrap: wrap;
+}
+.qsm_page_qsm_quiz_about .help-slide div{
+ width: 400px;
+ height: 250px;
+ border: 1px solid #E6E6E6;
+ margin: 20px;
+ flex-direction: column;
+ display: flex;
+ padding: 20px;
+ justify-content: center;
+}
+
+.qsm_page_qsm_quiz_about .help-slide div img{
+ width: 44px;
+ height: 44px;
+ padding: 5.5px 3.67px 2.75px 3.67px;
+}
+.qsm_page_qsm_quiz_about .help-slide div a{
+ border: 2px solid #000;
+ padding: 5px 10px;
+ border-radius: 3px;
+ width: fit-content;
+ text-decoration: none;
+ font-size: 14px;
+ font-weight: 600;
+ color: #000;
+ margin-top: 10px;
+}
+.qsm_page_qsm_quiz_about .qsm-system-info-page{
+ margin-right: 0;
+ margin-top: 0;
+}
+.qsm_page_qsm_quiz_about .qsm-system-info-page .hide-if-no-js{
+ display: none;
+}
+.qsm-popup #theme-color-settings-content select,
+.qsm-popup #theme-color-settings-content input {
+ border-radius: 5px;
+ border-color: #ccc;
+ padding-top: 2px;
+ padding-bottom: 2px;
+}
+.qsm-global-settings-theme-browser {
+ padding: 20px 5px;
}
\ No newline at end of file
diff --git a/js/qsm-admin.js b/js/qsm-admin.js
index 264c1e751..b22aed938 100644
--- a/js/qsm-admin.js
+++ b/js/qsm-admin.js
@@ -229,6 +229,9 @@ var QSMAdmin;
jQuery('.load-quiz-wizard').click(function (e) {
e.preventDefault();
MicroModal.show('model-wizard');
+ if ( jQuery(this).attr('data-formType') == 1 ) {
+ jQuery(document).find('.qsm-popup input[name="form_type"][value="1"]').prop('checked', true).change();
+ }
var height = jQuery(".qsm-wizard-template-section").css("height");
jQuery(".qsm-wizard-setting-section").css("height", height);
if (jQuery("#accordion").length > 0) {
@@ -788,6 +791,15 @@ jQuery('.quiz_text_tab').click(function (e) {
jQuery('#' + current_id).show();
jQuery(document).trigger('qsm_quiz_text_tab_after', [current_id]);
});
+jQuery('.qsm-upgrade-tab').click(function (e) {
+ e.preventDefault();
+ let current_id = jQuery(this).attr('data-id');
+ jQuery('.qsm-upgrade-tab').removeClass('current');
+ jQuery(this).addClass('current');
+ jQuery('.qsm-upgrade-tab-content').hide();
+ jQuery('#' + current_id).show();
+ jQuery(document).trigger('qsm_upgrade_tab_after', [current_id]);
+});
if (jQuery('body').hasClass('admin_page_mlw_quiz_options')) { var current_id = jQuery(this).attr('data-id'); if(current_id == 'qsm_general_text'){ jQuery(".current_general")[0].click();}
if(current_id == 'qsm_variable_text'){ jQuery(".current_variable")[0].click();}
if (window.location.href.indexOf('tab=style') > 0) {
@@ -804,7 +816,10 @@ if(current_id == 'qsm_variable_text'){ jQuery(".current_variable")[0].click();}
jQuery(document).on('input', '.quiz_featured_image', function () {
jQuery('.qsm_featured_image_preview').attr('src', jQuery(this).val());
});
-
+ jQuery(document).on('click', '.qsm-theme-featured-image-change', function (e) {
+ e.preventDefault();
+ jQuery('.qsm-theme-featured-image-update').toggle();
+ });
jQuery(document).on('click', '.filter-links a', function () {
let current_id = jQuery(this).attr('data-id');
jQuery(this).parents('.filter-links').find('li a').each(function () {
@@ -820,29 +835,38 @@ if(current_id == 'qsm_variable_text'){ jQuery(".current_variable")[0].click();}
});
})
});
+ }
+}
- jQuery(document).ready(function () {
- jQuery(document).on('click', '.qsm-customize-color-settings', function (e) {
- e.preventDefault();
- MicroModal.show('qsm-theme-color-settings');
- if (jQuery('.qsm-color-field').length > 0) {
- jQuery('.qsm-color-field').wpColorPicker();
- jQuery('.qsm-color-field').each(function () {
- if (jQuery(this).attr('data-label')) {
- jQuery(this).parents('.wp-picker-container').find('.wp-color-result-text').html( jQuery(this).attr('data-label') );
- }
- });
-
+jQuery(document).ready(function () {
+ jQuery(document).on('click', '.qsm-customize-color-settings', function (e) {
+ e.preventDefault();
+ let modalId = jQuery(this).data('modal-id');
+ if ( modalId == undefined ) {
+ MicroModal.show('qsm-theme-color-settings');
+ } else {
+ MicroModal.show('qsm-theme-color-settings-' + modalId);
+ }
+ if (jQuery('.qsm-color-field').length > 0) {
+ jQuery('.qsm-color-field').wpColorPicker();
+ jQuery('.qsm-color-field').each(function () {
+ if (jQuery(this).attr('data-label')) {
+ jQuery(this).parents('.wp-picker-container').find('.wp-color-result-text').html( jQuery(this).attr('data-label') );
}
});
- });
- }
-}
+ }
+ });
+});
//QSM - Quizzes/Surveys Page
(function ($) {
+ $('#qsm-upgrade-popup-opener').on( 'click', function (event) {
+ event.preventDefault();
+ let modalName = $(this).data('popup');
+ MicroModal.show( modalName );
+ });
if (jQuery('body').hasClass('post-type-qsm_quiz')) {
$('#new_quiz_button_two').on('click', function (event) {
@@ -1176,7 +1200,7 @@ function qsm_is_substring_in_array( text, array ) {
//Add stylesheet
editor.settings.extended_valid_elements = 'qsmvariabletag';
editor.settings.custom_elements = '~qsmvariabletag';
- editor.settings.content_style = 'qsmvariabletag { color: #ffffff; background: #187FFA; padding: 5px 8px; border-radius: 2px;font-family: Arial, Helvetica, sans-serif;font-size: 12px; font-weight: 600; }';
+ editor.settings.content_style = 'qsmvariabletag { color: #1E1E1E; background: #DCEDFA; margin: 0 3px; padding: 5px 8px; font-family: Arial, Helvetica, sans-serif;font-size: 12px;border-top: 1px solid #fff; line-height: 2.3; } qsmvariabletag:hover{ border: 1px solid #2271B1; background-color: #fff; box-shadow: 0px 4px 4px 0px #00000033; }';
editor.addButton('qsm_slash_command', {
text: '/ ' +qsm_admin_messages.variables,
tooltip: qsm_admin_messages.insert_variable,
@@ -1227,6 +1251,29 @@ function qsm_is_substring_in_array( text, array ) {
qsm_search = '';
}
+ // Create a container div for the input and label
+ let inputContainer = document.createElement('div');
+ inputContainer.className = 'qsm-autocomplete-input-container'; // Add a class for styling if needed
+
+ // Create a label element
+ let inputLabel = document.createElement('label');
+ inputLabel.for = 'searchInput';
+ inputLabel.textContent = 'Search:';
+
+ // Create the input element
+ let searchInput = document.createElement('input');
+ searchInput.type = 'text';
+ searchInput.id = 'searchInput'; // Link this id with the label
+ searchInput.placeholder = 'Type to search...';
+ searchInput.className = 'qsm-autocomplete-search-input'; // Add a class for styling if needed
+
+ // Append the label and input to the container
+ inputContainer.appendChild(inputLabel);
+ inputContainer.appendChild(searchInput);
+
+ // Append the container to the autocomplete div
+ autocomplete.appendChild(inputContainer);
+
if ( 0 < newCommand.length ) {
let var_group = [];
newCommand.forEach(function (command, key) {
@@ -1246,7 +1293,8 @@ function qsm_is_substring_in_array( text, array ) {
}
item.classList.add('qsm-autocomplete-item');
item.setAttribute('title', command.description);
- item.innerHTML = "/" + command.name + "" + command.description + "";
+ item.setAttribute('variable', command.name);
+ item.innerHTML = "%" + command.name + "%" + command.description + "";
item.onclick = function() {
for (let i = 0; i <= qsm_search.length; i++) {
editor.execCommand('Delete');
@@ -1384,6 +1432,35 @@ function qsm_is_substring_in_array( text, array ) {
editor.selection.setContent(contentToInsert);
showAutocomplete(editor, true);
});
+
+ $(document).off('input', '.qsm-autocomplete-search-input').on('input', '.qsm-autocomplete-search-input', function () {
+ let query = $(this).val().toLowerCase(); // Get the current input value and convert to lowercase
+ let hasResults = false;
+
+ $('.qsm-autocomplete-item').each(function () {
+ let title = $(this).attr('variable').toLowerCase(); // Get the title attribute of the current item
+ if (title.includes(query)) {
+ $(this).show(); // Show items that match the query
+ hasResults = true; // At least one item matches
+ } else {
+ $(this).hide(); // Hide items that don't match
+ }
+ });
+
+ // Check for the "no items" message
+ let noItemElement = $(this).parents('.qsm-autocomplete').find('.qsm-autocomplete-no-item');
+
+ if (hasResults) {
+ noItemElement.remove(); // Remove the "no items" message if results are found
+ $(this).parents('.qsm-autocomplete').find('.qsm-autocomplete-item-group').show();
+ } else if (noItemElement.length === 0) { // Append only if it doesn't already exist
+ let item_group = document.createElement('div');
+ item_group.className = 'qsm-autocomplete-no-item';
+ item_group.textContent = qsm_admin_messages.no_variables;
+ $(this).parents('.qsm-autocomplete').append(item_group);
+ $(this).parents('.qsm-autocomplete').find('.qsm-autocomplete-item-group').hide();
+ }
+ });
});
}
}
@@ -1495,7 +1572,7 @@ var QSMContact;
required: field.find('.qsm-required-control').prop('checked'),
hide_label: field.find('.qsm-hide-label-control').prop('checked'),
use_default_option: field.find('.qsm-use-default-control').prop('checked'),
- use: field.find('.use-control').val(),
+ use: field.find('.use-control').val() || field.find('.label-control').val().toLowerCase(),
enable: field.find('.enable-control').prop('checked'),
};
/**
@@ -1764,7 +1841,7 @@ var QSMContact;
},
addCondition: function ($email, category, extra_condition, criteria, operator, value) {
var template = wp.template('email-condition');
- $email.find('.email-when-conditions').append(template({
+ $email.find('.qsm-email-when-conditions').append(template({
'category': category,
'extra_condition': extra_condition,
'criteria': criteria,
@@ -1792,6 +1869,11 @@ var QSMContact;
newCondition: function ($email) {
QSMAdminEmails.addCondition($email, 'quiz', '', 'score', 'equal', 0);
},
+ updateEmailConditonCount: function ( $parent ) {
+ $parent.find('.email-condition').each(function (index) {
+ jQuery(this).find('.qsm-condition-collection-count').text(index + 1);
+ });
+ },
addEmail: function (conditions, to, subject, content, replyTo, default_mark = false) {
QSMAdminEmails.total += 1;
var template = wp.template('email');
@@ -1877,17 +1959,17 @@ var QSMContact;
event.preventDefault();
$page = $(this).closest('.qsm-email');
QSMAdminEmails.newCondition($page);
+ QSMAdminEmails.updateEmailConditonCount($(this).parents('.qsm-email-when'));
});
$('#qsm_emails').on('click', '.qsm-delete-email-button', function (event) {
event.preventDefault();
$(this).closest('.qsm-email').remove();
});
- jQuery(document).on('click', '.qsm-toggle-email-template-button', function () {
- jQuery(this).closest("header").next("main").slideToggle();
- });
$('#qsm_emails').on('click', '.delete-condition-button', function (event) {
event.preventDefault();
+ let $parent = $(this).parents('.qsm-email-when');
$(this).closest('.email-condition').remove();
+ QSMAdminEmails.updateEmailConditonCount($parent);
});
});
}
@@ -1899,6 +1981,8 @@ var QSMContact;
*/
var QSMQuestion;
var import_button;
+var qsm_link_button;
+var QSM_Quiz_Broadcast_Channel;
(function ($) {
if (jQuery('body').hasClass('admin_page_mlw_quiz_options')) {
if (window.location.href.indexOf('&tab') == -1 || window.location.href.indexOf('tab=questions') > 0) {
@@ -1906,6 +1990,142 @@ var import_button;
$.QSMSanitize = function (input) {
return input.replace(/<(|\/|[^>\/bi]|\/[^>bi]|[^\/>][^>]+|\/[^>][^>]+)>/g, '');
};
+ QSM_Quiz_Broadcast_Channel = {
+ channel: new BroadcastChannel('qsm_quiz_data_channel'),
+ questionData: [], // Initialize as an array
+
+ // Initialize the event listeners and set up channel
+ init: function () {
+ this.setupChannelListener();
+ },
+
+ // Listen for messages on the channel
+ setupChannelListener: function () {
+ this.channel.onmessage = (event) => {
+ const receivedData = event.data;
+ const { requestType, ...questions } = receivedData;
+ if (requestType == 'update') {
+ this.updateQuestionData(questions);
+ } else if (requestType == 'unlink') {
+ this.afterUpdateUnlinkedQuestion(questions);
+ }
+ };
+ },
+
+ insertQuestionToChannel: function (question) {
+ let linkQuizzesArray = Object.values(question.get('link_quizzes'));
+
+ let sendDataObject = {
+ [question.id]: {
+ merged_question: question.get('merged_question'),
+ link_quizzes: linkQuizzesArray
+ }
+ };
+ this.questionData.push(sendDataObject);
+ },
+
+ // Function to send the linked question data to other tabs
+ sendQuestionData: function (questionID, mergedQuestion, linkedQuizzes = []) {
+ let sendDataObject = {
+ [questionID]: {
+ merged_question: mergedQuestion,
+ link_quizzes: linkedQuizzes
+ },
+ requestType: 'update'
+ };
+ // update channel with new question
+ this.questionData.push(sendDataObject);
+ this.channel.postMessage(sendDataObject);
+ },
+
+ updateQuestionData: function (data){
+ const receivedData = data;
+ for (let questonId in receivedData) {
+ const mergedQuestions = receivedData[questonId].merged_question;
+ const receivedQuizzes = receivedData[questonId].link_quizzes;
+ if (mergedQuestions && typeof mergedQuestions == 'string') {
+ // Check if there's a colon and extract the part after it
+ let idsArray = [];
+ if (mergedQuestions && mergedQuestions != '') {
+ idsArray = mergedQuestions.split(',').map(id => id.trim());
+ }
+ if (idsArray.length > 0) {
+ // Loop through each ID in idsArray
+ idsArray.forEach(eachId => {
+ // Loop through this.questionData to find matches
+ let currentquestionData = this.questionData;
+ currentquestionData.forEach((item, index) => {
+ // Check if the current item's key matches the current eachId
+ if (item[eachId]) {
+ let quizNamesToCheck = this.questionData[index][eachId].link_quizzes;
+ receivedQuizzes.forEach(quizName => {
+ if (!quizNamesToCheck.includes(quizName)) {
+ quizNamesToCheck.push(quizName); // Add the quiz name to the array
+ }
+ });
+ quizNamesToCheck = quizNamesToCheck.filter(function(quizName) {
+ return quizName !== jQuery(document).find('#edit_quiz_name').val();
+ });
+ // Update channel data
+ this.questionData[index][eachId].link_quizzes = quizNamesToCheck;
+ this.questionData[index][eachId].merged_question = mergedQuestions;
+ // Update current quiz question data
+ let currentInQuizQuestion = QSMQuestion.questions.get(eachId);
+ currentInQuizQuestion.set('merged_question', mergedQuestions);
+ currentInQuizQuestion.set('link_quizzes', quizNamesToCheck);
+ }
+ });
+ });
+ }
+ }
+ }
+ // Console log updated questionData
+ console.log("Updated quiz data:", this.questionData);
+ },
+
+ unlinkQuestionData: function (model, currentQuestionId) {
+ let mergedQuestionIdString = model.get('merged_question');
+ let mergedQuestionIdArray = mergedQuestionIdString ? mergedQuestionIdString.split(',') : [];
+ // Filter out the questionId
+ let removedDeletedQuestionArray = mergedQuestionIdArray.filter(id => id !== String(currentQuestionId));
+ // Create a new string from the filtered array
+ let removedDeletedQuestionString = removedDeletedQuestionArray.join(',');
+ // console.log(mergedQuestionIdString, mergedQuestionIdArray, removedDeletedQuestionArray, removedDeletedQuestionString);
+ let sendDataObject = {
+ [currentQuestionId]: {
+ merged_question: removedDeletedQuestionString,
+ link_quizzes: jQuery(document).find('#edit_quiz_name').val(),
+ },
+ requestType: 'unlink'
+ };
+ this.channel.postMessage(sendDataObject);
+ model.set('merged_question', '');
+ model.set('link_quizzes', []);
+ },
+
+ afterUpdateUnlinkedQuestion: function (data) {
+ const receivedData = data;
+ for (let questonId in receivedData) {
+ const mergedQuestions = receivedData[questonId].merged_question;
+ const singleQuizName = receivedData[questonId].link_quizzes;
+ this.questionData.forEach((item) => {
+ Object.keys(item).forEach(key => {
+ if (item[key] && item[key].merged_question && item[key].link_quizzes) {
+ if (mergedQuestions.split(',').includes(key)) {
+ item[key].merged_question = mergedQuestions;
+ item[key].link_quizzes = item[key].link_quizzes.filter(quiz => quiz != singleQuizName);
+ // Update current quiz question data
+ let currentInQuizQuestion = QSMQuestion.questions.get(key);
+ currentInQuizQuestion.set('merged_question', mergedQuestions);
+ currentInQuizQuestion.set('link_quizzes', item[key].link_quizzes.filter(quiz => quiz != singleQuizName));
+ }
+ }
+ });
+ });
+ }
+ },
+ };
+
QSMQuestion = {
question: Backbone.Model.extend({
defaults: {
@@ -2028,6 +2248,26 @@ var import_button;
}
if ( 1 > questions.length ) {
$('#question-bank').append('
' + qsm_admin_messages.questions_not_found + '
');
+ } else {
+ $('.question-bank-question').each(function () {
+ let questionId = $(this).data('question-id');
+ if (QSMQuestion.questions.some(q => q.get('id') == questionId)) {
+ let $linkButton = $(this).find('.link-question');
+ if ($linkButton.length) {
+ $linkButton.prop('disabled', true).addClass('disabled');
+ }
+ }
+ QSMQuestion.questions.each(function (question) {
+ let merged_questions = question.get('merged_question');
+ let questionsArray = merged_questions ? merged_questions.split(',').map(q => q.trim()) : [];
+ questionsArray.forEach(function (id) {
+ let parentElement = $('.question-bank-question[data-question-id="' + id + '"]');
+ if (parentElement.length) {
+ parentElement.remove(); // Remove the element if it exists
+ }
+ });
+ });
+ });
}
},
addQuestionToQuestionBank: function (question) {
@@ -2041,19 +2281,22 @@ var import_button;
type: question.type,
question: questionText,
category: question.category,
- quiz_name: question.quiz_name
+ quiz_name: question.quiz_name,
+ linked_question: question.linked_question.join(',')
}));
},
- addQuestionFromQuestionBank: function (questionID) {
+ addQuestionFromQuestionBank: function (questionID, is_linking = 0) {
QSMAdmin.displayAlert(qsm_admin_messages.adding_question, 'info');
+ let isLinkingData = is_linking == 1 ? questionID : 0;
var model = new QSMQuestion.question({
- id: questionID
+ id: questionID,
+ is_linking: isLinkingData
});
model.fetch({
headers: {
'X-WP-Nonce': qsmQuestionSettings.nonce
},
- url: wpApiSettings.root + 'quiz-survey-master/v1/questions/' + questionID,
+ url: wpApiSettings.root + 'quiz-survey-master/v1/questions/' + questionID + '?is_linking=' + isLinkingData,
success: QSMQuestion.questionBankSuccess,
error: QSMAdmin.displayError
});
@@ -2120,6 +2363,7 @@ var import_button;
question = QSMQuestion.questions.get(qsmQuestionSettings.pages[i][j]);
if ('undefined' !== typeof question) {
QSMQuestion.addQuestionToPage(question);
+ QSM_Quiz_Broadcast_Channel.insertQuestionToChannel(question);
}
}
}
@@ -2236,6 +2480,26 @@ var import_button;
addNewQuestionFromQuestionBank: function (model) {
var page = parseInt($('#add-question-bank-page').val(), 10);
model.set('page', page);
+ if (qsm_link_button && !model.get('merged_question').split(',').includes(model.id)) {
+ // Retrieve the current value
+ let mergedQuestion = model.get('merged_question');
+ // Update the merged question by adding the new ID
+ mergedQuestion += `,${model.id}`;
+ // Set the updated value back to the model
+ model.set('merged_question', mergedQuestion);
+
+ let quizId = model.get('quizID');
+ let quizName = '';
+
+ for (const record of qsm_admin_messages.qsmQuizzesObject) {
+ if (record.quiz_id == quizId) { quizName = record.quiz_name; break; }
+ }
+ const linkQuizzes = [...model.get('link_quizzes')]; // Created a shallow copy of the array
+ if (quizName !== '') {
+ linkQuizzes.push(quizName);
+ }
+ QSM_Quiz_Broadcast_Channel.sendQuestionData(model.id, model.get('merged_question'), linkQuizzes);
+ }
QSMQuestion.questions.add(model);
QSMQuestion.addQuestionToPage(model);
QSMQuestion.savePages();
@@ -2245,10 +2509,18 @@ var import_button;
if(import_button){
import_button.html(qsm_admin_messages.add_question);
}
+ if(qsm_link_button) {
+ qsm_link_button.html(qsm_admin_messages.link_question);
+ }
if(import_button){
import_button.attr("onclick", "return confirm('" + qsm_admin_messages.confirm_message + " " + qsm_admin_messages.import_question_again + "');");
}
QSMQuestion.openEditPopup(model.id, $('.question[data-question-id=' + model.id + ']').find('.edit-question-button'));
+ if(qsm_link_button == ''){
+ $(document).find('.qsm-linked-list-inside').hide().empty();
+ $(document).find('.qsm-linked-list-div-block').hide();
+ }
+ // $('#save-popup-button').trigger('click');
},
addNewQuestion: function (model) {
var default_answers = parseInt(qsmQuestionSettings.default_answers);
@@ -2315,6 +2587,8 @@ var import_button;
var model = QSMQuestion.questions.get(questionID);
var newModel = _.clone(model.attributes);
newModel.id = null;
+ newModel.merged_question = '';
+ newModel.link_quizzes = '';
QSMQuestion.questions.create(
newModel, {
headers: {
@@ -2345,6 +2619,7 @@ var import_button;
var type = $("#question_type").val();
var comments = $("#comments").val();
let required = $(".questionElements input[name='required']").is(":checked") ? 0 : 1;
+ let isPublished = $(".questionElements input[name='question_status']").is(":checked") ? 1 : 0;
advanced_option['required'] = required;
var category = $(".category-radio:checked").val();
var type_arr = [];
@@ -2433,6 +2708,7 @@ var import_button;
});
model.set('answers', answers);
model.set('required', required);
+ model.set('is_published', isPublished);
jQuery(document).trigger('qsm_save_question_before', [questionID, CurrentElement, model, advanced_option]);
$('.questionElements .advanced-content > .qsm-row:not(.core-option)').each(function () {
if ($(this).find('input[type="text"]').length > 0) {
@@ -2747,6 +3023,9 @@ var import_button;
}
//Append extra settings
var all_setting = question.get('settings');
+ if ((typeof all_setting === 'undefined') || (all_setting && typeof all_setting.isPublished === 'undefined')) {
+ $('#qsm-question-status').prop('checked', true).trigger('change');
+ }
if (all_setting === null || typeof all_setting === "undefined") { } else {
$.each(all_setting, function (index, value) {
if ($('#' + index + '_area').length > 0) {
@@ -2764,6 +3043,13 @@ var import_button;
if (index == 'matchAnswer') {
$('#match-answer').val(value);
}
+ if (index == 'isPublished') {
+ if ( all_setting.isPublished == 1 ) {
+ $('#qsm-question-status').prop('checked', true).trigger('change');
+ } else {
+ $('#qsm-question-status').prop('checked', false).trigger('change');
+ }
+ }
});
jQuery(document).trigger('qsm_all_question_setting_after', [all_setting]);
}
@@ -2782,6 +3068,31 @@ var import_button;
$('#image_size_area').show();
}
+ let link_quizzes_object = question.get('link_quizzes');
+
+ $('.qsm-linked-list-inside').hide().empty();
+ $('.qsm-linked-list-div-block').hide();
+ if (typeof link_quizzes_object == 'object' && link_quizzes_object != null && Object.keys(link_quizzes_object).length > 0) {
+ Object.values(link_quizzes_object).forEach(function(quizName) {
+ // Ensure each quizName is a valid non-empty string
+ if (quizName && typeof quizName == 'string' && quizName.trim().length > 0) {
+ let link = $('')
+ .attr('class', 'qsm-linked-list-item')
+ .attr('title', quizName)
+ .text(quizName.length > 25 ? quizName.substring(0, 25) + '...' : quizName);
+
+ $('.qsm-linked-list-div-block').show();
+ $('.qsm-linked-list-inside').append(link);
+ }
+ });
+
+ // Add an "Unlink" link at the end
+ let unlink = $('')
+ .attr('class', 'qsm-unlink-the-question button button-danger')
+ .attr('data-question-id', questionID)
+ .text(qsm_admin_messages.unlink_question);
+ $('.qsm-linked-list-inside').append(unlink);
+ }
jQuery(document).trigger('qsm_open_edit_popup', [questionID, CurrentElement]);
},
openEditPagePopup: function (pageID) {
@@ -3057,6 +3368,8 @@ var import_button;
if (response.success) {
checkedValues.forEach(function (questionId) {
$('.question[data-question-id="' + questionId + '"]').remove();
+ let model = QSMQuestion.questions.get(questionId);
+ QSM_Quiz_Broadcast_Channel.unlinkQuestionData(model, questionId);
});
jQuery('.qsm-admin-select-page-question').prop('checked',false);
QSMQuestion.countTotal();
@@ -3079,6 +3392,8 @@ var import_button;
success: function (response) {
if (response.success) {
remove.parents('.question').remove();
+ let model = QSMQuestion.questions.get(question_id);
+ QSM_Quiz_Broadcast_Channel.unlinkQuestionData(model, question_id);
QSMQuestion.countTotal();
$('.save-page-button').trigger('click');
} else {
@@ -3200,6 +3515,14 @@ var import_button;
event.preventDefault();
$(this).parents('.questionElements').slideUp('slow');
});
+ $(document).on('change', '#qsm-question-status', function (event) {
+ event.preventDefault();
+ if($(this).is(':checked')){
+ $(document).find('#qsm-question-status-text').html('Published');
+ } else {
+ $(document).find('#qsm-question-status-text').html('Draft');
+ }
+ });
$(document).on('click', '#save-popup-button', function (event) {
event.preventDefault();
questionElements = $(this).parents('.questionElements');
@@ -3258,6 +3581,7 @@ var import_button;
$(document).on('click', '.qsm-popup-bank .import-button', function (event) {
event.preventDefault();
+ qsm_link_button = '';
$(this).text(qsm_admin_messages.adding_question);
import_button = $(this);
$('.import-button').addClass('disable_import');
@@ -3265,9 +3589,45 @@ var import_button;
MicroModal.close('modal-2');
});
+
+ $(document).on('click', '.qsm-popup-bank .link-question', function (event) {
+ event.preventDefault();
+ $(this).text(qsm_admin_messages.linking_question);
+ qsm_link_button = $(this);
+ $('.link-question').addClass('disable_import');
+ // 1 for the linking the questions default is 0
+ QSMQuestion.addQuestionFromQuestionBank($(this).data('question-id'), 1);
+ MicroModal.close('modal-2');
+ });
+
+ jQuery(document).on('click', '.qsm-linked-list-div-block .qsm-linked-list-view-button', function () {
+ let $this = jQuery(this);
+ let $inside = $this.parents('.qsm-linked-list-div-block').find('.qsm-linked-list-inside');
+ $inside.toggle();
+ $inside.is(':visible') ? $this.text(qsmQuestionSettings.linked_close) : $this.text(qsmQuestionSettings.linked_view);
+ });
+
+ jQuery(document).on('click', '.qsm-linked-list-div-block .qsm-unlink-the-question', function () {
+ var questionIdToUnlink = jQuery(this).data('question-id');
+ $.ajax({
+ url: ajaxurl,
+ method: 'POST',
+ data: {
+ action: 'qsm_unlink_question_from_list',
+ question_id: jQuery(this).data('question-id'),
+ nonce: qsmQuestionSettings.unlinkNonce
+ },
+ success: function (response) {
+ $(document).find('.qsm-linked-list-div-block').remove();
+ let model = QSMQuestion.questions.get(questionIdToUnlink);
+ QSM_Quiz_Broadcast_Channel.unlinkQuestionData(model, questionIdToUnlink);
+ }
+ });
+ });
//Click on selected question button.
$('.qsm-popup-bank').on('click', '#qsm-import-selected-question', function (event) {
var $total_selction = $('#question-bank').find('[name="qsm-question-checkbox[]"]:checked').length;
+ qsm_link_button = '';
if ($total_selction === 0) {
alert(qsm_admin_messages.no_question_selected);
} else {
@@ -3411,6 +3771,9 @@ var import_button;
if (qsmQuestionSettings.qsm_user_ve === 'true') {
QSMQuestion.prepareEditor();
}
+
+ // Initialize the QSM_Quiz_Broadcast_Channel
+ QSM_Quiz_Broadcast_Channel.init();
QSMQuestion.loadQuestions();
/**
@@ -3792,6 +4155,7 @@ var import_button;
$('#results-pages').find('.qsm-spinner-loader').remove();
pages.forEach(function (page, i, pages) {
QSMAdminResults.addResultsPage(page.conditions, page.page, page.redirect, page.default_mark, page);
+ QSMAdminResults.updateResultConditonCount(jQuery('.results-page-when').eq(i));
});
QSMAdmin.clearAlerts();
})
@@ -3827,6 +4191,11 @@ var import_button;
newCondition: function ($page) {
QSMAdminResults.addCondition($page, 'quiz', '', 'score', 'equal', 0);
},
+ updateResultConditonCount: function ( $parent ) {
+ $parent.find('.results-page-condition').each(function (index) {
+ jQuery(this).find('.qsm-condition-collection-count').text(index + 1);
+ });
+ },
addResultsPage: function (conditions, page, redirect, default_mark = false, singlePage = {}) {
const parser = new DOMParser();
let parseRedirect = parser.parseFromString(redirect, 'text/html');
@@ -3857,6 +4226,9 @@ var import_button;
jQuery(document).trigger('qsm_tinyMCE_settings_after', [settings]);
wp.editor.initialize('results-page-' + QSMAdminResults.total, settings);
jQuery(document).trigger('qsm_after_add_result_block', [conditions, page, redirect, QSMAdminResults.total, singlePage]);
+ const $resultsPage = jQuery(`#results-page-${QSMAdminResults.total}`).closest('.results-page-show');
+ const $conditionalButton = $resultsPage.find('.qsm-extra-shortcode-conditional-button');
+ $resultsPage.find('.wp-media-buttons .insert-media').after($conditionalButton);
},
newResultsPage: function () {
var conditions = [{
@@ -3876,6 +4248,7 @@ var import_button;
$('.add-new-page').on('click', function (event) {
event.preventDefault();
QSMAdminResults.newResultsPage();
+ QSMAdminResults.updateResultConditonCount(jQuery('.results-page-when').last());
});
jQuery(document).on('click', '.qsm-duplicate-result-page-button', function () {
let result_page = jQuery(this).closest("header").next("main");
@@ -3893,6 +4266,7 @@ var import_button;
});
QSMAdminResults.addResultsPage(conditions, page, redirect_value);
jQuery('html, body').animate({ scrollTop: jQuery('.results-page:last-child').offset().top - 150 }, 1000);
+ QSMAdminResults.updateResultConditonCount(jQuery('.results-page-when').last());
});
$('.save-pages').on('click', function (event) {
event.preventDefault();
@@ -3902,6 +4276,7 @@ var import_button;
event.preventDefault();
$page = $(this).closest('.results-page');
QSMAdminResults.newCondition($page);
+ QSMAdminResults.updateResultConditonCount($(this).parents('.results-page-when'));
});
$('#results-pages').on('click', '.qsm-delete-result-button', function (event) {
event.preventDefault();
@@ -3909,16 +4284,40 @@ var import_button;
});
$('#results-pages').on('click', '.delete-condition-button', function (event) {
event.preventDefault();
+ let $parent = $(this).parents('.results-page-when');
+ console.log($parent);
$(this).closest('.results-page-condition').remove();
- });
- jQuery(document).on('click', '.qsm-toggle-result-page-button', function () {
- jQuery(this).closest("header").next("main").slideToggle();
- jQuery(this).find('.dashicons-arrow-up-alt2, .dashicons-arrow-down-alt2').toggleClass('dashicons-arrow-up-alt2 dashicons-arrow-down-alt2');
+ QSMAdminResults.updateResultConditonCount($parent);
});
});
}
}
+ jQuery(document).on('click', '.qsm-toggle-result-page-button, .qsm-toggle-email-template-button', function () {
+ jQuery(this).closest("header").next("main").slideToggle();
+ let $img = jQuery(this).find('img');
+ let currentSrc = $img.attr('src');
+ let arrowUpImage = qsm_admin_messages.arrow_up_image;
+ let arrowDownImage = qsm_admin_messages.arrow_down_image;
+
+ // Toggle the image
+ if (currentSrc === arrowUpImage) {
+ $img.attr('src', arrowDownImage);
+ } else {
+ $img.attr('src', arrowUpImage);
+ }
+ });
+ jQuery(document).on('click', '.qsm-settings-box-result-button', function () {
+ jQuery('.qsm-settings-box-details').not(jQuery(this).parents('.qsm-template-btn-group').find('.qsm-settings-box-details')).hide();
+ jQuery(this).parents('.qsm-template-btn-group').find('.qsm-settings-box-details').toggle();
+ });
+ jQuery(document).on('click', function (e) {
+ // Check if the click was outside .qsm-template-btn-group
+ if (!jQuery(e.target).closest('.qsm-template-btn-group').length) {
+ jQuery('.qsm-settings-box-details').hide();
+ }
+ });
+
$(document).on('click', '.qsm_global_settings .qsm-generate-api-key', function (event) {
event.preventDefault();
if (!$(this).hasClass('confirmation') || confirm(qsm_api_object.confirmation_message)) {
@@ -3997,11 +4396,24 @@ var import_button;
}(jQuery));
-
+function qsm_check_email_sent_option() {
+ if (jQuery('input[name="send_email"]').prop('checked') === true) {
+ jQuery('#check_already_sent_email input[name="check_already_sent_email"]').prop( 'disabled', false );
+ jQuery('#check_already_sent_email').show();
+ } else {
+ jQuery('#check_already_sent_email input[name="check_already_sent_email"]').prop( 'disabled', true );
+ jQuery('#check_already_sent_email').hide();
+ }
+}
/**
* QSM - failed submission data table action
*/
(function ($) {
+ qsm_check_email_sent_option();
+ $(document).on('change', 'input[name="send_email"]', function (event) {
+ event.preventDefault();
+ qsm_check_email_sent_option();
+ });
function submit_failed_submission_action_notice( res ) {
if ( 'object' !== typeof res || null === res || undefined === res.message ) {
return false;
@@ -4174,4 +4586,30 @@ var import_button;
event.stopPropagation();
});
});
-}(jQuery));
\ No newline at end of file
+}(jQuery));
+
+jQuery(document).ready(function() {
+ const bulkActionSelect = jQuery('#qsm_bulk_action_select');
+ const applyBulkActionButton = jQuery('#qsm_apply_bulk_action');
+
+ applyBulkActionButton.on('click', function() {
+ const action = bulkActionSelect.val();
+
+ // Handle bulk delete action
+ if (action === 'bulk_delete') {
+ if (confirm(qsm_result_page.delete_confirm)) {
+ jQuery('form[name="bulk_delete_form"]').submit();
+ }
+ }
+ // Handle permanent delete action
+ else if (action === 'bulk_permanent_delete') {
+ if (confirm(qsm_result_page.delete_confirm)) {
+ jQuery('#bulk_permanent_delete').val('1');
+ jQuery('form[name="bulk_delete_form"]').submit();
+ }
+ }
+ else {
+ alert(qsm_result_page.delete_alert);
+ }
+ });
+});
diff --git a/js/qsm-quiz.js b/js/qsm-quiz.js
index e654b9517..c5e69f0ef 100644
--- a/js/qsm-quiz.js
+++ b/js/qsm-quiz.js
@@ -170,13 +170,12 @@ var qsmTimerInterval = [];
}
var secondsRemaining = qmn_quiz_data[quizID].timerRemaning;
var secondsConsumed = qmn_quiz_data[quizID].timerConsumed;
- jQuery(document).trigger('qmn_timer_consumed_seconds', [quizID, qmn_quiz_data, qsm_timer_consumed_obj]);
if (localStorage.getItem('mlw_time_quiz' + quizID) != null ) {
secondsRemaining = (parseFloat(qmn_quiz_data[quizID].timer_limit) * 60) - secondsConsumed + 1;
if(qsm_timer_consumed_obj.qmn_count_upward_status){
- secondsConsumed = qmn_quiz_data[quizID].timerConsumed - 1;
- secondsRemaining = (parseFloat(qmn_quiz_data[quizID].timer_limit) * 60) - secondsConsumed;
- }
+ secondsConsumed = qmn_quiz_data[quizID].timerConsumed - 1;
+ secondsRemaining = (parseFloat(qmn_quiz_data[quizID].timer_limit) * 60) - secondsConsumed;
+ }
if(secondsRemaining < 0) {
secondsRemaining = 0;
}
@@ -1393,10 +1392,12 @@ function qmnSocialShare(network, mlw_qmn_social_text, mlw_qmn_title, facebook_id
var pageUrlEncoded = encodeURIComponent(share_url);
var url = '';
if (network == 'facebook') {
- url = "https://www.facebook.com/dialog/feed?" + "display=popup&" + "app_id=" + facebook_id +
- "&" + "link=" + pageUrlEncoded + "&" + "name=" + encodeURIComponent(mlw_qmn_social_text) +
- "&" + "description=";
+ url = "https://www.facebook.com/dialog/share?" + "app_id=" + facebook_id + "&display=popup" +
+ "&hashtag=" + encodeURIComponent(mlw_qmn_social_text) + "&href=" + pageUrlEncoded;
}
+ if (network === 'linkedin') {
+ url = "https://www.linkedin.com/sharing/share-offsite/?text=" + encodeURIComponent(mlw_qmn_social_text) + "&url=" + pageUrlEncoded;
+ }
if (network == 'twitter') {
url = "https://twitter.com/intent/tweet?text=" + encodeURIComponent(mlw_qmn_social_text);
}
@@ -1495,16 +1496,22 @@ jQuery(function () {
let value = jQuery(this).val();
let $this = jQuery(this).parents('.quiz_section');
let question_id = $i_this.attr('name').split('question')[1];
+ let inputType;
+ if ($i_this.hasClass('mlw_answer_date')) {
+ inputType = 'input';
+ } else {
+ inputType = 'radio';
+ }
if (qmn_quiz_data[quizID].enable_quick_result_mc == 1) {
- qsm_show_inline_result(quizID, question_id, value, $this, 'radio', $i_this)
+ qsm_show_inline_result(quizID, question_id, value, $this, inputType, $i_this)
} else if (qmn_quiz_data[quizID].enable_quick_correct_answer_info != 0) {
- let data = qsm_question_quick_result_js(question_id, value, 'radio', qmn_quiz_data[quizID].enable_quick_correct_answer_info,quizID);
+ let data = qsm_question_quick_result_js(question_id, value, inputType, qmn_quiz_data[quizID].enable_quick_correct_answer_info,quizID);
$this.find('.quick-question-res-p, .qsm-inline-correct-info').remove();
if ( 0 < value.length && data.success != '') {
$this.append('' + qsm_check_shortcode(data.message) + '
');
}
}
- jQuery(document).trigger('qsm_after_select_answer', [quizID, question_id, value, $this, 'radio']);
+ jQuery(document).trigger('qsm_after_select_answer', [quizID, question_id, value, $this, inputType]);
if (qmn_quiz_data[quizID].end_quiz_if_wrong > 0 && !jQuery(this).parents('.qsm-quiz-container').find('.mlw_next:visible').length ) {
qsm_submit_quiz_if_answer_wrong(question_id, value, $this, $quizForm);
}
@@ -1537,7 +1544,7 @@ jQuery(function () {
if (qmn_quiz_data[quizID].enable_quick_result_mc == 1) {
qsm_show_inline_result(quizID, question_id, sendValue, $this, 'input', $i_this, $this.find('.qmn_fill_blank').index($i_this));
} else if (qmn_quiz_data[quizID].enable_quick_correct_answer_info != 0) {
- let data = qsm_question_quick_result_js(question_id, sendValue, 'input', qmn_quiz_data[quizID].enable_quick_correct_answer_info,quizID);
+ let data = qsm_question_quick_result_js(question_id, sendValue, 'input', qmn_quiz_data[quizID].enable_quick_correct_answer_info, quizID, $this.find('.qmn_fill_blank').index($i_this));
$this.find('.quick-question-res-p, .qsm-inline-correct-info').remove();
if ( 0 < value.length && data.success != '') {
$this.append('' + qsm_check_shortcode(data.message) + '
');
@@ -1759,6 +1766,9 @@ jQuery(function () {
if (network == 'twitter') {
url = "https://twitter.com/intent/tweet?text=" + social_text;
}
+ if (network == 'linkedin') {
+ url = "https://www.linkedin.com/feed/?text=" + social_text;
+ }
var sTop = window.screen.height / 2 - (218);
var sLeft = window.screen.width / 2 - (313);
var sqShareOptions = "height=400,width=580,toolbar=0,status=0,location=0,menubar=0,directories=0,scrollbars=0,top=" + sTop + ",left=" + sLeft;
@@ -1833,7 +1843,7 @@ function qsm_check_shortcode(message = null) {
function qsm_show_inline_result(quizID, question_id, value, $this, answer_type, $i_this, index = null) {
jQuery('.qsm-spinner-loader').remove();
addSpinnerLoader($this,$i_this);
- let data = qsm_question_quick_result_js(question_id, value, answer_type, qmn_quiz_data[quizID].enable_quick_correct_answer_info,quizID);
+ let data = qsm_question_quick_result_js(question_id, value, answer_type, qmn_quiz_data[quizID].enable_quick_correct_answer_info,quizID, index);
$this.find('.quick-question-res-p, .qsm-inline-correct-info').remove();
$this.find('.qmn_radio_answers').children().removeClass('data-correct-answer');
if ( 0 < value.length && data.success == 'correct') {
@@ -1872,9 +1882,9 @@ jQuery(document).ready(function () {
let rnum = Math.floor(Math.random() * mlw_chars.length);
mlw_code += mlw_chars.substring(rnum, rnum + 1);
}
- let captchaCanvas = document.getElementById('mlw_captcha');
- let mlw_captchaCTX = captchaCanvas.getContext('2d');
- let containerDirection = window.getComputedStyle(captchaCanvas).direction || 'ltr';
+ var captchaCanvas = document.getElementById('mlw_captcha');
+ var mlw_captchaCTX = captchaCanvas.getContext('2d');
+ var containerDirection = window.getComputedStyle(captchaCanvas).direction || 'ltr';
mlw_captchaCTX.font = 'normal 24px Verdana';
mlw_captchaCTX.strokeStyle = '#000000';
mlw_captchaCTX.clearRect(0, 0, captchaCanvas.width, captchaCanvas.height);
@@ -1913,7 +1923,7 @@ function qsm_submit_quiz_if_answer_wrong(question_id, value, $this, $quizForm, a
}
}
-function qsm_question_quick_result_js(question_id, answer, answer_type = '', show_correct_info = '',quiz_id='') {
+function qsm_question_quick_result_js(question_id, answer, answer_type = '', show_correct_info = '',quiz_id='', ans_index=null) {
if (typeof encryptedData[quiz_id] !== 'undefined') {
let decryptedBytes = CryptoJS.AES.decrypt(encryptedData[quiz_id], encryptionKey[quiz_id]);
let decryptedData = decryptedBytes.toString(CryptoJS.enc.Utf8);
diff --git a/mlw_quizmaster2.php b/mlw_quizmaster2.php
index b44efeed7..4b1e53253 100644
--- a/mlw_quizmaster2.php
+++ b/mlw_quizmaster2.php
@@ -390,7 +390,7 @@ public function qsm_load_textdomain() {
* @since 7.3.5 admin scripts consolidated
*/
public function qsm_admin_scripts_style( $hook ) {
- global $mlwQuizMasterNext;
+ global $mlwQuizMasterNext, $wpdb;
// admin styles
wp_enqueue_style( 'qsm_admin_style', plugins_url( 'css/qsm-admin.css', __FILE__ ), array(), $this->version );
@@ -484,6 +484,7 @@ public function qsm_admin_scripts_style( $hook ) {
wp_enqueue_script( 'micromodal_script', plugins_url( 'js/micromodal.min.js', __FILE__ ), array( 'jquery', 'qsm_admin_js' ), $this->version, true );
$qsm_variables = function_exists( 'qsm_text_template_variable_list' ) ? qsm_text_template_variable_list() : array();
$qsm_variables_name = array();
+ $qsm_quizzes = $wpdb->get_results("SELECT quiz_id, quiz_name FROM {$wpdb->prefix}mlw_quizzes");
foreach ( $qsm_variables as $key => $value ) {
// Iterate over each key of the nested object
if ( is_array( $value ) && ! empty($value) ) {
@@ -528,7 +529,11 @@ public function qsm_admin_scripts_style( $hook ) {
'question_created' => __('Question created!', 'quiz-master-next'),
'new_question' => __('Your new question!', 'quiz-master-next'),
'creating_question' => __('Creating question...', 'quiz-master-next'),
+ 'unlink_question' => __('Unlink', 'quiz-master-next'),
'duplicating_question' => __('Duplicating question...', 'quiz-master-next'),
+ 'linking_question' => __('Linking...', 'quiz-master-next'),
+ 'link_question' => __('Link', 'quiz-master-next'),
+ 'creating_question' => __('Creating question...', 'quiz-master-next'),
'saving_question' => __('Saving question...', 'quiz-master-next'),
'question_saved' => __('Question was saved!', 'quiz-master-next'),
'load_more_quetions' => __('Load more questions', 'quiz-master-next'),
@@ -578,6 +583,9 @@ public function qsm_admin_scripts_style( $hook ) {
'insert_variable' => __("Insert QSM variables", 'quiz-master-next'),
'select_all' => __("Select All", 'quiz-master-next'),
'select' => __("Select", 'quiz-master-next'),
+ 'qsmQuizzesObject' => $qsm_quizzes,
+ 'arrow_up_image' => esc_url(QSM_PLUGIN_URL . 'assets/arrow-up-s-line.svg'),
+ 'arrow_down_image' => esc_url(QSM_PLUGIN_URL . 'assets/arrow-down-s-line.svg'),
);
$qsm_admin_messages = apply_filters( 'qsm_admin_messages_after', $qsm_admin_messages );
wp_localize_script( 'qsm_admin_js', 'qsm_admin_messages', $qsm_admin_messages );
diff --git a/php/admin/about-page.php b/php/admin/about-page.php
index 60fd79854..edc8ad174 100644
--- a/php/admin/about-page.php
+++ b/php/admin/about-page.php
@@ -18,6 +18,7 @@
function qsm_generate_about_page() {
global $mlwQuizMasterNext;
$version = $mlwQuizMasterNext->version;
+ wp_enqueue_style( 'qsm_result_page_style', plugins_url( '../css/qsm-admin.css', __FILE__ ), array(), $mlwQuizMasterNext->version );
if ( ! current_user_can( 'delete_others_qsm_quizzes' ) ) {
return;
}
@@ -30,6 +31,10 @@ function qsm_generate_about_page() {
'slug' => 'help',
'title' => 'Help',
],
+ [
+ 'slug' => 'system_info',
+ 'title' => 'System Info',
+ ],
];
$active_tab = isset($_GET['tab']) ? sanitize_text_field( wp_unslash( $_GET['tab'] ) ) : 'about';
@@ -37,23 +42,19 @@ function qsm_generate_about_page() {
add_meta_box( 'wpss_mrts', __( 'Need Help?', 'quiz-master-next' ), 'qsm_documentation_meta_box_content', 'meta_box_help' );
add_meta_box( 'wpss_mrts', __( 'System Info', 'quiz-master-next' ), 'qsm_system_meta_box_content', 'meta_box_sys_info' );
?>
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
-
-
+
GitHub Contributors
" rel="noopener" target="_blank" class="button-primary">View GitHub Repo
+ } elseif ( 'system_info' === $active_tab ) { ?>
+
+
+
version );
?>
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
version ); ?>
-
-
+
+
+
-
-
-
-
-
-
-
-
- or,
-
+
+
+
version ) ); ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
version );
+ wp_enqueue_script( 'qsm_result_page_script', plugins_url( 'js/qsm-admin.js', __FILE__ ), array( 'jquery' ), $mlwQuizMasterNext->version );
+ wp_localize_script( 'qsm_result_page_script', 'qsm_result_page', array(
+ 'delete_confirm' => esc_html__( 'Are you sure you want to delete?', 'quiz-master-next' ),
+ 'delete_alert' => esc_html__( 'Please select a valid bulk action.', 'quiz-master-next' ),
+ ));
// If nonce is correct, delete results.
if ( isset( $_POST['delete_results_nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['delete_results_nonce'] ) ), 'delete_results' ) ) {
@@ -206,21 +211,19 @@ function qsm_results_overview_tab_content() {
?>
-
-
-
@@ -276,9 +278,7 @@ function qsm_results_overview_tab_content() {
$qmn_order_by = ( isset( $_GET['qmn_order_by'] ) && ! empty( $_GET['qmn_order_by'] ) ) ? sanitize_text_field( wp_unslash( $_GET['qmn_order_by'] ) ) : 'default';
?>
-
-
-
+
+
+
-
+
">
- |
+ |
|
$v ) {
@@ -523,7 +525,9 @@ function qsm_results_overview_tab_content() {
for ( $x = 0; $x < $co; $x++ ) {
?>
- |
+
+
+ |
quiz_name ); ?>
@@ -640,8 +644,8 @@ function qsm_results_overview_tab_content() {
function qsm_export_results_tabs_content() {
$args = array(
"id" => 'export-results',
- "title" => __( 'Export Results', 'quiz-master-next' ),
- "description" => __( 'As the quiz creator, you will want to export your quiz results in order to keep track of responses and provide an accurate record of who has completed the quiz. The Export Results addon provides an intuitive and flexible interface for exporting just the right results.', 'quiz-master-next' ),
+ "title" => __( 'Export Results Addon', 'quiz-master-next' ),
+ "description" => __( 'The QSM Export Results Addon enables quiz administrators to export quiz results quickly and easily. You can download results as a CSV file for further analysis in Excel or other tools, and provide respondents with a downloadable PDF copy of their results. Perfect for sharing quiz/exam data with colleagues or moderators without database access, this addon streamlines result management and analysis.', 'quiz-master-next' ),
"chart_image" => plugins_url( '', dirname( __FILE__ ) ) . '/images/export_results.png',
"warning" => __( 'Export Results Addon required', 'quiz-master-next' ),
"information" => __( 'QSM Addon Bundle is the best way to get all our add-ons at a discount. Upgrade to save 95% today. OR you can buy Export Results Addon separately.', 'quiz-master-next' ),
@@ -649,13 +653,36 @@ function qsm_export_results_tabs_content() {
"doc_link" => qsm_get_plugin_link( 'docs/add-ons/export-results', 'result_page', 'export_results', 'result-exportresults-upsell_read_documentation', 'qsm_plugin_upsell' ),
"upgrade_link" => qsm_get_plugin_link( 'pricing', 'result_page', 'export_results', 'result-exportresults-upsell_upgrade', 'qsm_plugin_upsell' ),
"addon_link" => qsm_get_plugin_link( 'downloads/export-results', 'result_page', 'export_results', 'result-exportresults-upsell_buy_addon', 'qsm_plugin_upsell' ),
+ "benefits" => array(
+ 'briefing' => '',
+ 'list_items' => array(
+ __( 'Export quiz results to CSV for detailed analysis.', 'quiz-master-next' ),
+ __( 'Generate personalized PDF reports for users.', 'quiz-master-next' ),
+ __( 'Filter exports by quizzes, dates, or data fields.', 'quiz-master-next' ),
+ __( 'Save time with quick, multi-quiz exports.', 'quiz-master-next' ),
+ __( 'Share results easily without database access.', 'quiz-master-next' ),
+ __( 'Analyze responses, scores, and timestamps.', 'quiz-master-next' ),
+ __( 'Ideal for diverse needs like education, training, and research.', 'quiz-master-next' ),
+ ),
+ ),
+ "use_cases" => array(
+ 'briefing' => '',
+ 'list_items' => array(
+ __( 'Track student performance in educational settings.', 'quiz-master-next' ),
+ __( 'Measure training effectiveness for employees.', 'quiz-master-next' ),
+ __( 'Gather insights from consumer surveys.', 'quiz-master-next' ),
+ __( 'Collect feedback to improve future events.', 'quiz-master-next' ),
+ __( 'Evaluate candidates through recruitment quizzes.', 'quiz-master-next' ),
+ __( 'Analyze usability data for product improvement.', 'quiz-master-next' ),
+ ),
+ ),
);
- qsm_admin_upgrade_content( $args, 'page' );
+ qsm_admin_upgrade_popup( $args, 'page' );
}
function qsm_reporting_analysis_tabs_content() {
$args = array(
"id" => 'reporting-analysis',
- "title" => __( 'Reporting & Analysis', 'quiz-master-next' ),
+ "title" => __( 'Reporting & Analysis Addon', 'quiz-master-next' ),
"description" => __( 'Transform your quiz/survey results into numbers with QSM Reporting & Analysis! Implement simple & advanced data analysis techniques to measure questions effectiveness and show the user results in the form of Pie Charts. Reporting & Analysis addon by QSM will make your life easier as a question designer by using a variety of charts and graphs and exporting the results in bulk.', 'quiz-master-next' ),
"chart_image" => plugins_url( '', dirname( __FILE__ ) ) . '/images/report_analysis_chart.png',
"warning" => __( 'Reporting & Analysis Addon required', 'quiz-master-next' ),
@@ -665,14 +692,14 @@ function qsm_reporting_analysis_tabs_content() {
"upgrade_link" => qsm_get_plugin_link( 'pricing', 'result_page', 'result_analysis', 'result-reportanalysis-upsell_upgrade', 'qsm_plugin_upsell' ),
"addon_link" => qsm_get_plugin_link( 'downloads/results-analysis', 'result_page', 'result_analysis', 'result-reportanalysis-ups_buy_addon', 'qsm_plugin_upsell' ),
);
- qsm_admin_upgrade_content( $args, 'page' );
+ qsm_admin_upgrade_popup( $args, 'page' );
}
function qsm_proctor_quiz_tabs_content() {
$args = array(
"id" => 'proctoring-quiz',
- "title" => __( 'Quiz Proctor', 'quiz-master-next' ),
- "description" => __( 'Enhance exam fairness using Quiz Proctor: Capture images, monitor tab shifts, and prevent cheating by restricting copy/paste within the quiz. Ensure focus and equity with full-screen mode.', 'quiz-master-next' ),
+ "title" => __( 'Quiz Proctor Addon', 'quiz-master-next' ),
+ "description" => __( 'The Quiz Proctor Addon is your essential tool for ensuring fairness and security in online assessments. Acting as your virtual proctor, it prevents cheating by capturing images of quiz takers, tracking tab shifts, and enabling full-screen quiz mode. With Quiz Proctor, maintain trust in your quizzes by eliminating distractions and promoting integrity in every online test you conduct.', 'quiz-master-next' ),
"chart_image" => plugins_url( '', dirname( __FILE__ ) ) . '/images/proctor_quiz_chart.png',
"warning" => __( 'Missing Feature - Quiz Proctor Add-on required', 'quiz-master-next' ),
"information" => __( 'QSM Addon Bundle is the best way to get all our add-ons at a discount. Upgrade to save 95% today. OR you can buy Proctoring Quiz Addon separately.', 'quiz-master-next' ),
@@ -680,6 +707,27 @@ function qsm_proctor_quiz_tabs_content() {
"doc_link" => qsm_get_plugin_link( 'docs/add-ons/quiz-proctor', 'quiz-documentation', 'plugin', 'quiz-proctor', 'qsm_plugin_upsell' ),
"upgrade_link" => qsm_get_plugin_link( 'pricing', 'quiz-documentation', 'plugin', 'quiz-proctor', 'qsm_plugin_upsell' ),
"addon_link" => qsm_get_plugin_link( 'downloads/quiz-proctor', 'quiz-documentation', 'plugin', 'quiz-proctor', 'qsm_plugin_upsell' ),
+ "benefits" => array(
+ 'briefing' => '',
+ 'list_items' => array(
+ __( 'Provides feedback using violation reports.', 'quiz-master-next' ),
+ __( 'Ensures fair results with controlled retakes.', 'quiz-master-next' ),
+ __( 'Improves quiz design by analyzing violations.', 'quiz-master-next' ),
+ __( 'Automates monitoring to save time.', 'quiz-master-next' ),
+ __( 'Enhances fairness in online assessments.', 'quiz-master-next' ),
+ ),
+ ),
+ "use_cases" => array(
+ 'briefing' => '',
+ 'list_items' => array(
+ __( 'Ensures fair testing in online exams.', 'quiz-master-next' ),
+ __( 'Validates employee training assessments.', 'quiz-master-next' ),
+ __( 'Maintains credibility in certification tests.', 'quiz-master-next' ),
+ __( 'Supports students with violation feedback.', 'quiz-master-next' ),
+ __( 'Enforces honesty in compliance quizzes.', 'quiz-master-next' ),
+ __( 'Detects unusual patterns in surveys.', 'quiz-master-next' ),
+ ),
+ ),
);
- qsm_admin_upgrade_content( $args, 'page' );
+ qsm_admin_upgrade_popup( $args, 'page' );
}
diff --git a/php/admin/functions.php b/php/admin/functions.php
index 1d8334605..2c55e662b 100644
--- a/php/admin/functions.php
+++ b/php/admin/functions.php
@@ -251,9 +251,6 @@ function qsm_add_author_column_in_db() {
$success = false;
$mlwQuizMasterNext->log_manager->add( 'Error updating column charset utf8mb4_unicode_ci', "Tried $query but got {$wpdb->last_error}.", 0, 'error' );
}
- }
-
- if ( $success ) {
update_option( 'qsm_update_db_column_charset_utf8mb4_unicode_ci', 1 );
}
}
@@ -1138,7 +1135,7 @@ function qsm_fetch_theme_data() {
$themes_data = qsm_get_widget_data( 'themes' );
}
-function qsm_get_installed_theme( $saved_quiz_theme, $wizard_theme_list = '' ) {
+function qsm_get_installed_theme( $saved_quiz_theme, $wizard_theme_list = '', $caller = '' ) {
global $mlwQuizMasterNext;
global $pro_themes;
$active_themes = $mlwQuizMasterNext->theme_settings->get_active_themes();
@@ -1151,6 +1148,7 @@ function qsm_get_installed_theme( $saved_quiz_theme, $wizard_theme_list = '' ) {
}
}
}
+ if ( 'qsm_theme_defaults' !== $caller ) {
?>
>
@@ -1169,12 +1167,16 @@ function qsm_get_installed_theme( $saved_quiz_theme, $wizard_theme_list = '' ) {
-
+
$theme ) {
$theme_name = $theme['theme'];
$theme_id = $theme['id'];
+ $default_themes = array( 'Fortune', 'Sigma', 'Pixel', 'Sapience', 'Breeze', 'Fragrance', 'Pool', 'Ivory' );
+ if ( 'qsm_theme_defaults' === $caller && ! in_array( $theme['theme_name'], $default_themes, true ) ) {
+ continue;
+ }
?>
>
@@ -1190,8 +1192,12 @@ function qsm_get_installed_theme( $saved_quiz_theme, $wizard_theme_list = '' ) {
' . esc_html__( 'Customize', 'quiz-master-next' ) .' ';
+ if ( $saved_quiz_theme === $theme_id || 'qsm_theme_defaults' === $caller ) {
+ if ( 'qsm_theme_defaults' === $caller ) {
+ $button = ' ' . esc_html__( 'Customize', 'quiz-master-next' ) .' ';
+ } else {
+ $button = ' ' . esc_html__( 'Customize', 'quiz-master-next' ) .' ';
+ }
}elseif ( 'wizard_theme_list' !== $wizard_theme_list ) {
$button = ' ';
}
@@ -1343,15 +1349,27 @@ function qsm_advance_question_type_upgrade_popup() {
qsm_admin_upgrade_popup($qsm_pop_up_arguments);
}
-function qsm_admin_upgrade_popup( $args = array() ) {
+function qsm_admin_upgrade_popup( $args = array(), $type = 'popup' ) {
+ if ( 'page' == $type ) {
+ ?>
+
+
+
+
+
+
+
+
+
|
-
-
+
+
+
-
+
+ 'qsm-ultimate',
+ "title" => __( 'Ultimate Addon', 'quiz-master-next' ),
+ "description" => __( 'Quiz And Survey Master is a leading WordPress plugin developed by a dedicated team of developers and educational experts. Our mission is to help individuals and organizations create engaging and effective quizzes and surveys that enhance learning and gather valuable insights. With a focus on user experience and flexibility, our plugin is designed to meet the needs of educators, marketers, and businesses alike.', 'quiz-master-next' ),
+ "chart_image" => plugins_url( '', dirname( __FILE__ ) ) . '/images/Ultimate.png',
+ "warning" => __( 'Ultimate Addon required', 'quiz-master-next' ),
+ "information" => __( 'QSM Addon Bundle is the best way to get all our add-ons at a discount. Upgrade to save 95% today. OR you can buy Ultimate Addon separately.', 'quiz-master-next' ),
+ "buy_btn_text" => __( 'Buy Ultimate Addon', 'quiz-master-next' ),
+ "doc_link" => qsm_get_plugin_link( 'docs/add-ons/Ultimate', 'result_page', 'ultimate', 'result-ultimate-upsell_read_documentation', 'qsm_plugin_upsell' ),
+ "upgrade_link" => qsm_get_plugin_link( 'pricing', 'result_page', 'ultimate', 'result-ultimate-upsell_upgrade', 'qsm_plugin_upsell' ),
+ "addon_link" => qsm_get_plugin_link( 'downloads/Ultimate', 'result_page', 'ultimate', 'result-ultimate-upsell_buy_addon', 'qsm_plugin_upsell' ),
+ "benefits" => array(
+ 'briefing' => __( 'The QSM Ultimate Add-On boosts quiz flexibility and control, making quiz creation and management smoother and more user-friendly.', 'quiz-master-next' ),
+ 'list_items' => array(
+ __( 'Advanced customization for themes, progress bars, and buttons.', 'quiz-master-next' ),
+ __( 'Streamlined retakes by focusing on incorrect answers.', 'quiz-master-next' ),
+ __( 'Role management for assigning user-specific quiz permissions.', 'quiz-master-next' ),
+ __( 'Lead capture by collecting emails before results are displayed.', 'quiz-master-next' ),
+ __( 'Efficient setup with bulk uploads and auto-advance features.', 'quiz-master-next' ),
+ ),
+ ),
+ "use_cases" => array(
+ 'briefing' => __( 'Ideal for educational programs, marketing surveys, and detailed feedback collection.', 'quiz-master-next' ),
+ 'list_items' => array(
+ __( 'Custom progress tracking for employee training.', 'quiz-master-next' ),
+ __( 'Collect emails for lead generation.', 'quiz-master-next' ),
+ __( 'Manage instructor permissions for online courses.', 'quiz-master-next' ),
+ __( 'Add “Other” options for customer feedback.', 'quiz-master-next' ),
+ __( 'Auto-advance pages for smooth certification tests.', 'quiz-master-next' ),
+ __( 'Track user interactions with custom button classes.', 'quiz-master-next' ),
+ ),
+ ),
+ );
+ ?>
+
+
';
}
return $return_display;
}
diff --git a/php/template-variables.php b/php/template-variables.php
index 5f4c4b740..ceba1bf5c 100644
--- a/php/template-variables.php
+++ b/php/template-variables.php
@@ -312,6 +312,14 @@ function mlw_qmn_variable_social_share( $content, $mlw_quiz_array ) {
$social_display = "";
$content = str_replace( '%TWITTER_SHARE%', $social_display, $content );
}
+ if ( false !== strpos( $content, '%LINKEDIN_SHARE%' ) ) {
+ $ln_image = plugins_url( '', dirname( __FILE__ ) ) . '/assets/linkedin.png';
+ $sharing = $mlwQuizMasterNext->pluginHelper->get_section_setting( 'quiz_text', 'linkedin_sharing_text', '%QUIZ_NAME%' );
+ $sharing = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $sharing, "quiz_linkedin_sharing_text-{$mlw_quiz_array['quiz_id']}" );
+ $sharing = apply_filters( 'mlw_qmn_template_variable_results_page', $sharing, $mlw_quiz_array );
+ $social_display = "";
+ $content = str_replace( '%LINKEDIN_SHARE%', $social_display, $content );
+ }
return $content;
}
@@ -501,23 +509,23 @@ function mlw_qmn_variable_user_email( $content, $mlw_quiz_array ) {
* @return string The HTML for the content
*/
function qsm_contact_field_variable( $content, $results_array ) {
- preg_match_all( '~%CONTACT_(.*?)%~i', $content, $matches );
- for ( $i = 0; $i < count( $matches[0] ); $i++ ) {
- $contact_key = $matches[1][ $i ];
- if ( is_numeric( $contact_key ) && intval( $contact_key ) > 0 ) {
- $contact_index = intval( $contact_key ) - 1;
-
- if ( isset( $results_array['contact'][ $contact_index ]['value'] ) ) {
- $content = str_replace( '%CONTACT_' . $contact_key . '%', $results_array['contact'][ $contact_index ]['value'], $content );
+ preg_match_all( '~%CONTACT_(.*?)%~i', $content, $matches );
+ for ( $i = 0; $i < count( $matches[0] ); $i++ ) {
+ $contact_key = $matches[1][ $i ];
+ if ( is_numeric( $contact_key ) && intval( $contact_key ) > 0 ) {
+ $contact_index = intval( $contact_key ) - 1;
+
+ if ( isset( $results_array['contact'][ $contact_index ]['value'] ) ) {
+ $content = str_replace( '%CONTACT_' . $contact_key . '%', $results_array['contact'][ $contact_index ]['value'], $content );
+ } else {
+ $content = str_replace( '%CONTACT_' . $contact_key . '%', '', $content );
+ }
} else {
$content = str_replace( '%CONTACT_' . $contact_key . '%', '', $content );
}
- } else {
- $content = str_replace( '%CONTACT_' . $contact_key . '%', '', $content );
}
+ return $content;
}
- return $content;
-}
/**
* Returns user values for all contact fields
@@ -532,12 +540,14 @@ function qsm_all_contact_fields_variable( $content, $results ) {
$return = '';
if ( isset( $results['contact'] ) && ( is_array( $results['contact'] ) || is_object( $results['contact'] ) ) ) {
foreach ( $results['contact'] as $results_contact ) {
- $options = qsm_get_options_of_contact_fields($contact_form, $results_contact['label'], $results_contact['type'] );
- $isRadioOrSelect = in_array($results_contact['type'], [ 'radio', 'select' ], true);
- $hasOptions = ! empty(trim($options));
+ if ( isset( $results_contact['label'] ) && isset( $results_contact['type'] ) && isset( $results_contact['value'] ) ) {
+ $options = qsm_get_options_of_contact_fields($contact_form, $results_contact['label'], $results_contact['type'] );
+ $isRadioOrSelect = in_array($results_contact['type'], [ 'radio', 'select' ], true);
+ $hasOptions = ! empty(trim($options));
- if ( ($isRadioOrSelect && $hasOptions) || ! $isRadioOrSelect ) {
- $return .= $results_contact['label'] . ': ' . $results_contact['value'] . '
';
+ if ( ($isRadioOrSelect && $hasOptions) || ! $isRadioOrSelect ) {
+ $return .= $results_contact['label'] . ': ' . $results_contact['value'] . '
';
+ }
}
}
}
@@ -602,7 +612,10 @@ function mlw_qmn_variable_question_answers( $content, $mlw_quiz_array ) {
if ( ! empty( $hidden_questions ) && is_array( $hidden_questions ) && in_array( $answer['id'], $hidden_questions, true ) ) {
continue;
}
+ $question_display = '';
$display .= qsm_questions_answers_shortcode_to_text( $mlw_quiz_array, $qmn_question_answer_template, $questions, $qmn_questions, $answer, $qsm_question_cnt, $total_question_cnt );
+ $question_display = apply_filters( 'qsm_result_page_data_template', $question_display, $questions, $qmn_questions, $answer, $qsm_question_cnt, $total_question_cnt );
+ $display .= $question_display;
$qsm_question_cnt++;
}
$display = "{$display}
";
@@ -1262,7 +1275,11 @@ function qsm_questions_answers_shortcode_to_text( $mlw_quiz_array, $qmn_question
}
} else {
if ( 0 == $form_type && ( 0 == $quiz_system || 3 == $quiz_system ) ) {
- if ( isset( $answer['question_type'] ) && ( 4 == $answer['question_type'] || 10 == $answer['question_type'] ) ) {
+ if ( in_array( $answer['question_type'], $use_custom_default_template, true ) ) {
+ $result_page_default_template = "";
+ $result_page_default_template = apply_filters( 'qsm_result_page_custom_default_template', $result_page_default_template, $total_answers, $questions, $answer );
+ $question_with_answer_text .= $result_page_default_template;
+ } elseif ( isset( $answer['question_type'] ) && ( 4 == $answer['question_type'] || 10 == $answer['question_type'] ) ) {
if ( isset( $answer['user_answer'] ) && isset( $answer['correct_answer'] ) ) {
$question_with_answer_text .= qsm_tempvar_qa_text_qt_choice( $total_answers, $answer, $quiz_system, $question_settings, $form_type );
} else {
@@ -1273,10 +1290,6 @@ function qsm_questions_answers_shortcode_to_text( $mlw_quiz_array, $qmn_question
$question_with_answer_text .= qmn_polar_display_on_resultspage( $questionid, $questions, $total_answers, $answer );
$mlw_question_answer_display = str_replace( '%CORRECT_ANSWER%', '', $mlw_question_answer_display );
$mlw_question_answer_display = str_replace( '%USER_ANSWER%', $answer['points'], $mlw_question_answer_display );
- } elseif ( in_array( $answer['question_type'], $use_custom_default_template, true ) ) {
- $result_page_default_template = "";
- $result_page_default_template = apply_filters( 'qsm_result_page_custom_default_template', $result_page_default_template, $total_answers, $questions, $answer );
- $question_with_answer_text .= $result_page_default_template;
} else {
if ( isset( $answer['user_answer'] ) && isset( $answer['correct_answer'] ) ) {
$question_with_answer_text .= qsm_tempvar_qa_text_qt_choice( $total_answers, $answer, $quiz_system, $question_settings, $form_type );
@@ -1285,7 +1298,12 @@ function qsm_questions_answers_shortcode_to_text( $mlw_quiz_array, $qmn_question
}
}
} else {
- if ( isset( $answer['question_type'] ) && ( 4 == $answer['question_type'] || 10 == $answer['question_type'] ) ) {
+ if ( in_array( $answer['question_type'], $use_custom_default_template, true ) ) {
+ $question_type = $answer['question_type'];
+ $result_page_default_template = "";
+ $result_page_default_template = apply_filters( 'qsm_result_page_custom_default_template', $result_page_default_template, $total_answers, $questions, $answer );
+ $question_with_answer_text .= $result_page_default_template;
+ } elseif ( isset( $answer['question_type'] ) && ( 4 == $answer['question_type'] || 10 == $answer['question_type'] ) ) {
if ( isset( $answer['user_answer'] ) && isset( $answer['correct_answer'] ) ) {
$question_with_answer_text .= qsm_tempvar_qa_text_qt_choice( $total_answers, $answer, $quiz_system, $question_settings, $form_type );
} else {
@@ -1296,11 +1314,6 @@ function qsm_questions_answers_shortcode_to_text( $mlw_quiz_array, $qmn_question
$question_with_answer_text .= qmn_polar_display_on_resultspage( $questionid, $questions, $total_answers, $answer );
$mlw_question_answer_display = str_replace( '%CORRECT_ANSWER%', '', $mlw_question_answer_display );
$mlw_question_answer_display = str_replace( '%USER_ANSWER%', $answer['points'], $mlw_question_answer_display );
- } elseif ( in_array( $answer['question_type'], $use_custom_default_template, true ) ) {
- $question_type = $answer['question_type'];
- $result_page_default_template = "";
- $result_page_default_template = apply_filters( 'qsm_result_page_custom_default_template', $result_page_default_template, $total_answers, $questions, $answer );
- $question_with_answer_text .= $result_page_default_template;
} else {
if ( isset( $answer['user_answer'] ) && isset( $answer['correct_answer'] ) ) {
$question_with_answer_text .= qsm_tempvar_qa_text_qt_choice( $total_answers, $answer, $quiz_system, $question_settings, $form_type );
diff --git a/readme.txt b/readme.txt
index 3e0a00c50..e872bfce8 100644
--- a/readme.txt
+++ b/readme.txt
@@ -4,12 +4,11 @@ Tags: quiz, survey, test, exam, online assessment
Requires at least: 4.9
Tested up to: 6.7
Requires PHP: 5.4
-Stable tag: 9.2.4
+Stable tag: 9.3.0
License: GPLv2
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Create quizzes, surveys, and tests easily on WordPress with this versatile plugin. Perfect for engaging any audience and gathering valuable insights!
-
== Description ==
**Quiz and Survey Master** is the easiest quiz and survey maker plugin for creating quizzes, surveys, and forms on your WordPress website. Create everything from fun trivia quizzes to in-depth customer satisfaction assessments, using a user-friendly **drag-and-drop quiz maker** interface. Go beyond basic questions with multimedia support for richer content, analyze results to gain valuable insights, and even integrate with email marketing services to capture leads. Quiz & Survey Master is a **powerful WordPress plugin** to increase user engagement, gather valuable data, and build a stronger connection with your audience.
@@ -222,21 +221,10 @@ As a WordPress quiz maker, QSM is designed to be compatible with most other plug
18. Database
== Changelog ==
-= 9.2.4 ( December 30, 2024 ) =
-* Bug: Resolved issue with %TOTAL_QUESTIONS% variable
-* Bug: Resolved issue with %MAXIMUM_POINTS% variable
-
-= 9.2.3 ( December 13, 2024 ) =
-* Bug: Resolved issue where contact form not showing at quiz end
-* Bug: Resolved quiz timer issue for single-page quizzes
-* Bug: Fixed PHP warning related to the CONTACT_X variable
-* Enhancement: Enhanced the Captcha question type canvas for RTL websites
-* Enhancement: Refined user role permissions for improved access control
-
-= 9.2.2 ( November 06, 2024 ) =
-* Bug: Fixed issue with text displaying before quiz options
-* Bug: Resolved issue with left/right arrow keys in the quiz input box
-* Enhancement: Updated API to retrieve results by user ID
+= 9.3.0 ( November 04, 2024 ) =
+* Feature: Added option to save question as draft
+* Feature: Added option to link question in multiple quizzes
+* Enhancement: Improved API option to get result by user id
= 9.2.1 ( October 16, 2024 ) =
* Bug: Resolved vulnerability issue with question settings
diff --git a/templates/qmn_primary.css b/templates/qmn_primary.css
index 850335dfd..fcc54b91f 100644
--- a/templates/qmn_primary.css
+++ b/templates/qmn_primary.css
@@ -108,6 +108,7 @@
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
+ color: #222;
}
.quiz_section>.quiz-cat {