1function woof_init_radios() { 2 if (icheck_skin != 'none') { 3 jQuery('.woof_radio_term').iCheck('destroy'); 4 5 jQuery('.woof_radio_term').iCheck({ 6 radioClass: 'iradio_' + icheck_skin.skin + '-' + icheck_skin.color, 7 //radioClass: 'iradio_square-green' 8 }); 9 10 jQuery('.woof_radio_term').unbind('ifChecked'); 11 jQuery('.woof_radio_term').on('ifChecked', function (event) { 12 jQuery(this).attr("checked", true); 13 jQuery(this).parents('.woof_list').find('.woof_radio_term_reset').removeClass('woof_radio_term_reset_visible'); 14 jQuery(this).parents('.woof_list').find('.woof_radio_term_reset').hide(); 15 jQuery(this).parents('li').eq(0).find('.woof_radio_term_reset').eq(0).addClass('woof_radio_term_reset_visible'); 16 var slug = jQuery(this).data('slug'); 17 var name = jQuery(this).attr('name'); 18 var term_id = jQuery(this).data('term-id'); 19 woof_radio_direct_search(term_id, name, slug); 20 }); 21 22 //this script should be, because another way wrong way of working if to click on the label - removed 23 /* 24 jQuery('.woof_radio_label').unbind(); 25 jQuery('label.woof_radio_label').click(function () { 26 jQuery(this).prev().find('.woof_radio_term').trigger('ifChecked'); 27 jQuery(this).parents('.woof_list_radio').find('.checked').removeClass('checked'); 28 jQuery(this).prev().addClass('checked'); 29 return false; 30 }); 31 */ 32 //*** 33 34 35 } else { 36 jQuery('.woof_radio_term').on('change', function (event) { 37 jQuery(this).attr("checked", true); 38 var slug = jQuery(this).data('slug'); 39 var name = jQuery(this).attr('name'); 40 var term_id = jQuery(this).data('term-id'); 41 woof_radio_direct_search(term_id, name, slug); 42 }); 43 } 44 45 //*** 46 47 jQuery('.woof_radio_term_reset').click(function () { 48 woof_radio_direct_search(jQuery(this).data('term-id'), jQuery(this).attr('data-name'), 0); 49 jQuery(this).parents('.woof_list').find('.checked').removeClass('checked'); 50 jQuery(this).parents('.woof_list').find('input[type=radio]').removeAttr('checked'); 51 //jQuery(this).remove(); 52 jQuery(this).removeClass('woof_radio_term_reset_visible'); 53 return false; 54 }); 55} 56 57function woof_radio_direct_search(term_id, name, slug) { 58 59 jQuery.each(woof_current_values, function (index, value) { 60 if (index == name) { 61 delete woof_current_values[name]; 62 return; 63 } 64 }); 65 66 if (slug != 0) { 67 woof_current_values[name] = slug; 68 jQuery('a.woof_radio_term_reset_' + term_id).hide(); 69 jQuery('woof_radio_term_' + term_id).filter(':checked').parents('li').find('a.woof_radio_term_reset').show(); 70 jQuery('woof_radio_term_' + term_id).parents('ul.woof_list').find('label').css({'fontWeight': 'normal'}); 71 jQuery('woof_radio_term_' + term_id).filter(':checked').parents('li').find('label.woof_radio_label_' + slug).css({'fontWeight': 'bold'}); 72 } else { 73 jQuery('a.woof_radio_term_reset_' + term_id).hide(); 74 jQuery('woof_radio_term_' + term_id).attr('checked', false); 75 jQuery('woof_radio_term_' + term_id).parent().removeClass('checked'); 76 jQuery('woof_radio_term_' + term_id).parents('ul.woof_list').find('label').css({'fontWeight': 'normal'}); 77 } 78 79 woof_ajax_page_num = 1; 80 if (woof_autosubmit) { 81 woof_submit_link(woof_get_submit_link()); 82 } 83} 84
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.