diff --git a/admin/css/responsive-getting-started-page.css b/admin/css/responsive-getting-started-page.css index 16b3e374..13c00616 100644 --- a/admin/css/responsive-getting-started-page.css +++ b/admin/css/responsive-getting-started-page.css @@ -7,6 +7,7 @@ @import url('https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css'); @import url('https://fonts.googleapis.com/css2?family=Libre+Franklin:wght@400;500;600&display=swap'); +@import url('https://cdn.jsdelivr.net/npm/toastify-js/src/toastify.min.css'); * { font-family: 'Libre Franklin', sans-serif; @@ -315,7 +316,7 @@ body.appearance_page_responsive #wpbody-content { line-height: 28px; } -.responsive-theme-feature-card-desc { +.responsive-theme-feature-card-desc, .responsive-help-accordion-body { font-weight: 400; font-size: 14px; line-height: 170%; @@ -334,6 +335,9 @@ hr { .responsive-plugin-activated-button-disabled { color: #C1C1C1 !important; border-color: #C1C1C1 !important; + padding: 8px 20px; + border: none; + border-radius: 4px; } .responsive-theme-rst-content .responsive-plugin-activated-button-disabled { @@ -353,6 +357,25 @@ hr { box-shadow: none !important; } +.responsive-theme-home-setting-button .dashicons { + color: #2271B1; + font-size: 24px; + vertical-align: text-bottom; +} + +.responsive-theme-pro-features .responsive-theme-feature-seperator { + color: #2271B1; +} + +.responsive-theme-no-focus { + box-shadow: none !important; +} + +.responsive-theme-disabled-links { + pointer-events: none; + color: #afafaf !important; +} + /* Home Tab Ends */ /* Starter Template Tab Starts */ @@ -400,7 +423,7 @@ hr { padding: 10px 20px; } -.responsive-theme-rst-learn-more a, .responsive-theme-home-links a { +.responsive-theme-rst-learn-more a, .responsive-theme-home-links a, .responsive-theme-pro-features a { font-weight: 400; font-size: 14px; line-height: 19px; @@ -477,6 +500,273 @@ hr { /* FreevsPro Tab Ends */ +/* Settings Tab Starts */ +.responsive-theme-setting-item-icon { + margin-right: 10px; + color: #A8A8A8; +} + +.responsive-theme-setting-item-title { + font-size: 16px; + font-weight: 500; + color: #A8A8A8; +} + +.responsive-theme-setting-border-left { + border-left: 1px solid #DEDEDE; +} + +.responsive-theme-setting-hr { + border-top: 1px solid #DEDEDE; + margin-left: -12px; +} + +.responsive-theme-single-setting-section { + margin-left: 40px; + margin-bottom: 40px; +} + +.responsive-theme-setting-title { + margin-bottom: 29px; + font-size: 20px; + font-weight: 600; + line-height: 24.24px; +} + +.responsive-theme-setting-input-label { + margin-bottom: 8px; + font-size: 14px; + font-weight: 400; + line-height: 23.8px; + color: #747B81; +} + +.responsive-theme-setting-form-control { + width: 60%; + border: 1px solid #CACDD2 !important; + height: 42px; +} + +/* For Chrome, Firefox, Opera, Safari 10.1+ */ +.responsive-theme-setting-form-control::placeholder { + color: #BCC1C5; + opacity: 1; /* Firefox */ + font-size: 14px; +} + +/* Internet Explorer 10-11 */ +.responsive-theme-setting-form-control:-ms-input-placeholder { + color: #BCC1C5; + font-size: 14px; +} + +/* Microsoft Edge */ +.responsive-theme-setting-form-control::-ms-input-placeholder { + color: #BCC1C5; + font-size: 14px; +} + +.responsive-theme-setting-form-control:disabled { + background-color: #FFFFFF; +} + +/* For Chrome, Firefox, Opera, Safari 10.1+ */ +.responsive-theme-setting-form-control-activated::placeholder { + color: #10B981; + opacity: 1; /* Firefox */ +} + +/* Internet Explorer 10-11 */ +.responsive-theme-setting-form-control-activated:-ms-input-placeholder { + color: #10B981; +} + +/* Microsoft Edge */ +.responsive-theme-setting-form-control-activated::-ms-input-placeholder { + color: #10B981; +} + +#responsive-theme-setting-activation-alert { + display: none; + font-size: 14px; + padding-top: 12px; + padding-bottom: 12px; +} + +#responsive-theme-setting-activation-alert .btn-close { + top: -4px; +} + +#responsive-theme-setting-activation-alert .btn-close:focus { + box-shadow: none; +} + +.responsive-theme-setting-activation-form-border-error { + border-color: #FF0000 !important; +} + +.responsive-theme-setting-activation-form-text-error { + color: #FF0000; + font-size: 14px; +} + +.responsive-theme-setting-active-tab { + color: #2271B1; +} + +.responsive-theme-single-setting-section textarea { + height: 80px; +} + +.responsive-theme-setting-checkbox-label { + font-size: 14px; + font-weight: 400; + color: #4B4B4B; + vertical-align: inherit; +} + +.responsive-theme-setting-note { + margin-top: 22px; + line-height: 23.8px; +} + +.responsive-theme-setting-primary-btn { + padding: 10px 20px !important; + font-size: 16px !important; + font-weight: 600; + line-height: 21.28px !important; + border-radius: 4px !important; +} + +#responsive-theme-setting-wl-section { + display: none; +} + +.responsive-theme-setting-pro-not-activated-title { + color: #4B5563; +} + +.responsive-theme-setting-pro-not-activated-desc { + font-size: 14px; + color: #6B7280; +} + +.responsive-theme-setting-activation-form input[type=text], .responsive-theme-setting-activation-form input[type=text]:focus { + color: #798188; +} + +.responsive-theme-setting-activation-key-title { + font-size: 20px; + color: #374151; +} + +.responsive-theme-setting-secondary-btn { + padding: 12px 34px !important; + line-height: 1.3 !important; + background-color: white !important; +} + +.responsive-theme-setting-get-assistance { + font-size: 14px; + color: #2271B1; + text-decoration: none; +} + +/* Settings Tab Ends */ + +/* Help Tab Starts */ + +.responsive-theme-help-support-title { + font-size: 22px; + color: #374151; +} + +.responsive-theme-help-support-desc { + font-size: 14px; + color: #4B4B4B; +} + +.responsive-theme-help-card-section { + margin-top: 34px; +} + +.responsive-theme-help-card-section .card { + border-color: #DEDEDE; +} + +.responsive-theme-help-card-section .card-body { + margin-top: 16px; +} + +.responsive-theme-help-card-icon-section { + display: flex; + justify-content: center; + align-items: center; +} + +.responsive-theme-help-card-icon-wrapper { + height: 60px; + padding: 20px; + background-color: #7C29C4; + width: 60px; + border-radius: 50%; + display: flex; + justify-content: center; + align-items: center; + margin-bottom: 15px; +} + +.responsive-theme-help-card-title { + font-size: 15px; + color: #374151; +} + +.responsive-theme-help-card-desc { + font-size: 14px; + color: #4B4B4B; +} + +.responsive-theme-help-ticket-text { + font-size: 18px; +} + +.responsive-theme-help-ticket-btn { + padding: 6px 16px !important; + margin-top: 40px; + background-color: white !important; +} +.responsive-theme-help-ticket-btn img { + margin-left: 10px; + margin-top: -2px; +} + +.responsive-theme-help-faq-title { + margin-top: 60px; + margin-bottom: 50px; + font-size: 30px; +} + +.responsive-theme-help-faq-section .accordion-button:focus { + box-shadow: none; +} + +.responsive-theme-help-faq-section .accordion-button:not(.collapsed) { + background-color: transparent; + color: #212529; +} + +.responsive-theme-help-faq-section .accordion-item:last-of-type { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} + +.responsive-theme-help-faq-section .accordion-item:first-of-type { + border-top-left-radius: 0; + border-top-right-radius: 0; +} + +/* Help Tab Ends */ + @media (max-width: 768px) { .responsive-theme-brand { @@ -578,6 +868,14 @@ hr { display: none !important; } + .responsive-theme-setting-border-left { + border-left: none; + } + + .responsive-theme-setting-form-control { + width: 100%; + } + } @@ -628,4 +926,12 @@ hr { display: flex !important; } + .responsive-theme-setting-border-left { + border-left: 1px solid #DEDEDE; + } + + .responsive-theme-setting-form-control { + width: 100%; + } + } \ No newline at end of file diff --git a/admin/images/banner-rst-template.jpg b/admin/images/banner-rst-template.jpg new file mode 100644 index 00000000..f3e26415 Binary files /dev/null and b/admin/images/banner-rst-template.jpg differ diff --git a/admin/images/getting-started-help-arrow.svg b/admin/images/getting-started-help-arrow.svg new file mode 100644 index 00000000..bb1abd0f --- /dev/null +++ b/admin/images/getting-started-help-arrow.svg @@ -0,0 +1,3 @@ + diff --git a/admin/images/getting-started-help-documentation.svg b/admin/images/getting-started-help-documentation.svg new file mode 100644 index 00000000..6fddf488 --- /dev/null +++ b/admin/images/getting-started-help-documentation.svg @@ -0,0 +1,9 @@ + diff --git a/admin/images/getting-started-help-feature.svg b/admin/images/getting-started-help-feature.svg new file mode 100644 index 00000000..fe17486b --- /dev/null +++ b/admin/images/getting-started-help-feature.svg @@ -0,0 +1,9 @@ + diff --git a/admin/images/getting-started-help-support.svg b/admin/images/getting-started-help-support.svg new file mode 100644 index 00000000..6eb12f3e --- /dev/null +++ b/admin/images/getting-started-help-support.svg @@ -0,0 +1,9 @@ + diff --git a/admin/images/getting-started-help-video.svg b/admin/images/getting-started-help-video.svg new file mode 100644 index 00000000..3d76467f --- /dev/null +++ b/admin/images/getting-started-help-video.svg @@ -0,0 +1,9 @@ + diff --git a/admin/images/icon_editor_textcolor_.svg b/admin/images/icon_editor_textcolor_.svg deleted file mode 100644 index a1f6abc6..00000000 --- a/admin/images/icon_editor_textcolor_.svg +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/admin/images/icon_format_image_.svg b/admin/images/icon_format_image_.svg deleted file mode 100644 index 84a750aa..00000000 --- a/admin/images/icon_format_image_.svg +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/admin/images/icon_menu_alt_.svg b/admin/images/icon_menu_alt_.svg deleted file mode 100644 index d9848e97..00000000 --- a/admin/images/icon_menu_alt_.svg +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/admin/images/icon_table_row_after_.svg b/admin/images/icon_table_row_after_.svg deleted file mode 100644 index 9d56eca2..00000000 --- a/admin/images/icon_table_row_after_.svg +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/admin/images/icon_table_row_before_.svg b/admin/images/icon_table_row_before_.svg deleted file mode 100644 index 33a05cae..00000000 --- a/admin/images/icon_table_row_before_.svg +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/admin/images/icon_text_page_.svg b/admin/images/icon_text_page_.svg deleted file mode 100644 index 1768c300..00000000 --- a/admin/images/icon_text_page_.svg +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/admin/images/icon_welcome_widgets_menus_.svg b/admin/images/icon_welcome_widgets_menus_.svg deleted file mode 100644 index cd402d7c..00000000 --- a/admin/images/icon_welcome_widgets_menus_.svg +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/admin/images/icon_welcome_write_blog_.svg b/admin/images/icon_welcome_write_blog_.svg deleted file mode 100644 index 644a6d2a..00000000 --- a/admin/images/icon_welcome_write_blog_.svg +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/admin/js/responsive-getting-started.js b/admin/js/responsive-getting-started.js index 13b89fd2..4529f134 100644 --- a/admin/js/responsive-getting-started.js +++ b/admin/js/responsive-getting-started.js @@ -118,4 +118,221 @@ $(document).ready(function () { } ); + // Display Toast Message. + function displayToast( msg, status ) { + let background = status === 'error' ? '#FF5151' : '#00CF21'; + Toastify({ + text: msg, + duration: 3000, + gravity: "top", + position: "center", + stopOnFocus: true, + offset: { + x: 0, + y: 30 + }, + style: { + background, + }, + }).showToast(); + } + + // White Label Settings. + $('#resp-theme-wl-settings-submit').click( function( event ) { + event.preventDefault() + let nonce = $(this).data('nonce') + let authorName = $('#resp_wl_author_name').val() + let websiteURL = $('#resp_wl_website_url').val() + let pluginName = $('#resp_wl_plugin_name').val() + let pluginURL = $('#resp_wl_plugin_url').val() + let pluginDesc = $('#resp_wl_plugin_desc').val() + let hideSettings = 'off' + if( $('#resp_wl_hide_settings').prop('checked') ) { + hideSettings = 'on' + } + + $.ajax( + { + type: 'POST', + url: localize.ajaxurl, + data: + { + action: 'responsive-pro-white-label-settings', + _nonce: nonce, + authorName, websiteURL, pluginName, pluginURL, pluginDesc, hideSettings + }, + success: function success( data ) + { + if (data.success) { + displayToast( data.data.msg, 'success' ); + if ( 'on' === hideSettings ) { + location.reload() + } + } else { + displayToast( data.data.msg, 'error' ); + } + } + } + ); + + }) + + // Switching of Setting Tabs. + $('#responsive-theme-setting-wl-tab').click(function(){ + if ($("#responsive-theme-setting-wl-section").length === 0) { + return + } + $('#responsive-theme-setting-wl-section').show() + $('#responsive-theme-setting-activation-key-tab span, #responsive-theme-setting-activation-key-tab p').removeClass('responsive-theme-setting-active-tab'); + $('#responsive-theme-setting-wl-tab span, #responsive-theme-setting-wl-tab p').addClass('responsive-theme-setting-active-tab') + $('#responsive-theme-setting-activation-key-section').hide() + }) + + $('#responsive-theme-setting-activation-key-tab').click(function(){ + $('#responsive-theme-setting-activation-key-section').show() + $('#responsive-theme-setting-activation-key-tab span, #responsive-theme-setting-activation-key-tab p').addClass('responsive-theme-setting-active-tab') + $('#responsive-theme-setting-wl-tab span, #responsive-theme-setting-wl-tab p').removeClass('responsive-theme-setting-active-tab') + $('#responsive-theme-setting-wl-section').hide() + }) + + // Function to show error styling and message while activating license. + function show_activation_error( inputTarget, msgTarget, msg ) { + $(`#${inputTarget}`).addClass('responsive-theme-setting-activation-form-border-error'); + $(`#${msgTarget}`).addClass('responsive-theme-setting-activation-form-text-error'); + $(`#${msgTarget}`).text(msg); + } + + // Resets the applied activation errors. + function reset_activation_errors() { + $('#resp_pro_activation_key_api_key, #resp_pro_activation_key_product_id').removeClass('responsive-theme-setting-activation-form-border-error'); + + $('#resp_pro_activation_key_api_key_msg, #resp_pro_activation_key_product_id_msg') + .removeClass('responsive-theme-setting-activation-form-text-error') + .text(''); + + } + + // Creates the alert element before activation form submit and after destroying the previous alert element. + function createAlertElement() { + let alertElement = '
' + $('#responsive-theme-setting-activation-key-section').prepend(alertElement); + } + + // Removes the previous Alert element. + function destroyAlertElement() { + $('#responsive-theme-setting-activation-alert').remove() + } + + // Alert type - success, warning, error. + function displayAlert(type, text) { + var $activationAlert = $('#responsive-theme-setting-activation-alert'); + $activationAlert.addClass('alert-' + type).prepend(text).show(); + + } + + $('#resp_pro_activation_key_api_key').keyup(function(){ + if ('' !== $(this).val()) { + $('#resp_pro_activation_key_api_key').removeClass('responsive-theme-setting-activation-form-border-error'); + $('#resp_pro_activation_key_api_key_msg').removeClass('responsive-theme-setting-activation-form-text-error').text(''); + } + }); + + $('#resp_pro_activation_key_product_id').keyup(function(){ + if ('' !== $(this).val()) { + $('#resp_pro_activation_key_product_id').removeClass('responsive-theme-setting-activation-form-border-error'); + $('#resp_pro_activation_key_product_id_msg').removeClass('responsive-theme-setting-activation-form-text-error').text(''); + } + }); + + // Request to deactivate Responsive Pro License. + $('#resp_pro_activation_key_deactivate_api_key_submit').click( function(event) { + event.preventDefault() + reset_activation_errors() + destroyAlertElement() + createAlertElement() + $('#resp_pro_activation_key_deactivate_api_key_submit').text('Deactivating...') + let nonce = $(this).data('nonce') + $.ajax( + { + type: 'POST', + url: localize.ajaxurl, + data: + { + action: 'responsive-pro-api-key-deactivate', + _nonce: nonce, + }, + success: function success( data ) + { + if ( false === data.data.error ) { + displayAlert( 'success', 'API Key Deactivated. ' + data.data.message ) + $('#resp_pro_activation_key_deactivate_api_key_submit').text('Deactivated!') + setTimeout(function(){ + location.reload(); + }, 5000); + } else { + displayAlert( 'warning', data.data.message ) + $('#resp_pro_activation_key_deactivate_api_key_submit').text('Deactivate') + return + } + } + } + ); + }) + + // Request to activate Responsive Pro License. + $('#resp_pro_activation_key_activate_api_key_submit').click( function(event) { + event.preventDefault() + reset_activation_errors() + destroyAlertElement() + createAlertElement() + + let productId = $('#resp_pro_activation_key_product_id').val() + let apiKey = $('#resp_pro_activation_key_api_key').val() + let nonce = $(this).data('nonce') + + if ( '' === apiKey ) { + show_activation_error( 'resp_pro_activation_key_api_key', 'resp_pro_activation_key_api_key_msg', 'Please Enter the API Key' ); + return + } + + if ( '' === productId ) { + show_activation_error( 'resp_pro_activation_key_product_id', 'resp_pro_activation_key_product_id_msg', 'Please Enter the Product ID' ); + return + } + + $('#resp_pro_activation_key_activate_api_key_submit').text( 'Activating...' ) + + $.ajax( + { + type: 'POST', + url: localize.ajaxurl, + data: + { + action: 'responsive-pro-api-key-activate', + _nonce: nonce, + productId, apiKey + }, + success: function success( data ) + { + if ( 'undefined' === data.data.error && false === data.data.activate_results.success ) { + displayAlert( 'warning', data.data.activate_results.data.error ) + $('#resp_pro_activation_key_activate_api_key_submit').text( 'Activate' ) + return + } + if ( false === data.data.error ) { + displayAlert( 'success', 'API Key Activated. ' + data.data.message ) + $('#resp_pro_activation_key_activate_api_key_submit').text( 'Activated!' ) + setTimeout(function() { + location.reload(); + }, 5000); + } else { + displayAlert( 'warning', data.data.message ) + $('#resp_pro_activation_key_activate_api_key_submit').text( 'Activate' ) + return + } + } + } + ); + }) + }); diff --git a/admin/templates/get-started.php b/admin/templates/get-started.php index b420d477..c1c097f8 100644 --- a/admin/templates/get-started.php +++ b/admin/templates/get-started.php @@ -13,6 +13,25 @@ exit; // Exit if accessed directly. } +$slug = 'responsive-addons-pro'; +$state = ''; +if ( file_exists( ABSPATH . 'wp-content/plugins/' . $slug . '/' . $slug . '.php' ) ) { + $state = is_plugin_active( $slug . '/' . $slug . '.php' ) ? 'activated' : 'installed'; +} else { + $state = 'not installed'; +} + +$nonce = add_query_arg( + array( + 'action' => 'activate', + 'plugin' => rawurlencode( $slug . '/' . $slug . '.php' ), + 'plugin_status' => 'all', + 'paged' => '1', + '_wpnonce' => wp_create_nonce( 'activate-plugin_' . $slug . '/' . $slug . '.php' ), + ), + network_admin_url( 'plugins.php' ) +); + ?>Home
Settings
+Starter Templates
Useful Plugins
Free vs Pro
+ +Free vs Pro
+Help
:
+