1jQuery('document').ready(function ($) { 2 3 $('#wu_user_country').on('change', function () { 4 if ($(this).val() !== 'Deutschland') { 5 $('#wu_user_state').closest('p').hide(); 6 } else { 7 $('#wu_user_state').closest('p').show(); 8 } 9 }); 10 11 $('#user-filter').fastLiveFilter('#memberlist ul ul'); 12 13 $('#memberlist a').click(function (e) { 14 e.preventDefault(); 15 var $userinfo = $(this).siblings('.userinfo'); 16 if ($userinfo.is(":visible")) { 17 $userinfo.slideUp(); 18 } else { 19 $userinfo.slideDown(); 20 } 21 22 }); 23 24 $('.contact-user').click(function () { 25 $('.memberlist-contactform form').show(); 26 $('.memberlist-contactform .response').hide(); 27 $('.memberlist-contactform-to').text($(this).data('name')); 28 $('.memberlist-contactform-id').val($(this).data('id')); 29 }); 30 31 $('.contact-user').magnificPopup({ 32 items: { 33 src: $('.memberlist-contactform') 34 }, 35 type: 'inline' 36 }); 37 38 39 $('.show-user-profile').each(function () { 40 var userId = $(this).attr('data-id'); 41 $(this).magnificPopup({ 42 items: { 43 src: $('.memberlist-profile[data-id="' + userId + '"]') 44 }, 45 type: 'inline' 46 }); 47 }); 48 49 50 $('.contact-user-form').submit(function () { 51 var form = this; 52 53 var formData = { 54 'name': $(this).find('input[name=name]').val(), 55 'email': $(this).find('input[name=email]').val(), 56 'telephone': $(this).find('input[name=telephone]').val(), 57 'id': $(this).find('input[name=id]').val(), 58 'message': $(this).find('textarea[name=message]').val() 59 }; 60 61 var data = { 62 'action': 'wuSendMail', 63 'formData': formData 64 }; 65 66 $.post(ajax_object.ajax_url, data, function (response) { 67 $(form).parent().find('.response').text(response).show(); 68 $(form).hide(); 69 $(form).find('input, textarea').val(''); 70 }); 71 72 return false; 73 }) 74 75 window.register = function () { 76 $('#wu_registration_form input[type="submit"]').removeAttr('disabled'); 77 } 78 79}); 80 81 82jQuery(function ($) { 83 if (document.getElementById('map')) { 84 85 var redIcon = new L.Icon({ 86 iconUrl: '/wp-content/themes/enfold-child/js/leaflet/color-markers/marker-icon-2x-red.png', 87 shadowUrl: '/wp-content/themes/enfold-child/js/leaflet/color-markers/marker-shadow.png', 88 iconSize: [25, 41], 89 iconAnchor: [12, 41], 90 popupAnchor: [1, -34], 91 shadowSize: [41, 41] 92 }); 93 94 95 var map = L.map('map').setView([50.5, 7.630770], 6), 96 marker, 97 control = new L.Control.Geocoder({ 98 geocoder: L.Control.Geocoder.nominatim({ 99 serviceUrl: '/', 100 geocodingQueryParams: { 101 'gn2_osm_proxy_searchterm':1, 102 'format': 'json', 103 'addressdetails': 1, 104 //'polygon_geojson': 0, 105 } 106 }), 107 //geocoder: L.Control.Geocoder.nominatim(), 108 defaultMarkGeocode: false, 109 }); 110 111 map.attributionControl.setPrefix(false); 112 L.tileLayer('/wp-content/plugins/gn2_osm_proxy/cache/{z}-{x}-{y}.png', { 113 attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors' 114 }).addTo(map); 115 116 let arrayOfMarkers = []; 117 for (let i = 0; i < window.userMarkers.length; i++) { 118 var content = $(window.userMarkers[i][0]); 119 content.find('.contact-user').click(function () { 120 $('.memberlist-contactform form').show(); 121 $('.memberlist-contactform .response').hide(); 122 $('.memberlist-contactform-to').text($(this).data('name')); 123 $('.memberlist-contactform-id').val($(this).data('id')); 124 }); 125 content.find('.contact-user').magnificPopup({ 126 items: { 127 src: $('.memberlist-contactform') 128 }, 129 type: 'inline' 130 }); 131 new L.marker([window.userMarkers[i][1], window.userMarkers[i][2]]) 132 .bindPopup(content[0], { 133 maxWidth: 900 134 }) 135 .addTo(map); 136 137 arrayOfMarkers.push([window.userMarkers[i][1], window.userMarkers[i][2]]); 138 } 139 140 control.on('markgeocode', function (e) { 141 if (marker) { 142 map.removeLayer(marker); 143 } 144 map.eachLayer(function (layer) { 145 layer.closePopup(); 146 }); 147 map.panTo(e.geocode.center); 148 marker = L.marker(e.geocode.center, {icon: redIcon}).bindPopup(e.geocode.html).addTo(map).openPopup(); 149 }).addTo(map); 150 151 map.on('click', function (e) { 152 control.options.geocoder.reverse(e.latlng, map.options.crs.scale(map.getZoom()), function (results) { 153 var r = results[0]; 154 if (r) { 155 if (marker) { 156 map.removeLayer(marker); 157 } 158 marker = L.marker(r.center, {icon: redIcon}).addTo(map); 159 } 160 }); 161 }); 162 163 /* 164 var bounds = new L.LatLngBounds(arrayOfMarkers); 165 map.fitBounds(bounds); 166 */ 167 } 168 169});
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.