PageSourceSearch

https://detallesorballo.com/wp-content/plugins/woocommerce-product…/js/html_types/checkbox.js?ver=1.3.7.1

js detallesorballo.com collected 2026-09-26 14:40:06 UTC 3,893 bytes, 109 lines download raw bytes

1"use strict";
2function woof_init_checkboxes() {
3    if (icheck_skin != 'none') {
4
5        jQuery('.woof_checkbox_term').iCheck('destroy');
6
7        let icheck_selector = '.woof_checkbox_term';
8        let skin = jQuery(icheck_selector).parents('.woof_redraw_zone').eq(0).data('icheck-skin');
9        if (skin) {
10            skin = skin.split('_');
11            jQuery(icheck_selector).iCheck({
12                checkboxClass: 'icheckbox_' + skin[0] + '-' + skin[1]
13            });
14        } else {
15            jQuery(icheck_selector).iCheck({
16                checkboxClass: 'icheckbox_' + icheck_skin.skin + '-' + icheck_skin.color
17            });
18        }
19
20        jQuery('.woof_checkbox_term').off('ifChecked');
21        jQuery('.woof_checkbox_term').on('ifChecked', function (event) {
22            jQuery(this).attr("checked", true);
23	//jQuery(".woof_select_radio_check input").attr('disabled', 'disabled');
24            woof_checkbox_process_data(this, true);
25        });
26
27        jQuery('.woof_checkbox_term').off('ifUnchecked');
28        jQuery('.woof_checkbox_term').on('ifUnchecked', function (event) {
29            jQuery(this).attr("checked", false);
30            woof_checkbox_process_data(this, false);
31        });
32
33        //this script should be, because another way wrong way of working if to click on the label
34        jQuery('.woof_checkbox_label').off();
35        jQuery('label.woof_checkbox_label').on('click', function () {
36            if (jQuery(this).prev().find('.woof_checkbox_term').is(':disabled')) {
37                return false;
38            }
39            // if (jQuery(this).prev().find('.woof_checkbox_term').is(':checked')) {
40            if (typeof jQuery(this).prev().find('.woof_checkbox_term').attr('checked') != 'undefined') {
41                jQuery(this).prev().find('.woof_checkbox_term').trigger('ifUnchecked');
42                jQuery(this).prev().removeClass('checked');
43            } else {
44                jQuery(this).prev().find('.woof_checkbox_term').trigger('ifChecked');
45                jQuery(this).prev().addClass('checked');
46            }
47
48
49        });
50        //***
51
52    } else {
53
54        jQuery('.woof_checkbox_term').on('change', function (event) {
55            if (jQuery(this).is(':checked')) {
56                jQuery(this).attr("checked", true);
57                woof_checkbox_process_data(this, true);
58            } else {
59                jQuery(this).attr("checked", false);
60                woof_checkbox_process_data(this, false);
61            }
62        });
63    }
64}
65function woof_checkbox_process_data(_this, is_checked) {
66    var tax = jQuery(_this).data('tax');
67    var name = jQuery(_this).attr('name');
68    var term_id = jQuery(_this).data('term-id');
69
70    woof_checkbox_direct_search(term_id, name, tax, is_checked);
71}
72function woof_checkbox_direct_search(term_id, name, tax, is_checked) {
73
74    var values = '';
75    var checked = true;
76    if (is_checked) {
77        if (tax in woof_current_values) {
78            woof_current_values[tax] = woof_current_values[tax] + ',' + name;
79        } else {
80            woof_current_values[tax] = name;
81        }
82        checked = true;
83    } else {
84        values = woof_current_values[tax];
85
86        values = values.split(',');
87        var tmp = [];
88        jQuery.each(values, function (index, value) {
89            if (value != name) {
90                tmp.push(value);
91            }
92        });
93        values = tmp;
94        if (values.length) {
95            woof_current_values[tax] = values.join(',');
96        } else {
97            delete woof_current_values[tax];
98        }
99        checked = false;
100    }
101    jQuery('.woof_checkbox_term_' + term_id).attr('checked', checked);
102    woof_ajax_page_num = 1;
103
104    if (woof_autosubmit) {
105        woof_submit_link(woof_get_submit_link());
106    }
107
108}
109

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.