1/*! 2 Version: 1.0 3 Author: GT3 Themes 4 Website: https//gt3themes.com 5 File: extended-location.js 6 Plugin: gt3-extended-location 7 */ 8"use strict"; 9jQuery(function ($) { 10 11 if ('1' === gt3_ext_loc.enable_map) { 12 13 var geo_lat = (typeof gt3_ext_loc.list_geo_lat !== 'undefined' && '' !== gt3_ext_loc.list_geo_lat) ? gt3_ext_loc.list_geo_lat : gt3_ext_loc.start_geo_lat; 14 var geo_long = (typeof gt3_ext_loc.list_geo_long !== 'undefined' && '' !== gt3_ext_loc.list_geo_lat) ? gt3_ext_loc.list_geo_long : gt3_ext_loc.start_geo_long; 15 16 var look = [jQuery('#job_location'), jQuery('#candidate_location'), jQuery('#event_location')]; 17 18 jQuery.each(look, function (key, $input) { 19 if ($input.length) { 20 $input.geo_tag_text({latOutput: 'geolocation_lat', lngOutput: 'geolocation_long'}); 21 $input.mapify({startGeoLat: geo_lat, startGeoLng: geo_long}); 22 } 23 }); 24 25 } 26 27 var field_id_array = [jQuery('#search_location')]; 28 29 jQuery.each(field_id_array, function (key, $input) { 30 if ($input.length) { 31 $input.geo_tag_text({latOutput: 'geolocation_lat', lngOutput: 'geolocation_long'}); 32 var autoComplete = this; 33 var autoCompleteField = new google.maps.places.Autocomplete( jQuery( autoComplete )[0] ); 34 // jQuery( autoComplete ).on( 'change', jQuery( autoComplete ), function() {}); 35 } 36 }); 37 38 39 // Don't set the user location when it already has a value 40 if ($('#search_location').val() != '') { 41 return; 42 } 43 44 var user_location = gt3_ext_loc.user_location; 45 46 if (user_location) { 47 48 var input_location = user_location.city ? user_location.city : ''; 49 50 if ('' === input_location) { 51 input_location = user_location.regionName ? user_location.regionName : ''; 52 } 53 54 if ('' === input_location) { 55 input_location = user_location.countryCode ? user_location.countryCode : ''; 56 } 57 58 $('.search_jobs').each(function (i, el) { 59 var $location = $(this).find('#search_location'); 60 $location.val(input_location); 61 }); 62 63 } 64 65});
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.