From 8b914ed42ed6a543fd211c140e42f8ec7213585c Mon Sep 17 00:00:00 2001 From: etchirag Date: Mon, 25 Nov 2024 10:32:19 +0530 Subject: [PATCH 1/3] Updated css and button related issue --- css/qsm-admin.css | 52 +++++++++++++++++++-- js/qsm-admin.js | 6 +-- php/admin/admin-results-page.php | 22 ++++----- php/admin/options-page-results-page-tab.php | 50 ++++++++++---------- php/admin/options-page-style-tab.php | 10 ++-- php/admin/quizzes-page.php | 8 ++-- 6 files changed, 96 insertions(+), 52 deletions(-) diff --git a/css/qsm-admin.css b/css/qsm-admin.css index f185f3df..d332c01e 100644 --- a/css/qsm-admin.css +++ b/css/qsm-admin.css @@ -564,6 +564,9 @@ span.qsm-quiz-name { 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; @@ -2876,6 +2879,10 @@ input#duplicate_questions { padding: 4px 8px; color: #3c434a; cursor: pointer; + min-height: 35px; +} +.qsm-actions-link-box a img { + vertical-align: -webkit-baseline-middle; } .qsm-actions-link-box a.disabled { cursor: not-allowed; @@ -3011,6 +3018,9 @@ a.qsm-toggle-result-page-button, a.qsm-toggle-email-template-button { 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%; @@ -3795,17 +3805,30 @@ 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-extra-shortcode-popup span.dashicons.dashicons-shortcode { + margin-right: 4px; } button.button.qsm-slashcommand-variables-button .qsm-slash-inside { margin: 0 4px 0 -1px; font-weight: 1000; + border: 1px solid #2271B1; + padding: 0px 4px 0px 4px; + font-size: 10px; + vertical-align: text-bottom; + display: inline-flex; + align-items: center; + height: 13px; + justify-content: center; +} + +.results-page-show button.button.insert-media.add_media{ + border: 1px solid #2271B1; + font-weight: 500; } @media screen and (max-width: 782px) { @@ -3849,6 +3872,25 @@ button.button.qsm-slashcommand-variables-button .qsm-slash-inside { 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; +} +p.qsm-insert-template-variable-text { + margin-top: 5px; + margin-bottom: 15px; +} .qsm_page_mlw_quiz_results .widefat tbody td input[type="checkbox"], .qsm_page_mlw_quiz_results .widefat thead th input[type="checkbox"] { diff --git a/js/qsm-admin.js b/js/qsm-admin.js index fd244c93..90220d0e 100644 --- a/js/qsm-admin.js +++ b/js/qsm-admin.js @@ -4227,9 +4227,9 @@ var QSM_Quiz_Broadcast_Channel; 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 $slashCommandButton = $resultsPage.find('.qsm-slashcommand-variables-button'); - $resultsPage.find('.wp-media-buttons .insert-media').after($slashCommandButton); + // const $resultsPage = jQuery(`#results-page-${QSMAdminResults.total}`).closest('.results-page-show'); + // const $slashCommandButton = $resultsPage.find('.qsm-slashcommand-variables-button'); + // $resultsPage.find('.wp-media-buttons .insert-media').after($slashCommandButton); }, newResultsPage: function () { var conditions = [{ diff --git a/php/admin/admin-results-page.php b/php/admin/admin-results-page.php index 6ec51568..6aa3b6dc 100644 --- a/php/admin/admin-results-page.php +++ b/php/admin/admin-results-page.php @@ -94,10 +94,10 @@ function qsm_results_overview_tab_content() { global $wpdb; global $mlwQuizMasterNext; wp_enqueue_style( 'qsm_result_page_style', plugins_url( '../css/qsm-admin.css', __FILE__ ), array(), $mlwQuizMasterNext->version ); - wp_enqueue_script( 'qsm_result_page_script', plugins_url( 'js/qsm-admin.js', __FILE__ ), array( 'jquery'), $mlwQuizMasterNext->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' ), + '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' ) ) { @@ -654,8 +654,8 @@ function qsm_export_results_tabs_content() { "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( + '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' ), @@ -666,8 +666,8 @@ function qsm_export_results_tabs_content() { ), ), "use_cases" => array( - 'briefing' => '', - 'list_items' => 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' ), @@ -708,8 +708,8 @@ function qsm_proctor_quiz_tabs_content() { "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( + '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' ), @@ -718,8 +718,8 @@ function qsm_proctor_quiz_tabs_content() { ), ), "use_cases" => array( - 'briefing' => '', - 'list_items' => 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' ), diff --git a/php/admin/options-page-results-page-tab.php b/php/admin/options-page-results-page-tab.php index f9727f1b..06d6cd2c 100644 --- a/php/admin/options-page-results-page-tab.php +++ b/php/admin/options-page-results-page-tab.php @@ -256,29 +256,6 @@ function qsm_options_results_tab_template(){

- - 'modal-extra-shortcodes', - "title" => __('Extra Shortcode', 'quiz-master-next'), - "description" => __('Need dynamic content on your results pages? Our QSM conditional shortcode makes it easy. Create personalized experiences based on specific conditions or rules.', 'quiz-master-next'), - "chart_image" => plugins_url('', dirname(__FILE__)) . '/images/extra-shortcodes.png', - "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 QSM Extra Shortodes Addon separately.', 'quiz-master-next'), - "buy_btn_text" => __('Buy QSM Extra Shortodes Addon', 'quiz-master-next'), - "doc_link" => qsm_get_plugin_link( 'docs/add-ons/extra-shortcodes/', 'qsm_list', 'extrashortcodea_button', 'extra-shortcodes-upsell_read_documentation', 'qsm_plugin_upsell' ), - "upgrade_link" => qsm_get_plugin_link( 'pricing', 'qsm_list', 'extrashortcodea_button', 'extra-shortcodes-upsell_upgrade', 'qsm_plugin_upsell' ), - "addon_link" => qsm_get_plugin_link( 'downloads/extra-shortcodes', 'qsm_list', 'extrashortcodea_button', 'extra-shortcodes-upsell_buy_addon', 'qsm_plugin_upsell' ), - ); - qsm_admin_upgrade_popup($qsm_pop_up_arguments); - ?> - -
@@ -302,8 +279,33 @@ function qsm_options_results_tab_template(){ } }) }}} +
+ + 'modal-extra-shortcodes', + "title" => __('Extra Shortcode', 'quiz-master-next'), + "description" => __('Need dynamic content on your results pages? Our QSM conditional shortcode makes it easy. Create personalized experiences based on specific conditions or rules.', 'quiz-master-next'), + "chart_image" => plugins_url('', dirname(__FILE__)) . '/images/extra-shortcodes.png', + "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 QSM Extra Shortodes Addon separately.', 'quiz-master-next'), + "buy_btn_text" => __('Buy QSM Extra Shortodes Addon', 'quiz-master-next'), + "doc_link" => qsm_get_plugin_link( 'docs/add-ons/extra-shortcodes/', 'qsm_list', 'extrashortcodea_button', 'extra-shortcodes-upsell_read_documentation', 'qsm_plugin_upsell' ), + "upgrade_link" => qsm_get_plugin_link( 'pricing', 'qsm_list', 'extrashortcodea_button', 'extra-shortcodes-upsell_upgrade', 'qsm_plugin_upsell' ), + "addon_link" => qsm_get_plugin_link( 'downloads/extra-shortcodes', 'qsm_list', 'extrashortcodea_button', 'extra-shortcodes-upsell_buy_addon', 'qsm_plugin_upsell' ), + ); + qsm_admin_upgrade_popup($qsm_pop_up_arguments); + ?> + + +
-

