1"use strict"; 2 3function woof_init_featured() { 4 5 if (icheck_skin != 'none') { 6 7 jQuery('.woof_checkbox_featured').iCheck('destroy'); 8 9 let icheck_selector = '.woof_checkbox_featured'; 10 let skin = jQuery(icheck_selector).parents('.woof_redraw_zone').eq(0).data('icheck-skin'); 11 if (skin) { 12 skin = skin.split('_'); 13 jQuery(icheck_selector).iCheck({ 14 checkboxClass: 'icheckbox_' + skin[0] + '-' + skin[1] 15 }); 16 } else { 17 jQuery(icheck_selector).iCheck({ 18 checkboxClass: 'icheckbox_' + icheck_skin.skin + '-' + icheck_skin.color 19 }); 20 } 21 22 jQuery('.woof_checkbox_featured').on('ifChecked', function (event) { 23 jQuery(this).attr("checked", true); 24 woof_current_values.product_visibility = 'featured'; 25 woof_ajax_page_num = 1; 26 if (woof_autosubmit) { 27 woof_submit_link(woof_get_submit_link()); 28 } 29 }); 30 31 jQuery('.woof_checkbox_featured').on('ifUnchecked', function (event) { 32 jQuery(this).attr("checked", false); 33 delete woof_current_values.product_visibility; 34 woof_ajax_page_num = 1; 35 if (woof_autosubmit) { 36 woof_submit_link(woof_get_submit_link()); 37 } 38 }); 39 40 } else { 41 jQuery('.woof_checkbox_featured').on('change', function (event) { 42 if (jQuery(this).is(':checked')) { 43 jQuery(this).attr("checked", true); 44 woof_current_values.product_visibility = 'featured'; 45 woof_ajax_page_num = 1; 46 if (woof_autosubmit) { 47 woof_submit_link(woof_get_submit_link()); 48 } 49 } else { 50 jQuery(this).attr("checked", false); 51 delete woof_current_values.product_visibility; 52 woof_ajax_page_num = 1; 53 if (woof_autosubmit) { 54 woof_submit_link(woof_get_submit_link()); 55 } 56 } 57 }); 58 } 59 60 //+++ 61 62 jQuery('.woof_checkbox_featured_as_switcher').on('change', function (event) { 63 if (jQuery(this).is(':checked')) { 64 jQuery(this).attr("checked", true); 65 woof_current_values.product_visibility = 'featured'; 66 woof_ajax_page_num = 1; 67 if (woof_autosubmit) { 68 woof_submit_link(woof_get_submit_link()); 69 } 70 } else { 71 jQuery(this).attr("checked", false); 72 delete woof_current_values.product_visibility; 73 woof_ajax_page_num = 1; 74 if (woof_autosubmit) { 75 woof_submit_link(woof_get_submit_link()); 76 } 77 } 78 }); 79}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.