diff --git a/css/qsm-admin.css b/css/qsm-admin.css
index 8e91a87be..07fcf3c47 100644
--- a/css/qsm-admin.css
+++ b/css/qsm-admin.css
@@ -3469,4 +3469,29 @@ input#preferred-date-format-custom {
margin: 13px -15px 8px;
content: "";
width: calc(100% + 26px);
+}
+
+/* Extra shortcodes popup */
+button.button.qsm-extra-shortcode-popup {
+ display: flex;
+ align-items: center;
+ position: relative;
+ top: 30px;
+ left: 197px;
+ z-index: 10;
+}
+
+button.button.qsm-slashcommand-variables-button {
+ display: 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;
}
\ No newline at end of file
diff --git a/js/qsm-admin.js b/js/qsm-admin.js
index e369f2ad7..932268ff3 100644
--- a/js/qsm-admin.js
+++ b/js/qsm-admin.js
@@ -1379,10 +1379,32 @@ function qsm_is_substring_in_array( text, array ) {
editor.execCommand('mceInsertContent', false, pastedValue.replace(/%([^%]+)%/g, '$1 ') );
}
});
+
+ // Stop multiple times registering click event
+ $(document).off('click', '.qsm-slashcommand-variables-button').on('click', '.qsm-slashcommand-variables-button', function(e) {
+ e.preventDefault();
+ let id = $(this).data('id');
+ let editor = tinymce.get(id);
+ let contentToInsert = '/';
+ editor.focus();
+ editor.selection.setContent(contentToInsert);
+ showAutocomplete(editor, true);
+ });
});
}
}
addTinyMceAutoSuggestion();
+
+ $( document ).on( 'click', '.qsm-extra-shortcode-popup', function( e ) {
+ e.preventDefault();
+ MicroModal.show('modal-extra-shortcodes');
+ } );
+
+ jQuery(document).on('qsm_after_add_result_block', function(event, conditions, page, redirect, total) {
+ let $matchingElement = $(`#results-page-${total}`);
+ let $button = $matchingElement.parents('.results-page-show').find('.qsm-result-editor-custom-button');
+ $button.attr('data-id', total - 1);
+ });
}
}
}(jQuery));
@@ -3831,7 +3853,7 @@ var import_button;
tinymce: {
plugins: "qsmslashcommands link image lists charmap colorpicker textcolor hr fullscreen wordpress",
forced_root_block: '',
- toolbar1: 'formatselect,bold,italic,underline,bullist,numlist,blockquote,alignleft,aligncenter,alignright,link,qsm_slash_command,wp_adv',
+ toolbar1: 'formatselect,bold,italic,underline,bullist,numlist,blockquote,alignleft,aligncenter,alignright,link,wp_adv',
toolbar2: 'strikethrough,hr,forecolor,pastetext,removeformat,charmap,outdent,indent,undo,redo,wp_help,wp_code,fullscreen',
},
quicktags: true,
diff --git a/js/qsm-quiz.js b/js/qsm-quiz.js
index 931c01998..5c4865827 100644
--- a/js/qsm-quiz.js
+++ b/js/qsm-quiz.js
@@ -310,7 +310,7 @@ var qsmTimerInterval = [];
if ('0' != qmn_quiz_data[quizID].progress_bar) {
jQuery(document).trigger('qsm_init_progressbar_before', [quizID, qmn_quiz_data]);
$('#quizForm' + quizID).find('.qsm-progress-bar').show();
- qmn_quiz_data[quizID].bar = createQSMProgressBar(quizID, '#quizForm' + quizID + ' .qsm-progress-bar');
+ qmn_quiz_data[quizID].bar = createQSMProgressBar(quizID, '#quizForm' + quizID + ' .qsm-progress-bar');
jQuery(document).trigger('qsm_init_progressbar_after', [quizID, qmn_quiz_data]);
}
QSM.goToPage(quizID, 1);
diff --git a/php/admin/functions.php b/php/admin/functions.php
index 70b1cc367..2bea60e66 100644
--- a/php/admin/functions.php
+++ b/php/admin/functions.php
@@ -1434,17 +1434,15 @@ function qsm_admin_upgrade_content( $args = array(), $type = 'popup' ) {
* @return html
*/
function qsm_quiz_theme_settings( $type, $label, $name, $value, $default_value, $options = array( 'button_text' => '' ) ) {
- $tooltip = '';
- if ( isset( $options['helper_text'] ) && '' !== $options['helper_text'] ) {
- $tooltip .= '';
- $tooltip .= '' . esc_html( $options['helper_text'] ) . ' ';
- $tooltip .= ' ';
- }
?>
-
+
+
+
+
+
+
+ /
+
+ 'modal-extra-shortcodes',
+ "title" => __('QSM Shortcode', 'quiz-master-next'),
+ "description" => __('Wondering how to setup resultpage content with QSM conditional shortcode. Easily use conditional shortcodes and make your result page with conditional content.', '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);
+ ?>
+
+