1function woof_init_mselects() { 2 try { 3 // jQuery("select.woof_select").chosen('destroy').trigger("liszt:updated"); 4 jQuery("select.woof_mselect").chosen(/*{disable_search_threshold: 10}*/); 5 } catch (e) { 6 7 } 8 9 jQuery('.woof_mselect').change(function (a) { 10 var slug = jQuery(this).val(); 11 var name = jQuery(this).attr('name'); 12 13 //fix for multiselect if in chosen mode remove options 14 if (is_woof_use_chosen) { 15 var vals = jQuery(this).chosen().val(); 16 jQuery('.woof_mselect[name=' + name + '] option:selected').removeAttr("selected"); 17 jQuery('.woof_mselect[name=' + name + '] option').each(function (i, option) { 18 var v = jQuery(this).val(); 19 if (jQuery.inArray(v, vals) !== -1) { 20 jQuery(this).prop("selected", true); 21 } 22 }); 23 } 24 25 woof_mselect_direct_search(name, slug); 26 return true; 27 }); 28} 29 30function woof_mselect_direct_search(name, slug) { 31 //mode with Filter button 32 var values = []; 33 jQuery('.woof_mselect[name=' + name + '] option:selected').each(function (i, v) { 34 values.push(jQuery(this).val()); 35 }); 36 37 //duplicates removing 38 //http://stackoverflow.com/questions/9229645/remove-duplicates-from-javascript-array 39 values = values.filter(function (item, pos) { 40 return values.indexOf(item) == pos; 41 }); 42 43 values = values.join(','); 44 if (values.length) { 45 woof_current_values[name] = values; 46 } else { 47 delete woof_current_values[name]; 48 } 49 50 woof_ajax_page_num = 1; 51 if (woof_autosubmit) { 52 woof_submit_link(woof_get_submit_link()); 53 } 54} 55 56
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.