1jQuery(document).delegate(".wpcf7-province","change",function(){ 2 var name = jQuery(this).attr('name'); 3 var tgt = jQuery('.wpcf7-comune'); 4 if(!tgt.length) return; 5 var val = jQuery(this).val(); 6 7 8 jQuery.ajax({ 9 url: ajaxData.ajaxurl, 10 type: "POST", 11 dataType: "json", 12 data: { prov: val, action: 'find_comuni' }, 13 success: function(result){ 14 tgt.html('<option value>---</option>'); 15 jQuery.each(result, function(i,e){ 16 tgt.append('<option value="'+i+'">'+e+'</option>'); 17 }) 18 tgt.selectric('refresh') 19 } 20 }) 21}); 22 23jQuery(document).delegate(".wpcf7-provincia_istituto","change",function(){ 24 var name = jQuery(this).attr('name'); 25 var tgt = jQuery('.wpcf7-comune_istituto'); 26 if(!tgt.length) return; 27 var val = jQuery(this).val(); 28 29 30 jQuery.ajax({ 31 url: ajaxData.ajaxurl, 32 type: "POST", 33 dataType: "json", 34 data: { prov: val, action: 'find_comuni' }, 35 success: function(result){ 36 tgt.html('<option value>---</option>'); 37 jQuery.each(result, function(i,e){ 38 tgt.append('<option value="'+i+'">'+e+'</option>'); 39 }) 40 tgt.selectric('refresh') 41 } 42 }) 43}); 44 45jQuery(function(){ 46 var url = window.location.pathname.replace(/\//gi, ""); 47 jQuery.each( jQuery('.wpcf7-form'), function(i,e){ 48 var f = jQuery(this); 49 f.append('<input type="hidden" name="tipo_form" value="'+url+'" />'); 50 f.append('<input type="hidden" name="open_day_selected_value" value="" />'); 51 }); 52}); 53 54function factoriaSyncOpenDayHidden(form) { 55 var f = form ? jQuery(form) : jQuery('.wpcf7-form'); 56 f.each(function(){ 57 var hidden = jQuery(this).find('input[name="open_day_selected_value"]'); 58 if (!hidden.length) return; 59 var orarioVisible = jQuery(this).find('select[name^="orario"]:visible'); 60 var val = ''; 61 orarioVisible.each(function(){ var v = jQuery(this).val(); if (v) val = v; }); 62 hidden.val(val); 63 }); 64} 65 66jQuery(document).delegate('select[name="corso"]', 'change', function(){ 67 var form = jQuery(this).closest('form'); 68 setTimeout(function(){ factoriaSyncOpenDayHidden(form); }, 300); 69}); 70 71jQuery(document).delegate('select[name^="orario"]', 'change', function(){ 72 var form = jQuery(this).closest('form'); 73 var hidden = form.find('input[name="open_day_selected_value"]'); 74 if (hidden.length) hidden.val(jQuery(this).val() || ''); 75}); 76 77jQuery(document).delegate('.wpcf7-form', 'submit', function(){ 78 factoriaSyncOpenDayHidden(this); 79}); 80 81jQuery(document).delegate(".wpcf7-sede","change",function(){ 82 var name = jQuery(this).attr('name'); 83 var tgt = jQuery('[data-sede="'+name+'"]'); 84 if(!tgt.length) return; 85 var val = jQuery(this).val().substring(0,2) 86 var name_corso = tgt.attr('name') 87 var list = corsi[name_corso][val.toLowerCase()]; 88 tgt.html('<option value>---</option>'); 89 console.warn(list, corsi) 90 91 if(typeof list == 'undefined' || !Object.keys(list).length){ 92 tgt.selectric('refresh'); 93 return; 94 } 95 96 jQuery.each(list, function(i,e){ 97 tgt.append('<option value="'+i+'">'+e+'</option>'); 98 }) 99 tgt.selectric('refresh') 100})
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.