/

+

/

diff --git a/php/admin/options-page-style-tab.php b/php/admin/options-page-style-tab.php index caa54ceb..321eddfc 100644 --- a/php/admin/options-page-style-tab.php +++ b/php/admin/options-page-style-tab.php @@ -205,8 +205,8 @@ function qsm_options_styling_tab_content() { "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( + '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' ), @@ -215,8 +215,8 @@ function qsm_options_styling_tab_content() { ), ), "use_cases" => array( - 'briefing' => __( 'Ideal for educational programs, marketing surveys, and detailed feedback collection.', 'quiz-master-next' ), - 'list_items' => 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' ), @@ -230,7 +230,7 @@ function qsm_options_styling_tab_content() { qsm_get_plugin_link( 'pricing', 'qsm_list', 'importexport_button', 'import-export-upsell_upgrade', 'qsm_plugin_upsell' ), "addon_link" => qsm_get_plugin_link( 'downloads/export-import', 'qsm_list', 'importexport_button', 'import-export-upsell_buy_addon', 'qsm_plugin_upsell' ), "benefits" => array( - 'briefing' => '', - 'list_items' => array( + 'briefing' => '', + 'list_items' => array( __( 'Saves time by quickly transferring quizzes and surveys between sites.', 'quiz-master-next' ), __( 'Supports flexible export formats like JSON and CSV for easy editing.', 'quiz-master-next' ), __( 'Allows customizable imports for full quizzes, questions, or settings.', 'quiz-master-next' ), @@ -504,8 +504,8 @@ class="qsm-popup__btn qsm-popup__btn-primary"> array( - 'briefing' => '', - 'list_items' => array( + 'briefing' => '', + 'list_items' => array( __( 'Facilitates site migration by moving quizzes between staging and live sites.', 'quiz-master-next' ), __( 'Simplifies data transfer during website redesigns.', 'quiz-master-next' ), __( 'Allows sharing quizzes across multiple websites.', 'quiz-master-next' ), From 04d8a39df70acbc57a01316df5aa573e23307af7 Mon Sep 17 00:00:00 2001 From: etchirag Date: Tue, 26 Nov 2024 09:23:42 +0530 Subject: [PATCH 2/3] Updated icons and UI as per figma file --- assets/arrow-down-s-line.svg | 1 + assets/arrow-up-down-fill.png | Bin 311 -> 0 bytes assets/arrow-up-down-fill.svg | 1 + assets/arrow-up-s-line.svg | 1 + assets/copy.png | Bin 319 -> 0 bytes assets/copy.svg | 1 + assets/edit-pencil.png | Bin 256 -> 0 bytes assets/edit-pencil.svg | 1 + assets/gear.png | Bin 514 -> 0 bytes assets/gear.svg | 1 + assets/mind-map.svg | 1 + assets/trash.png | Bin 355 -> 0 bytes assets/trash.svg | 1 + css/qsm-admin.css | 99 ++++++++++---------- js/qsm-admin.js | 50 +++++----- mlw_quizmaster2.php | 2 + php/admin/options-page-contact-tab.php | 6 +- php/admin/options-page-email-tab.php | 23 +++-- php/admin/options-page-questions-tab.php | 8 +- php/admin/options-page-results-page-tab.php | 64 ++++++------- 20 files changed, 139 insertions(+), 121 deletions(-) create mode 100644 assets/arrow-down-s-line.svg delete mode 100644 assets/arrow-up-down-fill.png create mode 100644 assets/arrow-up-down-fill.svg create mode 100644 assets/arrow-up-s-line.svg delete mode 100644 assets/copy.png create mode 100644 assets/copy.svg delete mode 100644 assets/edit-pencil.png create mode 100644 assets/edit-pencil.svg delete mode 100644 assets/gear.png create mode 100644 assets/gear.svg create mode 100644 assets/mind-map.svg delete mode 100644 assets/trash.png create mode 100644 assets/trash.svg diff --git a/assets/arrow-down-s-line.svg b/assets/arrow-down-s-line.svg new file mode 100644 index 00000000..e1bc908a --- /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.png b/assets/arrow-up-down-fill.png deleted file mode 100644 index 1167f3a2a6c8ff3cbad27ef22fcef0ce00716e5a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 311 zcmV-70m%M|P)PUkQcDA5?Qd21zC{P&6ZpDX}pAmvbGR!pa`M7f{m3ZHZ(Q2=KlN7 z|39(3zBQfm|IazUW=?aCf7)2V3Dz3orZF3B5evA-H=eMZNgBkML5b)h9%909J!i!G zalc \ 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 00000000..3a424dff --- /dev/null +++ b/assets/arrow-up-s-line.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/copy.png b/assets/copy.png deleted file mode 100644 index 256a50623ba0c9ee307743abb122cf2d74276d8c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 319 zcmV-F0l@x=P)8%$R1x`R=IgCZu=e1Rnct1XY$*V2MPwIqWLfs9s!82V zu&P!7O2aq5^`V?{5)F$cl;kdO2pNnum1l+f9W0hkHd>|rUtMdfB^qI%n`Dy=P0FDfPS^Ewd Ri%$Rm002ovPDHLkV1mI=lGgwL diff --git a/assets/copy.svg b/assets/copy.svg new file mode 100644 index 00000000..84dfcd93 --- /dev/null +++ b/assets/copy.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/edit-pencil.png b/assets/edit-pencil.png deleted file mode 100644 index c4bd31f61c7090c18e6f5356a5d8e7d47b16f155..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 256 zcmV+b0ssDqP)6fW#U^EkHyx7a_#(V1(t}%)Y~O zVAz>i`19@XvFaKPw5rzD!6$ZjstVf17cP+pJm*3SrON=W@D}wxM|lb@R?x)*K4P}X zg \ No newline at end of file diff --git a/assets/gear.png b/assets/gear.png deleted file mode 100644 index e626181127753e0ecab45859b21246d38c4da761..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 514 zcmV+d0{#7oP)5JmqC1Kvn84MnT2T~7=Xyr%C4dhARs@9*5KFI_SV)&tK!i3lzF!<f%Ys!JGZpyM`$%L_rC6$WE4|k{X)qcNc`a)G7 zVx_;2IM2b;>6Gx=%+~I{0&p0NEX$~@3L!KRTIYGbarf^OLIKEl74UJx4NI<_BG|Kd2O5AAR&#=ryEBLGg \ No newline at end of file diff --git a/assets/mind-map.svg b/assets/mind-map.svg new file mode 100644 index 00000000..34d98e65 --- /dev/null +++ b/assets/mind-map.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/trash.png b/assets/trash.png deleted file mode 100644 index 224a8cb50c43b54f147d60472efa9a380316f93d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 355 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4foCO|{#S9GG!XV7ZFl&wkP>``W z$lZxy-8q?;Kn_c~qpu?a!^VE@KZ&eB{tr(V$B+ufx0B!UHW>)C@fR?#F*HeAIL&pD zJ;*6@a0jFEjz-yoyg3PsYz`ZcAJXGnpLk@gR2j% z%DugIeVKD&me_$weeo0iH*ao{>^$eUjoCUg>CoiG8mB)Qa;kMU1V&{){ZVdU`RCHN z^4RUm^JSN3dU>4tc%s#x!$aAH&p+9ICzoZH(}LH^+g5ci5)f%DwwRuMC&G(cP*$$I zH8*aPj`io?7JcC}q|bepTh(30b8%L?1&{N&(>x~qS9Qxo{;SK#%C%iNU@}d6q2!-^ x$@`La{9)&6komVZo%{PTj{p|$Ez3pa^PjUho6TzO)dYqCgQu&X%Q~loCIF=Th6(@x diff --git a/assets/trash.svg b/assets/trash.svg new file mode 100644 index 00000000..e074d3a0 --- /dev/null +++ b/assets/trash.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/css/qsm-admin.css b/css/qsm-admin.css index d332c01e..9ba707f7 100644 --- a/css/qsm-admin.css +++ b/css/qsm-admin.css @@ -511,6 +511,11 @@ span.qsm-quiz-name { padding: 15px; min-width: 60%; } +.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; @@ -552,15 +557,15 @@ span.qsm-quiz-name { .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-show .qsm-result-page-common-section select, -.results-page-show .qsm-result-page-common-section 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="text"], +.qsm-email-content .qsm-email-page-common-section input[type="email"] { min-width: auto; width: 100%; border-radius: 5px; - border-color: #ccc; + border-color: #555555; padding-top: 2px; padding-bottom: 2px; } @@ -587,6 +592,11 @@ span.qsm-quiz-name { .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; @@ -610,7 +620,7 @@ 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 { @@ -2867,22 +2877,18 @@ input#duplicate_questions { flex-wrap: nowrap; border-radius: 5px; margin: 0 5px; - border: 1px solid #dfd4d4; + 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: 4px 8px; + padding: 0 6px 4px 6px; color: #3c434a; - cursor: pointer; - min-height: 35px; -} -.qsm-actions-link-box a img { - vertical-align: -webkit-baseline-middle; + cursor: pointer;; } .qsm-actions-link-box a.disabled { cursor: not-allowed; @@ -2895,18 +2901,16 @@ input#duplicate_questions { .qsm-actions-link-box a:not(:first-child) { border-left: 1px solid #d6d6d6; } -a.qsm-toggle-result-page-button, a.qsm-toggle-email-template-button { - height: 35px; - display: flex; - align-items: center; - justify-content: center; -} .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{ - width: 121px; - font-weight: 600; +.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; @@ -3813,34 +3817,27 @@ button.button.qsm-extra-shortcode-popup span.dashicons.dashicons-shortcode { margin-right: 4px; } -button.button.qsm-slashcommand-variables-button .qsm-slash-inside { - margin: 0 4px 0 -1px; - font-weight: 1000; +.results-page-show .wp-media-buttons button.button { + border: 1px solid #2271B1; + font-weight: 500; +} + +.qsm-quiz-result-tab button.add-new-page, +.qsm-quiz-email-tab button.add-new-email { border: 1px solid #2271B1; - padding: 0px 4px 0px 4px; - font-size: 10px; - vertical-align: text-bottom; - display: inline-flex; - align-items: center; - height: 13px; - justify-content: center; + font-weight: 500; } -.results-page-show button.button.insert-media.add_media{ - 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; } -@media screen and (max-width: 782px) { - button.button.qsm-extra-shortcode-resultpage-button { - display: flex; - align-items: center; - position: relative; - top: 3px; - left: 0px; - z-index: 10; - } +.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%; } @@ -3887,9 +3884,15 @@ button.button.qsm-slashcommand-variables-button .qsm-slash-inside { .results-page-show .quicktags-toolbar input[type="button"]{ border-color: #2271B1; } -p.qsm-insert-template-variable-text { - margin-top: 5px; - margin-bottom: 15px; +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"], diff --git a/js/qsm-admin.js b/js/qsm-admin.js index 90220d0e..e0df57c7 100644 --- a/js/qsm-admin.js +++ b/js/qsm-admin.js @@ -1961,9 +1961,6 @@ var QSMContact; 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'); @@ -4227,9 +4224,9 @@ var QSM_Quiz_Broadcast_Channel; 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 $slashCommandButton = $resultsPage.find('.qsm-slashcommand-variables-button'); - // $resultsPage.find('.wp-media-buttons .insert-media').after($slashCommandButton); + 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 = [{ @@ -4289,24 +4286,35 @@ var QSM_Quiz_Broadcast_Channel; console.log($parent); $(this).closest('.results-page-condition').remove(); QSMAdminResults.updateResultConditonCount($parent); - }); - 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'); - }); - 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(); - } - }); + }); }); } } + + 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(); diff --git a/mlw_quizmaster2.php b/mlw_quizmaster2.php index d164893e..e499f2be 100644 --- a/mlw_quizmaster2.php +++ b/mlw_quizmaster2.php @@ -584,6 +584,8 @@ public function qsm_admin_scripts_style( $hook ) { '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/options-page-contact-tab.php b/php/admin/options-page-contact-tab.php index 336039bd..ebdbc8cb 100644 --- a/php/admin/options-page-contact-tab.php +++ b/php/admin/options-page-contact-tab.php @@ -234,9 +234,9 @@ function qsm_options_contact_tab_template() {
diff --git a/php/admin/options-page-email-tab.php b/php/admin/options-page-email-tab.php index 79d48d52..823f06a4 100644 --- a/php/admin/options-page-email-tab.php +++ b/php/admin/options-page-email-tab.php @@ -183,21 +183,20 @@ function qsm_options_emails_tab_template() { {{data.id}}