1"use strict"; 2function woof_init_onsales() { 3 4 if (icheck_skin != 'none') { 5 6 jQuery( '.woof_checkbox_sales' ).iCheck( 'destroy' ); 7 8 let icheck_selector = '.woof_checkbox_sales'; 9 let skin = jQuery( icheck_selector ).parents( '.woof_redraw_zone' ).eq( 0 ).data( 'icheck-skin' ); 10 if (skin) { 11 skin = skin.split( '_' ); 12 jQuery( icheck_selector ).iCheck( 13 { 14 checkboxClass: 'icheckbox_' + skin[0] + '-' + skin[1] 15 } 16 ); 17 } else { 18 jQuery( icheck_selector ).iCheck( 19 { 20 checkboxClass: 'icheckbox_' + icheck_skin.skin + '-' + icheck_skin.color 21 } 22 ); 23 } 24 25 jQuery( '.woof_checkbox_sales' ).on( 26 'ifChecked', 27 function (event) { 28 jQuery( this ).attr( "checked", true ); 29 woof_current_values.onsales = 'salesonly'; 30 woof_ajax_page_num = 1; 31 if (woof_autosubmit) { 32 woof_submit_link( woof_get_submit_link() ); 33 } 34 } 35 ); 36 37 jQuery( '.woof_checkbox_sales' ).on( 38 'ifUnchecked', 39 function (event) { 40 jQuery( this ).attr( "checked", false ); 41 delete woof_current_values.onsales; 42 woof_ajax_page_num = 1; 43 if (woof_autosubmit) { 44 woof_submit_link( woof_get_submit_link() ); 45 } 46 } 47 ); 48 49 } else { 50 51 jQuery( '.woof_checkbox_sales' ).on( 52 'change', 53 function (event) { 54 if (jQuery( this ).is( ':checked' )) { 55 jQuery( this ).attr( "checked", true ); 56 woof_current_values.onsales = 'salesonly'; 57 woof_ajax_page_num = 1; 58 if (woof_autosubmit) { 59 woof_submit_link( woof_get_submit_link() ); 60 } 61 } else { 62 jQuery( this ).attr( "checked", false ); 63 delete woof_current_values.onsales; 64 woof_ajax_page_num = 1; 65 if (woof_autosubmit) { 66 woof_submit_link( woof_get_submit_link() ); 67 } 68 } 69 } 70 ); 71 } 72 73 // +++ 74 75 jQuery( '.woof_checkbox_sales_as_switcher' ).on( 76 'change', 77 function (event) { 78 if (jQuery( this ).is( ':checked' )) { 79 jQuery( this ).attr( "checked", true ); 80 woof_current_values.onsales = 'salesonly'; 81 woof_ajax_page_num = 1; 82 if (woof_autosubmit) { 83 woof_submit_link( woof_get_submit_link() ); 84 } 85 } else { 86 jQuery( this ).attr( "checked", false ); 87 delete woof_current_values.onsales; 88 woof_ajax_page_num = 1; 89 if (woof_autosubmit) { 90 woof_submit_link( woof_get_submit_link() ); 91 } 92 } 93 } 94 ); 95}
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.