Version Description
- April 10th, 2017 =
- Adding some CSS to allow the editor's text mode to function properly
Download this release
Release Info
Developer | yikesitskevin |
Plugin | Custom Product Tabs for WooCommerce |
Version | 1.5.12 |
Comparing to | |
See all releases |
Code changes from version 1.5.11 to 1.5.12
css/repeatable-custom-tabs.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.yikes_woo_tabs_title_field {
|
2 |
position: absolute;
|
3 |
right: 1em;
|
4 |
top: 12px;
|
5 |
border-top: 1px solid #a0a5aa;
|
6 |
width: 100%;
|
7 |
white-space: nowrap;
|
8 |
max-width: 79%;
|
9 |
max-width: 100%;
|
|
|
10 |
position: absolute;
|
11 |
right: 1em;
|
12 |
top: 12px;
|
13 |
border-top: 1px solid #a0a5aa;
|
14 |
width: 100%;
|
15 |
white-space: nowrap;
|
16 |
max-width: 79%;
|
17 |
max-width: 100%;
|
|
|
1 |
position: absolute;
|
2 |
right: 1em;
|
3 |
top: 12px;
|
4 |
border-top: 1px solid #a0a5aa;
|
5 |
width: 100%;
|
6 |
white-space: nowrap;
|
7 |
max-width: 79%;
|
8 |
max-width: 100%;
|
9 |
+
.yikes_woo_tabs_title_field {
|
10 |
position: absolute;
|
11 |
right: 1em;
|
12 |
top: 12px;
|
13 |
border-top: 1px solid #a0a5aa;
|
14 |
width: 100%;
|
15 |
white-space: nowrap;
|
16 |
max-width: 79%;
|
17 |
max-width: 100%;
|
css/repeatable-custom-tabs.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.yikes_woo_tabs_title_field{width:70%!important}#duplicate_this_row{display:none}a[href="#yikes_woocommerce_custom_product_tabs"]:before{font-family:yikes-woo-font!important;content:"\e600"!important;font-size:15px!important;display:block;float:left;margin-top:2px;margin-right:8px}#yikes_woocommerce_custom_product_tabs hr{margin:1.5em 0}#yikes_woocommerce_custom_product_tabs .options_group{padding:0 1em}#yikes_woocommerce_custom_product_tabs.woocommerce_options_panel div.form-field-tinymce,#yikes_woocommerce_custom_product_tabs.woocommerce_options_panel p.form-field,#yikes_woocommerce_custom_product_tabs.woocommerce_options_panel p.form-field-tinymce{max-width:85%;padding-left:0}#yikes_woocommerce_custom_product_tabs.woocommerce_options_panel p.form-field{padding:5px 0!important}#yikes_woocommerce_custom_product_tabs.woocommerce_options_panel .form-field label{font-size:1.1em;font-weight:700;margin:2px 8px 0 0;width:auto}.yikes-woo-custom-tab-divider{display:block;height:2px;margin:2em 0 1.5em;border-bottom:1px solid #0073aa}.yikes-custom-wysiwyg-label{margin-left:1em;line-height:3}.yikes-logo{position:absolute;top:0;right:0;margin-top:.75em;margin-right:.75em;opacity:.85}#yikes-woo-tabs-review-us{float:right}.yikes-woo-tabs-hidden-how-to-info{display:none;font-family:"Open Sans",sans-serif!important;margin-right:30px}.woocommerce_options_panel p.yikes_woo_how_to_info{margin:9px 0 0;padding:0;text-align:right}.yikes-tabs-how-to-toggle{font-size:20px;position:absolute;right:1em;top:12px}.yikes-tabs-how-to-toggle:hover{cursor:pointer}.move-tab-data-down,.move-tab-data-up{font-size:25px;transition:color .2s}.move-tab-data-down:hover,.move-tab-data-up:hover{cursor:pointer;color:#4c9cce}.button-holder{margin-top:-190px;position:absolute;right:1em;width:110px}.yikes_wc_move_tab_container{margin-top:.5em;text-align:center}.woocommerce_options_panel p.yikes_wc_move_tab{line-height:1;margin:0;padding:0}.button-holder .button-secondary.remove_this_tab{background:#e35b5b;border-color:#dc3232;box-shadow:0 1px 0 #dc3232;color:#fff;cursor:pointer;margin-top:20px}.button-holder .button-secondary.remove_this_tab .dashicons{margin-top:-2px;vertical-align:middle}@font-face{font-family:yikes-woo-font;src:url(./font/yikes-woo-font.eot?-394dt5);src:url(./font/yikes-woo-font.eot?#iefix-394dt5) format('embedded-opentype'),url(./font/yikes-woo-font.woff?-394dt5) format('woff'),url(./font/yikes-woo-font.ttf?-394dt5) format('truetype'),url(./font/yikes-woo-font.svg?-394dt5#yikes-woo-font) format('svg');font-weight:400;font-style:normal}[class*=" yikes-woo-"],[class^=yikes-woo-]{font-family:yikes-woo-font;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.yikes-woo-uniE600:before{content:"\e600"}.loading-wp-editor-gif{margin-left:50%;margin-right:50%}.loading-wp-editor-gif-settings{padding-left:50px}.dashicons.inline-button-dashicons{font-size:15px;vertical-align:bottom}.yikes_woo_save_success{color:#31843f;float:left;padding-top:1em}._yikes_wc_add_tab_center,.add_tabs_container{border-top:1px solid #a0a5aa;margin:2em 2px 0 0;text-align:right;width:100%}.add_tabs_container .button.button-primary{margin-top:10px}._yikes_wc_add_tab_center{border-top:none;text-align:center}#_yikes_wc_apply_a_saved_tab,#add_another_tab{background:#cc99c2;border-color:#b366a4;color:#fff;text-decoration:none!important}.add_tabs_container._yikes_wc_add_tab_center_new .button.button-primary{display:none}#add_another_tab{-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);margin-bottom:10px;margin-top:10px}#_yikes_wc_apply_a_saved_tab{-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);margin:10px 0 0 8px}._yikes_wc_feedback_message{display:none;padding-left:3px}#yikes_woo_tab_error_message{color:red}#yikes_woo_tab_success_message{color:#31843f;margin-top:4px}.yikes_woo_how_to_h3{padding-left:10px;margin-top:0;font-weight:700}.yikes_woo_how_to_info,.yikes_woo_how_to_note{padding-left:23px!important}.yikes_woo_how_to_note{font-style:italic}.yikes-tabs-how-to-toggle-cursor{cursor:pointer}.yikes_woo_settings_info{font-family:"Open Sans",sans-serif}.yikes_woo_using_reusable_tab{opacity:.6;pointer-events:none}.lity-container{background:#fff;border-radius:6px;padding:.6em 1em 1em}.lity-container .lity-content::after{box-shadow:none}[class*=yikes_wc_lity_col]{float:left}.yikes_wc_lity_col_title{width:93%;padding:4px 20px 4px 2px;white-space:nowrap}.yikes_wc_lity_col_select{width:7%;padding-right:8px;padding-top:4px;cursor:pointer}.yikes_wc_lity_header{border-bottom:1px solid #555d66;margin-bottom:.4em;line-height:1;font-size:1.2em;font-weight:700;padding:0 0 8px;text-align:center;width:100%}.yikes_wc_lity_header>span{width:100px;text-align:center;white-space:nowrap}.display_saved_tabs_lity{min-width:300px}.yikes_woo_delete_this_tab{color:#0073aa;cursor:pointer}.yikes_woo_delete_this_tab:hover{color:#00a0d2}.yikes_woo_reusable_tab_title>input{width:100%}.yikes_woo_reusable_tab_content>label h3,.yikes_woo_reusable_tab_title>label h3{margin-bottom:6px}.yikes_woo_reusable_tab_content,.yikes_woo_reusable_tab_title{margin-bottom:20px}.wp-core-ui .button-secondary.yikes_woo_delete_this_tab{background:#e35b5b;border-color:#dc3232;box-shadow:0 1px 0 #dc3232;color:#fff;cursor:pointer}.yikes_woo_add_another_tab:hover>a{color:#fff}.yikes_woo_number_of_products{font-weight:700}.yikes_woo_save_and_delete_tab_buttons{margin-top:10px}._yikes_wc_title_red_overlay{background-color:#e68989!important}.woocommerce_options_panel p.yikes_wc_override_reusable_tab_container{line-height:1.1;margin-top:0;position:absolute;right:1em}.woocommerce_options_panel label._yikes_wc_override_reusable_tab_label{margin:2px 0 0 4px;float:none}@media screen and (max-width:1500px){#yikes_woocommerce_custom_product_tabs.woocommerce_options_panel div.form-field-tinymce,#yikes_woocommerce_custom_product_tabs.woocommerce_options_panel p.form-field,#yikes_woocommerce_custom_product_tabs.woocommerce_options_panel p.form-field-tinymce{max-width:79%}.woocommerce_options_panel p.yikes_wc_override_reusable_tab_container{max-width:100px}}@media screen and (max-width:1300px){.button-holder{margin-top:8px;position:relative;right:auto;text-align:center;width:100%}.woocommerce_options_panel p.yikes_wc_move_tab,.yikes_wc_move_tab_container{display:inline-block}.move-tab-data-down,.move-tab-data-up{margin-top:-5px}.button-holder .button-secondary.remove_this_tab{margin-left:26px;margin-top:0}#yikes_woocommerce_custom_product_tabs.woocommerce_options_panel div.form-field-tinymce,#yikes_woocommerce_custom_product_tabs.woocommerce_options_panel p.form-field,#yikes_woocommerce_custom_product_tabs.woocommerce_options_panel p.form-field-tinymce{max-width:100%}.woocommerce_options_panel p.yikes_wc_override_reusable_tab_container{margin-bottom:0;max-width:100%;position:relative}#yikes_woocommerce_custom_product_tabs.woocommerce_options_panel p.yikes_woo_using_reusable_tab{margin-top:0}}
|
1 |
+
.yikes_woo_tabs_title_field{width:70%!important}#duplicate_this_row{display:none}a[href="#yikes_woocommerce_custom_product_tabs"]:before{font-family:yikes-woo-font!important;content:"\e600"!important;font-size:15px!important;display:block;float:left;margin-top:2px;margin-right:8px}#yikes_woocommerce_custom_product_tabs hr{margin:1.5em 0}#yikes_woocommerce_custom_product_tabs .options_group{padding:0 1em}#yikes_woocommerce_custom_product_tabs.woocommerce_options_panel div.form-field-tinymce,#yikes_woocommerce_custom_product_tabs.woocommerce_options_panel p.form-field,#yikes_woocommerce_custom_product_tabs.woocommerce_options_panel p.form-field-tinymce{max-width:85%;padding-left:0}#yikes_woocommerce_custom_product_tabs.woocommerce_options_panel p.form-field{padding:5px 0!important}#yikes_woocommerce_custom_product_tabs.woocommerce_options_panel .form-field label{font-size:1.1em;font-weight:700;margin:2px 8px 0 0;width:auto}.yikes-woo-custom-tab-divider{display:block;height:2px;margin:2em 0 1.5em;border-bottom:1px solid #0073aa}.yikes-custom-wysiwyg-label{margin-left:1em;line-height:3}.yikes-logo{position:absolute;top:0;right:0;margin-top:.75em;margin-right:.75em;opacity:.85}#yikes-woo-tabs-review-us{float:right}.yikes-woo-tabs-hidden-how-to-info{display:none;font-family:"Open Sans",sans-serif!important;margin-right:30px}.woocommerce_options_panel p.yikes_woo_how_to_info{margin:9px 0 0;padding:0;text-align:right}.yikes-tabs-how-to-toggle{font-size:20px;position:absolute;right:1em;top:12px}.yikes-tabs-how-to-toggle:hover{cursor:pointer}.move-tab-data-down,.move-tab-data-up{font-size:25px;transition:color .2s}.move-tab-data-down:hover,.move-tab-data-up:hover{cursor:pointer;color:#4c9cce}.button-holder{margin-top:-190px;position:absolute;right:1em;width:110px}.yikes_wc_move_tab_container{margin-top:.5em;text-align:center}.woocommerce_options_panel p.yikes_wc_move_tab{line-height:1;margin:0;padding:0}.button-holder .button-secondary.remove_this_tab{background:#e35b5b;border-color:#dc3232;box-shadow:0 1px 0 #dc3232;color:#fff;cursor:pointer;margin-top:20px}.button-holder .button-secondary.remove_this_tab .dashicons{margin-top:-2px;vertical-align:middle}@font-face{font-family:yikes-woo-font;src:url(./font/yikes-woo-font.eot?-394dt5);src:url(./font/yikes-woo-font.eot?#iefix-394dt5) format('embedded-opentype'),url(./font/yikes-woo-font.woff?-394dt5) format('woff'),url(./font/yikes-woo-font.ttf?-394dt5) format('truetype'),url(./font/yikes-woo-font.svg?-394dt5#yikes-woo-font) format('svg');font-weight:400;font-style:normal}[class*=" yikes-woo-"],[class^=yikes-woo-]{font-family:yikes-woo-font;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.yikes-woo-uniE600:before{content:"\e600"}.loading-wp-editor-gif{margin-left:50%;margin-right:50%}.loading-wp-editor-gif-settings{padding-left:50px}.dashicons.inline-button-dashicons{font-size:15px;vertical-align:bottom}.yikes_woo_save_success{color:#31843f;float:left;padding-top:1em}._yikes_wc_add_tab_center,.add_tabs_container{border-top:1px solid #a0a5aa;margin:2em 2px 0 0;text-align:right;width:100%}.add_tabs_container .button.button-primary{margin-top:10px}._yikes_wc_add_tab_center{border-top:none;text-align:center}#_yikes_wc_apply_a_saved_tab,#add_another_tab{background:#cc99c2;border-color:#b366a4;color:#fff;text-decoration:none!important}.add_tabs_container._yikes_wc_add_tab_center_new .button.button-primary{display:none}#add_another_tab{-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);margin-bottom:10px;margin-top:10px}#_yikes_wc_apply_a_saved_tab{-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);margin:10px 0 0 8px}._yikes_wc_feedback_message{display:none;padding-left:3px}#yikes_woo_tab_error_message{color:red}#yikes_woo_tab_success_message{color:#31843f;margin-top:4px}.yikes_woo_how_to_h3{padding-left:10px;margin-top:0;font-weight:700}.yikes_woo_how_to_info,.yikes_woo_how_to_note{padding-left:23px!important}.yikes_woo_how_to_note{font-style:italic}.yikes-tabs-how-to-toggle-cursor{cursor:pointer}.yikes_woo_settings_info{font-family:"Open Sans",sans-serif}.yikes_woo_using_reusable_tab{opacity:.6;pointer-events:none}.yikes_woo_custom_editor_styles{position:relative;z-index:9}.lity-container{background:#fff;border-radius:6px;padding:.6em 1em 1em}.lity-container .lity-content::after{box-shadow:none}[class*=yikes_wc_lity_col]{float:left}.yikes_wc_lity_col_title{width:93%;padding:4px 20px 4px 2px;white-space:nowrap}.yikes_wc_lity_col_select{width:7%;padding-right:8px;padding-top:4px;cursor:pointer}.yikes_wc_lity_header{border-bottom:1px solid #555d66;margin-bottom:.4em;line-height:1;font-size:1.2em;font-weight:700;padding:0 0 8px;text-align:center;width:100%}.yikes_wc_lity_header>span{width:100px;text-align:center;white-space:nowrap}.display_saved_tabs_lity{min-width:300px}.yikes_woo_delete_this_tab{color:#0073aa;cursor:pointer}.yikes_woo_delete_this_tab:hover{color:#00a0d2}.yikes_woo_reusable_tab_title>input{width:100%}.yikes_woo_reusable_tab_content>label h3,.yikes_woo_reusable_tab_title>label h3{margin-bottom:6px}.yikes_woo_reusable_tab_content,.yikes_woo_reusable_tab_title{margin-bottom:20px}.wp-core-ui .button-secondary.yikes_woo_delete_this_tab{background:#e35b5b;border-color:#dc3232;box-shadow:0 1px 0 #dc3232;color:#fff;cursor:pointer}.yikes_woo_add_another_tab:hover>a{color:#fff}.yikes_woo_number_of_products{font-weight:700}.yikes_woo_save_and_delete_tab_buttons{margin-top:10px}._yikes_wc_title_red_overlay{background-color:#e68989!important}.woocommerce_options_panel p.yikes_wc_override_reusable_tab_container{line-height:1.1;margin-top:0;position:absolute;right:1em}.woocommerce_options_panel label._yikes_wc_override_reusable_tab_label{margin:2px 0 0 4px;float:none}@media screen and (max-width:1500px){#yikes_woocommerce_custom_product_tabs.woocommerce_options_panel div.form-field-tinymce,#yikes_woocommerce_custom_product_tabs.woocommerce_options_panel p.form-field,#yikes_woocommerce_custom_product_tabs.woocommerce_options_panel p.form-field-tinymce{max-width:79%}.woocommerce_options_panel p.yikes_wc_override_reusable_tab_container{max-width:100px}}@media screen and (max-width:1300px){.button-holder{margin-top:8px;position:relative;right:auto;text-align:center;width:100%}.woocommerce_options_panel p.yikes_wc_move_tab,.yikes_wc_move_tab_container{display:inline-block}.move-tab-data-down,.move-tab-data-up{margin-top:-5px}.button-holder .button-secondary.remove_this_tab{margin-left:26px;margin-top:0}#yikes_woocommerce_custom_product_tabs.woocommerce_options_panel div.form-field-tinymce,#yikes_woocommerce_custom_product_tabs.woocommerce_options_panel p.form-field,#yikes_woocommerce_custom_product_tabs.woocommerce_options_panel p.form-field-tinymce{max-width:100%}.woocommerce_options_panel p.yikes_wc_override_reusable_tab_container{margin-bottom:0;max-width:100%;position:relative}#yikes_woocommerce_custom_product_tabs.woocommerce_options_panel p.yikes_woo_using_reusable_tab{margin-top:0}}
|
js/repeatable-custom-tabs.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
/*
|
2 |
jQuery( '#_yikes_wc_apply_a_saved_tab' ).removeClass( 'disabled' );
|
|
|
3 |
jQuery( '#_yikes_wc_apply_a_saved_tab' ).removeClass( 'disabled' );
|
|
|
1 |
jQuery( '#_yikes_wc_apply_a_saved_tab' ).removeClass( 'disabled' );
|
2 |
+
/*
|
3 |
jQuery( '#_yikes_wc_apply_a_saved_tab' ).removeClass( 'disabled' );
|
js/repeatable-custom-tabs.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function yikes_woo_apply_resuable_tab(a){var b=a.data,c="_yikes_wc_custom_repeatable_product_tabs_tab_title_",d=b.tab_title,e=b.tab_id,f=b.tab_content;yikes_woo_add_another_tab(f);var g=jQuery("#number_of_tabs").val();jQuery("#"+c+g).val(d),jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+g+"_action").val("add"),jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+g).val(e),jQuery("#qt__yikes_wc_custom_repeatable_product_tabs_tab_content_"+g+"_toolbar").length>0?yikes_woo_toggle_reusable_override_overlay("disable",g):jQuery("#"+c+g).addClass("yikes_woo_disable_this_tab"),jQuery("#_yikes_wc_override_reusable_tab_container_"+g).show()}function yikes_woo_fetch_reusable_tab(a,b){var c={action:"yikes_woo_fetch_reusable_tab",tab_id:a,security_nonce:repeatable_custom_tabs.fetch_reusable_tab_nonce};jQuery.post(repeatable_custom_tabs.ajaxurl,c,function(a){global_lity.close(),b(a)})}function yikes_woo_fetch_reusable_tabs(a,b){var c={action:"yikes_woo_fetch_reusable_tabs",fetch_tab_content:a,security_nonce:repeatable_custom_tabs.fetch_reusable_tabs_nonce};jQuery.post(repeatable_custom_tabs.ajaxurl,c,function(a){b(a)})}function yikes_woo_handle_reusable_tabs(a){if("undefined"!=typeof a.success&&a.success===!0)if("undefined"!=typeof a.data&&"undefined"!=typeof a.data.message)jQuery("#yikes_woo_ajax_save_feedback").removeClass().addClass("yikes_woo_save_success").text(a.data.message).fadeIn().delay("2000").fadeOut();else{var b=JSON.parse(a.data);lity_html=create_lity_manage_reusable_tabs_html(b),global_lity=lity(lity_html,{handler:"inline"})}else"undefined"!=typeof a.success&&a.success===!1&&console.log(response);jQuery("#_yikes_wc_apply_a_saved_tab").removeClass("disabled")}function create_lity_manage_reusable_tabs_html(a){var b=1,c="";return c+='<div class="display_saved_tabs_lity">',c+='<div class="yikes_wc_lity_header">',c+="<span> Choose a Tab </span>",c+="</div>",jQuery.each(a,function(a,d){c+='<div id="saved_tab_container_'+b+'" data-tab-id="'+d.tab_id+'">',c+='<div class="yikes_wc_lity_col_title">',c+='<span class="yikes_woo_saved_tab_title_lity" id="yikes_woo_saved_tab_title_'+b+'">',c+=d.tab_title,c+="</span>",c+="</div>",c+='<div class="yikes_wc_lity_col_select">',c+='<span class="yikes_woo_saved_tab_selector_lity dashicons dashicons-plus-alt" data-saved-tab-number="'+b+'"></span>',c+="</div>",c+="</div>",b++}),c+="</div>"}function yikes_woo_toggle_reusable_override_overlay(a,b){"disable"===a?(jQuery("#qt__yikes_wc_custom_repeatable_product_tabs_tab_content_"+b+"_toolbar").addClass("yikes_woo_using_reusable_tab"),jQuery("#_yikes_wc_custom_repeatable_product_tabs_tab_content_"+b).addClass("yikes_woo_using_reusable_tab"),jQuery("#wp-_yikes_wc_custom_repeatable_product_tabs_tab_content_"+b+"-media-buttons").addClass("yikes_woo_using_reusable_tab"),jQuery("#wp-_yikes_wc_custom_repeatable_product_tabs_tab_content_"+b+"-editor-container").children(".mce-container").children(".mce-container-body").children(".mce-toolbar-grp").addClass("yikes_woo_using_reusable_tab"),jQuery("#wp-_yikes_wc_custom_repeatable_product_tabs_tab_content_"+b+"-editor-container").children(".mce-tinymce").children(".mce-container-body").children(".mce-edit-area").addClass("yikes_woo_using_reusable_tab"),jQuery("._yikes_wc_custom_repeatable_product_tabs_tab_title_"+b+"_field").addClass("yikes_woo_using_reusable_tab")):(jQuery("#qt__yikes_wc_custom_repeatable_product_tabs_tab_content_"+b+"_toolbar").removeClass("yikes_woo_using_reusable_tab"),jQuery("#_yikes_wc_custom_repeatable_product_tabs_tab_content_"+b).removeClass("yikes_woo_using_reusable_tab"),jQuery("#wp-_yikes_wc_custom_repeatable_product_tabs_tab_content_"+b+"-media-buttons").removeClass("yikes_woo_using_reusable_tab"),jQuery("#wp-_yikes_wc_custom_repeatable_product_tabs_tab_content_"+b+"-editor-container").children(".mce-container").children(".mce-container-body").children(".mce-toolbar-grp").removeClass("yikes_woo_using_reusable_tab"),jQuery("#wp-_yikes_wc_custom_repeatable_product_tabs_tab_content_"+b+"-editor-container").children(".mce-tinymce").children(".mce-container-body").children(".mce-edit-area").removeClass("yikes_woo_using_reusable_tab"),jQuery("._yikes_wc_custom_repeatable_product_tabs_tab_title_"+b+"_field").removeClass("yikes_woo_using_reusable_tab"))}function yikes_woo_check_for_reusable_tabs_and_disable(){jQuery(".yikes_wc_override_reusable_tab_container").each(function(){if(1==jQuery(this).data("reusable-tab")){var a=jQuery(this).children("._yikes_wc_override_reusable_tab").data("tab-number");yikes_woo_toggle_reusable_override_overlay("disable",a)}})}function yikes_woo_add_another_tab(a){yikes_woo_toggle_controls("disable"),jQuery("._yikes_wc_add_tab_center_new").removeClass("_yikes_wc_add_tab_center_new"),jQuery("#add_another_tab").parent(".add_tabs_container").removeClass("_yikes_wc_add_tab_center");var b=jQuery("#duplicate_this_row"),c=parseInt(jQuery("#number_of_tabs").val())+parseInt(1),d=jQuery("#duplicate_this_row .button-holder"),e="_yikes_wc_custom_repeatable_product_tabs_tab_content_"+c,f="_yikes_wc_custom_repeatable_product_tabs_tab_title_"+c;b.children("p").each(function(){jQuery(this).clone().insertBefore("#duplicate_this_row").removeClass("hidden_duplicator_row_title_field hidden_duplicator_row_content_field").addClass("new_duplicate_row")}).promise().done(function(){jQuery(".new_duplicate_row").removeClass("_yikes_wc_override_reusable_tab_container_duplicate").children("#_yikes_wc_override_reusable_tab_duplicate").attr("id","_yikes_wc_override_reusable_tab_"+c).attr("data-tab-number",c),jQuery(".new_duplicate_row").children("._yikes_wc_override_reusable_tab_label_duplicate").attr("for","_yikes_wc_override_reusable_tab_"+c).attr("id","_yikes_wc_override_reusable_tab_label_"+c).removeClass("_yikes_wc_override_reusable_tab_label_duplicate").addClass("_yikes_wc_override_reusable_tab_label"),jQuery(".new_duplicate_row").children("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_action_duplicate").attr("name","_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+c+"_action").attr("id","_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+c+"_action"),jQuery(".new_duplicate_row").children("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_duplicate").attr("name","_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+c).attr("id","_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+c),jQuery(".new_duplicate_row").find("input").each(function(){jQuery(this).is('input[name="hidden_duplicator_row_title"]')&&jQuery(this).attr("name",f).removeClass("yikes_woo_tabs_title_field_duplicate").attr("id",f).parents("p").addClass(f+"_field").removeClass("hidden_duplicator_row_title_field").find("label").removeAttr("for").attr("for",f+"_field")}),jQuery(".new_duplicate_row").find("textarea").each(function(){jQuery(this).is('textarea[name="hidden_duplicator_row_content"]')&&jQuery(this).attr("name",e).attr("id",e).parents("p").addClass(e+"_field").removeClass("hidden_duplicator_row_content_field").find("label").removeAttr("for").attr("for",e+"_field")}),jQuery("#number_of_tabs").val(c),c>1&&jQuery(".new_duplicate_row").first().before('<div class="yikes-woo-custom-tab-divider"></div>')}),jQuery("#_yikes_wc_override_reusable_tab_container_duplicate").first().attr("id","_yikes_wc_override_reusable_tab_container_"+c),d.clone().insertAfter(jQuery("."+e+"_field")).addClass("last-button-holder"),jQuery(".last-button-holder").removeAttr("alt").attr("alt",c).hide(),jQuery("."+e+"_field").html(repeatable_custom_tabs.loading_gif),yikes_woo_get_wp_editor_ajax(e,!0,a),jQuery(".last-button-holder").removeClass("last-button-holder"),jQuery(".new_duplicate_row").removeClass("new_duplicate_row")}jQuery(document).ready(function(){setTimeout(function(){yikes_woo_check_for_reusable_tabs_and_disable()},4e3),jQuery(".yikes-tabs-how-to-toggle").on("click",function(a){yikes_woo_toggle_how_to()}),jQuery("#add_another_tab").click(function(a){yikes_woo_add_another_tab(""),a.preventDefault()}),jQuery("body").on("click",".remove_this_tab",function(a){var b=jQuery(this),c=b.parents(".button-holder").attr("alt"),d=jQuery("#number_of_tabs").val(),e="_yikes_wc_custom_repeatable_product_tabs_tab_title_",f="_yikes_wc_custom_repeatable_product_tabs_tab_content_";if(c!==d)for(var g=parseInt(c);g<d;){var h="",i="",j=g+1;h=jQuery("#"+e+j).val(),jQuery("#"+e+g).val(h),i=yikes_woo_get_content_from_wysiwyg(f+j),yikes_woo_set_content_for_wysiwyg(f+g,i);var k=jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+j+"_action").val(),l=jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+j).val();jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+g+"_action").val(k),jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+g).val(l);var m=jQuery("#_yikes_wc_override_reusable_tab_"+j).is(":checked");jQuery("#_yikes_wc_override_reusable_tab_"+g).prop("checked",m),jQuery("#_yikes_wc_override_reusable_tab_container_"+j).is(":visible")?jQuery("#_yikes_wc_override_reusable_tab_container_"+g).show():jQuery("#_yikes_wc_override_reusable_tab_container_"+g).hide(),jQuery("._yikes_wc_custom_repeatable_product_tabs_tab_title_"+j+"_field").hasClass("yikes_woo_using_reusable_tab")?yikes_woo_toggle_reusable_override_overlay("disable",g):yikes_woo_toggle_reusable_override_overlay("enable",g),g++}var e="_yikes_wc_custom_repeatable_product_tabs_tab_title_",f="_yikes_wc_custom_repeatable_product_tabs_tab_content_",n=f+d,o=jQuery("#_yikes_wc_override_reusable_tab_container_"+d),p=jQuery("."+e+d+"_field"),q=jQuery("."+f+d+"_field"),r=jQuery(".yikes-woo-custom-tab-divider").last(),s=jQuery("."+f+d+"_field").next(".button-holder"),t=parseInt(d)-parseInt(1);"undefined"!=typeof tinymce&&tinymce.execCommand("mceRemoveEditor",!1,n),o.remove(),p.remove(),q.remove(),r.remove(),s.remove(),jQuery("#number_of_tabs").val(t),0===parseInt(t)&&jQuery("#add_another_tab").parent(".add_tabs_container").addClass("_yikes_wc_add_tab_center"),a.preventDefault()}),jQuery("body").on("click",".move-tab-data-up",function(){var a=jQuery(this),b=a.parents(".button-holder").attr("alt");if(1==b)return!1;var c="_yikes_wc_custom_repeatable_product_tabs_tab_title_",d="_yikes_wc_custom_repeatable_product_tabs_tab_content_",e=jQuery("#"+c+b).val(),f=yikes_woo_get_content_from_wysiwyg(d+b),g=parseInt(b)-parseInt(1),h=jQuery("#"+c+g).val(),i=yikes_woo_get_content_from_wysiwyg(d+g);jQuery("."+c+b+"_field").hasClass("yikes_woo_using_reusable_tab")&&!jQuery("."+c+g+"_field").hasClass("yikes_woo_using_reusable_tab")?(yikes_woo_toggle_reusable_override_overlay("enable",b),yikes_woo_toggle_reusable_override_overlay("disable",g)):jQuery("."+c+g+"_field").hasClass("yikes_woo_using_reusable_tab")&&!jQuery("."+c+b+"_field").hasClass("yikes_woo_using_reusable_tab")&&(yikes_woo_toggle_reusable_override_overlay("disable",b),yikes_woo_toggle_reusable_override_overlay("enable",g));var j=jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+b+"_action").val(),k=jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+b).val(),l=jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+g+"_action").val(),m=jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+g).val();jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+b+"_action").val(l),jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+g+"_action").val(j),jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+b).val(m),jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+g).val(k),jQuery("#_yikes_wc_override_reusable_tab_"+b).is(":checked")===!0&&jQuery("#_yikes_wc_override_reusable_tab_"+g).is(":checked")===!1?(jQuery("#_yikes_wc_override_reusable_tab_"+g).prop("checked",!0),jQuery("#_yikes_wc_override_reusable_tab_"+b).prop("checked",!1)):jQuery("#_yikes_wc_override_reusable_tab_"+b).is(":checked")===!1&&jQuery("#_yikes_wc_override_reusable_tab_"+g).is(":checked")===!0&&(jQuery("#_yikes_wc_override_reusable_tab_"+g).prop("checked",!1),jQuery("#_yikes_wc_override_reusable_tab_"+b).prop("checked",!0)),jQuery("#_yikes_wc_override_reusable_tab_container_"+b).is(":visible")===!0&&jQuery("#_yikes_wc_override_reusable_tab_container_"+g).is(":visible")===!1?(jQuery("#_yikes_wc_override_reusable_tab_container_"+g).show(),jQuery("#_yikes_wc_override_reusable_tab_container_"+b).hide()):jQuery("#_yikes_wc_override_reusable_tab_container_"+b).is(":visible")===!1&&jQuery("#_yikes_wc_override_reusable_tab_container_"+g).is(":visible")===!0&&(jQuery("#_yikes_wc_override_reusable_tab_container_"+g).hide(),jQuery("#_yikes_wc_override_reusable_tab_container_"+b).show()),jQuery("#"+c+b).val(h),jQuery("#"+c+g).val(e),yikes_woo_set_content_for_wysiwyg(d+b,i),yikes_woo_set_content_for_wysiwyg(d+g,f)}),jQuery("body").on("click",".move-tab-data-down",function(){var a=jQuery(this),b=a.parents(".button-holder").attr("alt"),c=jQuery("#number_of_tabs").val();if(b==c)return!1;var d="_yikes_wc_custom_repeatable_product_tabs_tab_title_",e="_yikes_wc_custom_repeatable_product_tabs_tab_content_",f=jQuery("#"+d+b).val(),g=yikes_woo_get_content_from_wysiwyg(e+b),h=parseInt(b)+parseInt(1),i=jQuery("#"+d+h).val(),j=yikes_woo_get_content_from_wysiwyg(e+h);jQuery("."+d+b+"_field").hasClass("yikes_woo_using_reusable_tab")&&!jQuery("."+d+h+"_field").hasClass("yikes_woo_using_reusable_tab")?(yikes_woo_toggle_reusable_override_overlay("enable",b),yikes_woo_toggle_reusable_override_overlay("disable",h)):jQuery("."+d+h+"_field").hasClass("yikes_woo_using_reusable_tab")&&!jQuery("."+d+b+"_field").hasClass("yikes_woo_using_reusable_tab")&&(yikes_woo_toggle_reusable_override_overlay("disable",b),yikes_woo_toggle_reusable_override_overlay("enable",h));var k=jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+b+"_action").val(),l=jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+b).val(),m=jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+h+"_action").val(),n=jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+h).val();jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+b+"_action").val(m),jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+h+"_action").val(k),jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+b).val(n),jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+h).val(l),jQuery("#_yikes_wc_override_reusable_tab_"+b).is(":checked")===!0&&jQuery("#_yikes_wc_override_reusable_tab_"+h).is(":checked")===!1?(jQuery("#_yikes_wc_override_reusable_tab_"+h).prop("checked",!0),jQuery("#_yikes_wc_override_reusable_tab_"+b).prop("checked",!1)):jQuery("#_yikes_wc_override_reusable_tab_"+b).is(":checked")===!1&&jQuery("#_yikes_wc_override_reusable_tab_"+h).is(":checked")===!0&&(jQuery("#_yikes_wc_override_reusable_tab_"+h).prop("checked",!1),jQuery("#_yikes_wc_override_reusable_tab_"+b).prop("checked",!0)),jQuery("#_yikes_wc_override_reusable_tab_container_"+b).is(":visible")===!0&&jQuery("#_yikes_wc_override_reusable_tab_container_"+h).is(":visible")===!1?(jQuery("#_yikes_wc_override_reusable_tab_container_"+h).show(),jQuery("#_yikes_wc_override_reusable_tab_container_"+b).hide()):jQuery("#_yikes_wc_override_reusable_tab_container_"+b).is(":visible")===!1&&jQuery("#_yikes_wc_override_reusable_tab_container_"+h).is(":visible")===!0&&(jQuery("#_yikes_wc_override_reusable_tab_container_"+h).hide(),jQuery("#_yikes_wc_override_reusable_tab_container_"+b).show()),jQuery("#"+d+b).val(i),jQuery("#"+d+h).val(f),yikes_woo_set_content_for_wysiwyg(e+b,j),yikes_woo_set_content_for_wysiwyg(e+h,g)}),jQuery("body").on("click","#_yikes_wc_apply_a_saved_tab",function(){return!jQuery(this).hasClass("disabled")&&(jQuery(this).addClass("disabled"),void yikes_woo_fetch_reusable_tabs(!1,yikes_woo_handle_reusable_tabs))}),jQuery("body").on("click",".yikes_woo_saved_tab_selector_lity",function(){var a=jQuery(this).data("saved-tab-number"),b=jQuery("#saved_tab_container_"+a).data("tab-id");jQuery(".lity-content").html(repeatable_custom_tabs.loading_gif).css("width","50px").children("img").css("margin-left","37%"),yikes_woo_fetch_reusable_tab(b,yikes_woo_apply_resuable_tab)}),jQuery("body").on("click","._yikes_wc_override_reusable_tab",function(){var a=jQuery(this).data("tab-number");jQuery(this).is(":checked")===!0?(yikes_woo_display_feedback_messages("_yikes_wc_override_reusable_tab_container_"+a,"_yikes_wc_override_reusable_tab_message","If you override this tab it will no longer recognize global tab changes.",!1),jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+a+"_action").val("remove"),yikes_woo_toggle_reusable_override_overlay("enable",a)):(jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+a+"_action").val("add"),yikes_woo_toggle_reusable_override_overlay("disable",a))}),jQuery("body").on("focusout",".yikes_woo_tabs_title_field",function(){var a=jQuery(this);if(1===parseInt(jQuery("#number_of_tabs").val()))return a.removeClass("_yikes_wc_title_red_overlay"),void a.parent(".form-field").children("._yikes_wc_duplicate_title_message").remove();var b=jQuery(this).attr("id"),c=jQuery(this).val(),d=!1;jQuery(".yikes_woo_tabs_title_field").each(function(e,f){jQuery(f).attr("id")!=b&&""!=jQuery(f).val()&&jQuery(f).val()===c&&(a.addClass("_yikes_wc_title_red_overlay"),a.parent(".form-field").children("._yikes_wc_duplicate_title_message").remove(),a.parent(".form-field").prepend('<span class="_yikes_wc_duplicate_title_message"> Please choose a unique tab name - duplicate tab names can create errors </span>'),d=!0)}),d===!1&&(jQuery("._yikes_wc_title_red_overlay").removeClass("_yikes_wc_title_red_overlay"),jQuery("._yikes_wc_duplicate_title_message").remove())}),jQuery("body").on("lity:close",function(){jQuery("#_yikes_wc_apply_a_saved_tab").removeClass("disabled")}),jQuery("#yikes_woo_save_custom_tabs").click(function(){if(jQuery("#yikes_woo_save_custom_tabs").hasClass("disabled")!==!0){jQuery("#yikes_woo_save_custom_tabs").addClass("disabled"),jQuery("#yikes_woo_ajax_save_feedback").fadeOut();for(var a=jQuery("#number_of_tabs").val(),b={action:"yikes_woo_save_product_tabs",post_id:repeatable_custom_tabs.global_post_id,number_of_tabs:a,security_nonce:repeatable_custom_tabs.save_product_tabs_nonce},c=1;c<=a;c++)b["_yikes_wc_custom_repeatable_product_tabs_tab_title_"+c]=jQuery("#_yikes_wc_custom_repeatable_product_tabs_tab_title_"+c).val(),b["_yikes_wc_custom_repeatable_product_tabs_tab_content_"+c]=yikes_woo_get_content_from_wysiwyg("_yikes_wc_custom_repeatable_product_tabs_tab_content_"+c),b["_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+c]=jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+c).val(),b["_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+c+"_action"]=jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+c+"_action").val();jQuery.post(repeatable_custom_tabs.ajaxurl,b,function(a){"undefined"!=typeof a.success&&(a.success===!0?feedback_message_class="yikes_woo_save_success":a.success===!1&&(feedback_message_class="yikes_woo_save_failure")),"undefined"!=typeof a.data&&"undefined"!=typeof a.data.message&&jQuery("#yikes_woo_ajax_save_feedback").removeClass().addClass(feedback_message_class).text(a.data.message).fadeIn().delay("2000").fadeOut(),jQuery("#yikes_woo_save_custom_tabs").removeClass("disabled")})}})});
|
1 |
+
function yikes_woo_apply_resuable_tab(a){var b=a.data,c="_yikes_wc_custom_repeatable_product_tabs_tab_title_",d=b.tab_title,e=b.tab_id,f=b.tab_content;yikes_woo_add_another_tab(f);var g=jQuery("#number_of_tabs").val();jQuery("#"+c+g).val(d),jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+g+"_action").val("add"),jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+g).val(e),jQuery("#qt__yikes_wc_custom_repeatable_product_tabs_tab_content_"+g+"_toolbar").length>0?yikes_woo_toggle_reusable_override_overlay("disable",g):jQuery("#"+c+g).addClass("yikes_woo_disable_this_tab"),jQuery("#_yikes_wc_override_reusable_tab_container_"+g).show()}function yikes_woo_fetch_reusable_tab(a,b){var c={action:"yikes_woo_fetch_reusable_tab",tab_id:a,security_nonce:repeatable_custom_tabs.fetch_reusable_tab_nonce};jQuery.post(repeatable_custom_tabs.ajaxurl,c,function(a){global_lity.close(),b(a)})}function yikes_woo_fetch_reusable_tabs(a,b){var c={action:"yikes_woo_fetch_reusable_tabs",fetch_tab_content:a,security_nonce:repeatable_custom_tabs.fetch_reusable_tabs_nonce};jQuery.post(repeatable_custom_tabs.ajaxurl,c,function(a){b(a)})}function yikes_woo_handle_reusable_tabs(a){if("undefined"!=typeof a.success&&a.success===!0)if("undefined"!=typeof a.data&&"undefined"!=typeof a.data.message)jQuery("#yikes_woo_ajax_save_feedback").removeClass().addClass("yikes_woo_save_success").text(a.data.message).fadeIn().delay("2000").fadeOut();else{var b=JSON.parse(a.data);lity_html=create_lity_manage_reusable_tabs_html(b),global_lity=lity(lity_html,{handler:"inline"})}else"undefined"!=typeof a.success&&a.success===!1&&console.log(response);jQuery("#_yikes_wc_apply_a_saved_tab").removeClass("disabled")}function create_lity_manage_reusable_tabs_html(a){var b=1,c="";return c+='<div class="display_saved_tabs_lity">',c+='<div class="yikes_wc_lity_header">',c+="<span> Choose a Tab </span>",c+="</div>",jQuery.each(a,function(a,d){c+='<div id="saved_tab_container_'+b+'" data-tab-id="'+d.tab_id+'">',c+='<div class="yikes_wc_lity_col_title">',c+='<span class="yikes_woo_saved_tab_title_lity" id="yikes_woo_saved_tab_title_'+b+'">',c+=d.tab_title,c+="</span>",c+="</div>",c+='<div class="yikes_wc_lity_col_select">',c+='<span class="yikes_woo_saved_tab_selector_lity dashicons dashicons-plus-alt" data-saved-tab-number="'+b+'"></span>',c+="</div>",c+="</div>",b++}),c+="</div>"}function yikes_woo_toggle_reusable_override_overlay(a,b){"disable"===a?(jQuery("#qt__yikes_wc_custom_repeatable_product_tabs_tab_content_"+b+"_toolbar").addClass("yikes_woo_using_reusable_tab"),jQuery("#_yikes_wc_custom_repeatable_product_tabs_tab_content_"+b).addClass("yikes_woo_using_reusable_tab"),jQuery("#wp-_yikes_wc_custom_repeatable_product_tabs_tab_content_"+b+"-media-buttons").addClass("yikes_woo_using_reusable_tab"),jQuery("#wp-_yikes_wc_custom_repeatable_product_tabs_tab_content_"+b+"-editor-container").children(".mce-container").children(".mce-container-body").children(".mce-toolbar-grp").addClass("yikes_woo_using_reusable_tab"),jQuery("#wp-_yikes_wc_custom_repeatable_product_tabs_tab_content_"+b+"-editor-container").children(".mce-tinymce").children(".mce-container-body").children(".mce-edit-area").addClass("yikes_woo_using_reusable_tab"),jQuery("._yikes_wc_custom_repeatable_product_tabs_tab_title_"+b+"_field").addClass("yikes_woo_using_reusable_tab")):(jQuery("#qt__yikes_wc_custom_repeatable_product_tabs_tab_content_"+b+"_toolbar").removeClass("yikes_woo_using_reusable_tab"),jQuery("#_yikes_wc_custom_repeatable_product_tabs_tab_content_"+b).removeClass("yikes_woo_using_reusable_tab"),jQuery("#wp-_yikes_wc_custom_repeatable_product_tabs_tab_content_"+b+"-media-buttons").removeClass("yikes_woo_using_reusable_tab"),jQuery("#wp-_yikes_wc_custom_repeatable_product_tabs_tab_content_"+b+"-editor-container").children(".mce-container").children(".mce-container-body").children(".mce-toolbar-grp").removeClass("yikes_woo_using_reusable_tab"),jQuery("#wp-_yikes_wc_custom_repeatable_product_tabs_tab_content_"+b+"-editor-container").children(".mce-tinymce").children(".mce-container-body").children(".mce-edit-area").removeClass("yikes_woo_using_reusable_tab"),jQuery("._yikes_wc_custom_repeatable_product_tabs_tab_title_"+b+"_field").removeClass("yikes_woo_using_reusable_tab"))}function yikes_woo_check_for_reusable_tabs_and_disable(){jQuery(".yikes_wc_override_reusable_tab_container").each(function(){if(1==jQuery(this).data("reusable-tab")){var a=jQuery(this).children("._yikes_wc_override_reusable_tab").data("tab-number");yikes_woo_toggle_reusable_override_overlay("disable",a)}})}function yikes_woo_add_another_tab(a){yikes_woo_toggle_controls("disable"),jQuery("._yikes_wc_add_tab_center_new").removeClass("_yikes_wc_add_tab_center_new"),jQuery("#add_another_tab").parent(".add_tabs_container").removeClass("_yikes_wc_add_tab_center");var b=jQuery("#duplicate_this_row"),c=parseInt(jQuery("#number_of_tabs").val())+parseInt(1),d=jQuery("#duplicate_this_row .button-holder"),e="_yikes_wc_custom_repeatable_product_tabs_tab_content_"+c,f="_yikes_wc_custom_repeatable_product_tabs_tab_title_"+c;b.children("p").each(function(){jQuery(this).clone().insertBefore("#duplicate_this_row").removeClass("hidden_duplicator_row_title_field hidden_duplicator_row_content_field").addClass("new_duplicate_row")}).promise().done(function(){jQuery(".new_duplicate_row").removeClass("_yikes_wc_override_reusable_tab_container_duplicate").children("#_yikes_wc_override_reusable_tab_duplicate").attr("id","_yikes_wc_override_reusable_tab_"+c).attr("data-tab-number",c),jQuery(".new_duplicate_row").children("._yikes_wc_override_reusable_tab_label_duplicate").attr("for","_yikes_wc_override_reusable_tab_"+c).attr("id","_yikes_wc_override_reusable_tab_label_"+c).removeClass("_yikes_wc_override_reusable_tab_label_duplicate").addClass("_yikes_wc_override_reusable_tab_label"),jQuery(".new_duplicate_row").children("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_action_duplicate").attr("name","_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+c+"_action").attr("id","_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+c+"_action"),jQuery(".new_duplicate_row").children("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_duplicate").attr("name","_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+c).attr("id","_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+c),jQuery(".new_duplicate_row").find("input").each(function(){jQuery(this).is('input[name="hidden_duplicator_row_title"]')&&jQuery(this).attr("name",f).removeClass("yikes_woo_tabs_title_field_duplicate").attr("id",f).parents("p").addClass(f+"_field").removeClass("hidden_duplicator_row_title_field").find("label").removeAttr("for").attr("for",f+"_field")}),jQuery(".new_duplicate_row").find("textarea").each(function(){jQuery(this).is('textarea[name="hidden_duplicator_row_content"]')&&jQuery(this).attr("name",e).attr("id",e).parents("p").addClass(e+"_field").removeClass("hidden_duplicator_row_content_field").find("label").removeAttr("for").attr("for",e+"_field")}),jQuery("#number_of_tabs").val(c),c>1&&jQuery(".new_duplicate_row").first().before('<div class="yikes-woo-custom-tab-divider"></div>')}),jQuery("#_yikes_wc_override_reusable_tab_container_duplicate").first().attr("id","_yikes_wc_override_reusable_tab_container_"+c),d.clone().insertAfter(jQuery("."+e+"_field")).addClass("last-button-holder"),jQuery(".last-button-holder").removeAttr("alt").attr("alt",c).hide(),jQuery("."+e+"_field").html(repeatable_custom_tabs.loading_gif),yikes_woo_get_wp_editor_ajax(e,!0,a),jQuery(".last-button-holder").removeClass("last-button-holder"),jQuery(".new_duplicate_row").removeClass("new_duplicate_row")}function yikes_woo_set_editor_specific_styles(){jQuery('textarea[name^="_yikes_wc_custom_repeatable_product_tabs_tab_content_"]').each(function(){jQuery(this).addClass("yikes_woo_custom_editor_styles")})}jQuery(document).ready(function(){setTimeout(function(){yikes_woo_check_for_reusable_tabs_and_disable(),yikes_woo_set_editor_specific_styles()},4e3),jQuery(".yikes-tabs-how-to-toggle").on("click",function(a){yikes_woo_toggle_how_to()}),jQuery("#add_another_tab").click(function(a){yikes_woo_add_another_tab(""),a.preventDefault()}),jQuery("body").on("click",".remove_this_tab",function(a){var b=jQuery(this),c=b.parents(".button-holder").attr("alt"),d=jQuery("#number_of_tabs").val(),e="_yikes_wc_custom_repeatable_product_tabs_tab_title_",f="_yikes_wc_custom_repeatable_product_tabs_tab_content_";if(c!==d)for(var g=parseInt(c);g<d;){var h="",i="",j=g+1;h=jQuery("#"+e+j).val(),jQuery("#"+e+g).val(h),i=yikes_woo_get_content_from_wysiwyg(f+j),yikes_woo_set_content_for_wysiwyg(f+g,i);var k=jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+j+"_action").val(),l=jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+j).val();jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+g+"_action").val(k),jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+g).val(l);var m=jQuery("#_yikes_wc_override_reusable_tab_"+j).is(":checked");jQuery("#_yikes_wc_override_reusable_tab_"+g).prop("checked",m),jQuery("#_yikes_wc_override_reusable_tab_container_"+j).is(":visible")?jQuery("#_yikes_wc_override_reusable_tab_container_"+g).show():jQuery("#_yikes_wc_override_reusable_tab_container_"+g).hide(),jQuery("._yikes_wc_custom_repeatable_product_tabs_tab_title_"+j+"_field").hasClass("yikes_woo_using_reusable_tab")?yikes_woo_toggle_reusable_override_overlay("disable",g):yikes_woo_toggle_reusable_override_overlay("enable",g),g++}var e="_yikes_wc_custom_repeatable_product_tabs_tab_title_",f="_yikes_wc_custom_repeatable_product_tabs_tab_content_",n=f+d,o=jQuery("#_yikes_wc_override_reusable_tab_container_"+d),p=jQuery("."+e+d+"_field"),q=jQuery("."+f+d+"_field"),r=jQuery(".yikes-woo-custom-tab-divider").last(),s=jQuery("."+f+d+"_field").next(".button-holder"),t=parseInt(d)-parseInt(1);"undefined"!=typeof tinymce&&tinymce.execCommand("mceRemoveEditor",!1,n),o.remove(),p.remove(),q.remove(),r.remove(),s.remove(),jQuery("#number_of_tabs").val(t),0===parseInt(t)&&jQuery("#add_another_tab").parent(".add_tabs_container").addClass("_yikes_wc_add_tab_center"),a.preventDefault()}),jQuery("body").on("click",".move-tab-data-up",function(){var a=jQuery(this),b=a.parents(".button-holder").attr("alt");if(1==b)return!1;var c="_yikes_wc_custom_repeatable_product_tabs_tab_title_",d="_yikes_wc_custom_repeatable_product_tabs_tab_content_",e=jQuery("#"+c+b).val(),f=yikes_woo_get_content_from_wysiwyg(d+b),g=parseInt(b)-parseInt(1),h=jQuery("#"+c+g).val(),i=yikes_woo_get_content_from_wysiwyg(d+g);jQuery("."+c+b+"_field").hasClass("yikes_woo_using_reusable_tab")&&!jQuery("."+c+g+"_field").hasClass("yikes_woo_using_reusable_tab")?(yikes_woo_toggle_reusable_override_overlay("enable",b),yikes_woo_toggle_reusable_override_overlay("disable",g)):jQuery("."+c+g+"_field").hasClass("yikes_woo_using_reusable_tab")&&!jQuery("."+c+b+"_field").hasClass("yikes_woo_using_reusable_tab")&&(yikes_woo_toggle_reusable_override_overlay("disable",b),yikes_woo_toggle_reusable_override_overlay("enable",g));var j=jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+b+"_action").val(),k=jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+b).val(),l=jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+g+"_action").val(),m=jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+g).val();jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+b+"_action").val(l),jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+g+"_action").val(j),jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+b).val(m),jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+g).val(k),jQuery("#_yikes_wc_override_reusable_tab_"+b).is(":checked")===!0&&jQuery("#_yikes_wc_override_reusable_tab_"+g).is(":checked")===!1?(jQuery("#_yikes_wc_override_reusable_tab_"+g).prop("checked",!0),jQuery("#_yikes_wc_override_reusable_tab_"+b).prop("checked",!1)):jQuery("#_yikes_wc_override_reusable_tab_"+b).is(":checked")===!1&&jQuery("#_yikes_wc_override_reusable_tab_"+g).is(":checked")===!0&&(jQuery("#_yikes_wc_override_reusable_tab_"+g).prop("checked",!1),jQuery("#_yikes_wc_override_reusable_tab_"+b).prop("checked",!0)),jQuery("#_yikes_wc_override_reusable_tab_container_"+b).is(":visible")===!0&&jQuery("#_yikes_wc_override_reusable_tab_container_"+g).is(":visible")===!1?(jQuery("#_yikes_wc_override_reusable_tab_container_"+g).show(),jQuery("#_yikes_wc_override_reusable_tab_container_"+b).hide()):jQuery("#_yikes_wc_override_reusable_tab_container_"+b).is(":visible")===!1&&jQuery("#_yikes_wc_override_reusable_tab_container_"+g).is(":visible")===!0&&(jQuery("#_yikes_wc_override_reusable_tab_container_"+g).hide(),jQuery("#_yikes_wc_override_reusable_tab_container_"+b).show()),jQuery("#"+c+b).val(h),jQuery("#"+c+g).val(e),yikes_woo_set_content_for_wysiwyg(d+b,i),yikes_woo_set_content_for_wysiwyg(d+g,f)}),jQuery("body").on("click",".move-tab-data-down",function(){var a=jQuery(this),b=a.parents(".button-holder").attr("alt"),c=jQuery("#number_of_tabs").val();if(b==c)return!1;var d="_yikes_wc_custom_repeatable_product_tabs_tab_title_",e="_yikes_wc_custom_repeatable_product_tabs_tab_content_",f=jQuery("#"+d+b).val(),g=yikes_woo_get_content_from_wysiwyg(e+b),h=parseInt(b)+parseInt(1),i=jQuery("#"+d+h).val(),j=yikes_woo_get_content_from_wysiwyg(e+h);jQuery("."+d+b+"_field").hasClass("yikes_woo_using_reusable_tab")&&!jQuery("."+d+h+"_field").hasClass("yikes_woo_using_reusable_tab")?(yikes_woo_toggle_reusable_override_overlay("enable",b),yikes_woo_toggle_reusable_override_overlay("disable",h)):jQuery("."+d+h+"_field").hasClass("yikes_woo_using_reusable_tab")&&!jQuery("."+d+b+"_field").hasClass("yikes_woo_using_reusable_tab")&&(yikes_woo_toggle_reusable_override_overlay("disable",b),yikes_woo_toggle_reusable_override_overlay("enable",h));var k=jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+b+"_action").val(),l=jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+b).val(),m=jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+h+"_action").val(),n=jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+h).val();jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+b+"_action").val(m),jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+h+"_action").val(k),jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+b).val(n),jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+h).val(l),jQuery("#_yikes_wc_override_reusable_tab_"+b).is(":checked")===!0&&jQuery("#_yikes_wc_override_reusable_tab_"+h).is(":checked")===!1?(jQuery("#_yikes_wc_override_reusable_tab_"+h).prop("checked",!0),jQuery("#_yikes_wc_override_reusable_tab_"+b).prop("checked",!1)):jQuery("#_yikes_wc_override_reusable_tab_"+b).is(":checked")===!1&&jQuery("#_yikes_wc_override_reusable_tab_"+h).is(":checked")===!0&&(jQuery("#_yikes_wc_override_reusable_tab_"+h).prop("checked",!1),jQuery("#_yikes_wc_override_reusable_tab_"+b).prop("checked",!0)),jQuery("#_yikes_wc_override_reusable_tab_container_"+b).is(":visible")===!0&&jQuery("#_yikes_wc_override_reusable_tab_container_"+h).is(":visible")===!1?(jQuery("#_yikes_wc_override_reusable_tab_container_"+h).show(),jQuery("#_yikes_wc_override_reusable_tab_container_"+b).hide()):jQuery("#_yikes_wc_override_reusable_tab_container_"+b).is(":visible")===!1&&jQuery("#_yikes_wc_override_reusable_tab_container_"+h).is(":visible")===!0&&(jQuery("#_yikes_wc_override_reusable_tab_container_"+h).hide(),jQuery("#_yikes_wc_override_reusable_tab_container_"+b).show()),jQuery("#"+d+b).val(i),jQuery("#"+d+h).val(f),yikes_woo_set_content_for_wysiwyg(e+b,j),yikes_woo_set_content_for_wysiwyg(e+h,g)}),jQuery("body").on("click","#_yikes_wc_apply_a_saved_tab",function(){return!jQuery(this).hasClass("disabled")&&(jQuery(this).addClass("disabled"),void yikes_woo_fetch_reusable_tabs(!1,yikes_woo_handle_reusable_tabs))}),jQuery("body").on("click",".yikes_woo_saved_tab_selector_lity",function(){var a=jQuery(this).data("saved-tab-number"),b=jQuery("#saved_tab_container_"+a).data("tab-id");jQuery(".lity-content").html(repeatable_custom_tabs.loading_gif).css("width","50px").children("img").css("margin-left","37%"),yikes_woo_fetch_reusable_tab(b,yikes_woo_apply_resuable_tab)}),jQuery("body").on("click","._yikes_wc_override_reusable_tab",function(){var a=jQuery(this).data("tab-number");jQuery(this).is(":checked")===!0?(yikes_woo_display_feedback_messages("_yikes_wc_override_reusable_tab_container_"+a,"_yikes_wc_override_reusable_tab_message","If you override this tab it will no longer recognize global tab changes.",!1),jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+a+"_action").val("remove"),yikes_woo_toggle_reusable_override_overlay("enable",a)):(jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+a+"_action").val("add"),yikes_woo_toggle_reusable_override_overlay("disable",a))}),jQuery("body").on("focusout",".yikes_woo_tabs_title_field",function(){var a=jQuery(this);if(1===parseInt(jQuery("#number_of_tabs").val()))return a.removeClass("_yikes_wc_title_red_overlay"),void a.parent(".form-field").children("._yikes_wc_duplicate_title_message").remove();var b=jQuery(this).attr("id"),c=jQuery(this).val(),d=!1;jQuery(".yikes_woo_tabs_title_field").each(function(e,f){jQuery(f).attr("id")!=b&&""!=jQuery(f).val()&&jQuery(f).val()===c&&(a.addClass("_yikes_wc_title_red_overlay"),a.parent(".form-field").children("._yikes_wc_duplicate_title_message").remove(),a.parent(".form-field").prepend('<span class="_yikes_wc_duplicate_title_message"> Please choose a unique tab name - duplicate tab names can create errors </span>'),d=!0)}),d===!1&&(jQuery("._yikes_wc_title_red_overlay").removeClass("_yikes_wc_title_red_overlay"),jQuery("._yikes_wc_duplicate_title_message").remove())}),jQuery("body").on("lity:close",function(){jQuery("#_yikes_wc_apply_a_saved_tab").removeClass("disabled")}),jQuery("#yikes_woo_save_custom_tabs").click(function(){if(jQuery("#yikes_woo_save_custom_tabs").hasClass("disabled")!==!0){jQuery("#yikes_woo_save_custom_tabs").addClass("disabled"),jQuery("#yikes_woo_ajax_save_feedback").fadeOut();for(var a=jQuery("#number_of_tabs").val(),b={action:"yikes_woo_save_product_tabs",post_id:repeatable_custom_tabs.global_post_id,number_of_tabs:a,security_nonce:repeatable_custom_tabs.save_product_tabs_nonce},c=1;c<=a;c++)b["_yikes_wc_custom_repeatable_product_tabs_tab_title_"+c]=jQuery("#_yikes_wc_custom_repeatable_product_tabs_tab_title_"+c).val(),b["_yikes_wc_custom_repeatable_product_tabs_tab_content_"+c]=yikes_woo_get_content_from_wysiwyg("_yikes_wc_custom_repeatable_product_tabs_tab_content_"+c),b["_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+c]=jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+c).val(),b["_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+c+"_action"]=jQuery("#_yikes_wc_custom_repeatable_product_tabs_saved_tab_id_"+c+"_action").val();jQuery.post(repeatable_custom_tabs.ajaxurl,b,function(a){"undefined"!=typeof a.success&&(a.success===!0?feedback_message_class="yikes_woo_save_success":a.success===!1&&(feedback_message_class="yikes_woo_save_failure")),"undefined"!=typeof a.data&&"undefined"!=typeof a.data.message&&jQuery("#yikes_woo_ajax_save_feedback").removeClass().addClass(feedback_message_class).text(a.data.message).fadeIn().delay("2000").fadeOut(),jQuery("#yikes_woo_save_custom_tabs").removeClass("disabled")})}})});
|
readme.txt
CHANGED
@@ -6,7 +6,7 @@ Requires at least: 3.8
|
|
6 |
Tested up to: 4.7.3
|
7 |
Requires WooCommerce at least: 3.0.0
|
8 |
Tested WooCommerce up to: 3.0.0
|
9 |
-
Stable tag: 1.5.
|
10 |
License: GPLv2 or later
|
11 |
|
12 |
Add custom tabs with content to products in WooCommerce.
|
@@ -74,6 +74,9 @@ Yes! Since v1.4 we've added the necessary code to ensure the custom tab data is
|
|
74 |
|
75 |
== Changelog ==
|
76 |
|
|
|
|
|
|
|
77 |
= 1.5.11 - April 6th, 2017 =
|
78 |
* Checking for the existence of the `get_id()` method before using it.
|
79 |
|
6 |
Tested up to: 4.7.3
|
7 |
Requires WooCommerce at least: 3.0.0
|
8 |
Tested WooCommerce up to: 3.0.0
|
9 |
+
Stable tag: 1.5.12
|
10 |
License: GPLv2 or later
|
11 |
|
12 |
Add custom tabs with content to products in WooCommerce.
|
74 |
|
75 |
== Changelog ==
|
76 |
|
77 |
+
= 1.5.12 - April 10th, 2017 =
|
78 |
+
* Adding some CSS to allow the editor's text mode to function properly
|
79 |
+
|
80 |
= 1.5.11 - April 6th, 2017 =
|
81 |
* Checking for the existence of the `get_id()` method before using it.
|
82 |
|
yikes-inc-easy-custom-woocommerce-product-tabs.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Description: Extend WooCommerce to add and manage custom product tabs. Create as many product tabs as needed per product.
|
6 |
* Author: YIKES, Inc
|
7 |
* Author URI: http://www.yikesinc.com
|
8 |
-
* Version: 1.5.
|
9 |
* Text Domain: yikes-inc-easy-custom-woocommerce-product-tabs
|
10 |
* Domain Path: languages/
|
11 |
*
|
@@ -62,7 +62,7 @@
|
|
62 |
private $tab_data = false;
|
63 |
|
64 |
/** plugin version number */
|
65 |
-
const VERSION = '1.5.
|
66 |
|
67 |
/** plugin text domain */
|
68 |
const TEXT_DOMAIN = 'yikes-inc-easy-custom-woocommerce-product-tabs';
|
@@ -315,7 +315,7 @@
|
|
315 |
* @param object | $product | The WooCommerce product these tabs are for
|
316 |
*/
|
317 |
$tabs = apply_filters( 'yikes_woo_filter_all_product_tabs', $tabs, $product );
|
318 |
-
|
319 |
return $tabs;
|
320 |
|
321 |
}
|
5 |
* Description: Extend WooCommerce to add and manage custom product tabs. Create as many product tabs as needed per product.
|
6 |
* Author: YIKES, Inc
|
7 |
* Author URI: http://www.yikesinc.com
|
8 |
+
* Version: 1.5.12
|
9 |
* Text Domain: yikes-inc-easy-custom-woocommerce-product-tabs
|
10 |
* Domain Path: languages/
|
11 |
*
|
62 |
private $tab_data = false;
|
63 |
|
64 |
/** plugin version number */
|
65 |
+
const VERSION = '1.5.12';
|
66 |
|
67 |
/** plugin text domain */
|
68 |
const TEXT_DOMAIN = 'yikes-inc-easy-custom-woocommerce-product-tabs';
|
315 |
* @param object | $product | The WooCommerce product these tabs are for
|
316 |
*/
|
317 |
$tabs = apply_filters( 'yikes_woo_filter_all_product_tabs', $tabs, $product );
|
318 |
+
|
319 |
return $tabs;
|
320 |
|
321 |
}
|