PATH:
home
/
letacommog
/
newrdv1
/
wp-content
/
themes
/
wilcity
/
admin
/
source
/
js
!function(){"use strict";!function(e){function t(e,t,o){return void 0===o||0==+o?Math[e](t):(t=+t,o=+o,isNaN(t)||"number"!=typeof o||o%1!=0?NaN:(t=t.toString().split("e"),t=Math[e](+(t[0]+"e"+(t[1]?+t[1]-o:-o))),+((t=t.toString().split("e"))[0]+"e"+(t[1]?+t[1]+o:o))))}Math.round10||(Math.round10=function(e,o){return t("round",e,o)}),e.fn.WilokeMapExtendAdmin=function(t){var o=this,n=e.extend({initMap:function(){},beforeResize:function(){},afterResize:function(){},dragMarker:function(){},dragEndMarker:function(){}},t);o.WilokeMapAdmin={options:n,focusDetectMyLocation:!1,oPlaces:null,oLatLng:{lat:21.004977,lng:105.840884},el:o,init:function(){this.stopParseGeocode=!1,this.oTranslation="undefined"!=typeof WILOKE_GLOBAL?WILOKE_LISTGO_TRANSLATION:{noresults:"No results found",geocodefailed:"Geocoder failed due to:"},this.getCurrentPosition(),this.createHTML(),this.createMap(),this.listenEvent(),this.usingMyLocation()},createHTML:function(){this.wrapperMap=e('<div class="pi-map-wrapper"></div>'),this.iconMarker=e('<div class="icon-marker"></div>'),this.inputLocation=e("#wiloke-location"),this.inputLatLong=e("#wiloke-latlong"),this.inputWebsite=e("#listing_website"),this.inputPlaceInfo=e("#wiloke-place-information"),this.inputPhone=e("#listing_phone"),this.$usingMyLocation=e("#wiloke-fill-my-location"),this.$listingPreview=e(".add-listing-group-preview"),this.$mapPreview=e(".add-listing-group-preview-map"),this.el.append(this.wrapperMap),this.el.append(this.searchButton),this.el.append(this.iconMarker)},mapStyle:function(){return new google.maps.StyledMapType([{elementType:"geometry",stylers:[{color:"#ebe3cd"}]},{elementType:"labels.text.fill",stylers:[{color:"#523735"}]},{elementType:"labels.text.stroke",stylers:[{color:"#f5f1e6"}]},{featureType:"administrative",elementType:"geometry.stroke",stylers:[{color:"#c9b2a6"}]},{featureType:"administrative.land_parcel",elementType:"geometry.stroke",stylers:[{color:"#dcd2be"}]},{featureType:"administrative.land_parcel",elementType:"labels.text.fill",stylers:[{color:"#ae9e90"}]},{featureType:"landscape.natural",elementType:"geometry",stylers:[{color:"#dfd2ae"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#dfd2ae"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#93817c"}]},{featureType:"poi.park",elementType:"geometry.fill",stylers:[{color:"#a5b076"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#447530"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#f5f1e6"}]},{featureType:"road.arterial",elementType:"geometry",stylers:[{color:"#fdfcf8"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#f8c967"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#e9bc62"}]},{featureType:"road.highway.controlled_access",elementType:"geometry",stylers:[{color:"#e98d58"}]},{featureType:"road.highway.controlled_access",elementType:"geometry.stroke",stylers:[{color:"#db8555"}]},{featureType:"road.local",elementType:"labels.text.fill",stylers:[{color:"#806b63"}]},{featureType:"transit.line",elementType:"geometry",stylers:[{color:"#dfd2ae"}]},{featureType:"transit.line",elementType:"labels.text.fill",stylers:[{color:"#8f7d77"}]},{featureType:"transit.line",elementType:"labels.text.stroke",stylers:[{color:"#ebe3cd"}]},{featureType:"transit.station",elementType:"geometry",stylers:[{color:"#dfd2ae"}]},{featureType:"water",elementType:"geometry.fill",stylers:[{color:"#b9d3c2"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#92998d"}]}],{name:"Styled Map"})},usingMyLocation:function(){var t=this,o=this;this.$usingMyLocation.on("click",function(e){t.$usingMyLocation.addClass("active"),navigator.geolocation&&navigator.geolocation.getCurrentPosition(function(e){o.geocoder.geocode({location:{lat:e.coords.latitude,lng:e.coords.longitude}},function(t,n){"OK"===n?t[0]?(o.inputLocation.attr("value",t[0].formatted_address),o.inputLatLong.attr("value",e.coords.latitude+","+e.coords.longitude),o.inputPlaceInfo.val(o.b64EncodeUnicode(JSON.stringify(t[0]))),o.$listingPreview.css({opacity:0,visibility:"hidden"}),o.$mapPreview.css({opacity:1,visibility:"visible"})):alert(o.oTranslation.noresults):alert(o.oTranslation.geocodefailed+" "+n)}),o.$usingMyLocation.removeClass("active")})}),e("body").on("gotGeocodeLocation",function(e,o){t.focusDetectMyLocation=!1})},detectingPosition:function(t){var o=this;this.oLatLng={lat:t.coords.latitude,lng:t.coords.longitude};var n=!1!==window.location.href.search("https")?"https":"http";e.getJSON(n+"://freegeoip.net/json/",{lat:t.coords.latitude,lng:t.coords.longitude,type:"JSON"},function(t){var n=new Date;localStorage.setItem("listgo_mylocation",JSON.stringify(o.oLatLng)),localStorage.setItem("listgo_mygeocode",JSON.stringify(t)),localStorage.setItem("listgo_mylocation_created_at",n.getMinutes()),e("body").trigger("gotGeocodeLocation",[{geocode:t}])})},getCurrentPosition:function(){var t=this;if(e("#adminmenumain").length)return!1;var o=new Date,n=localStorage.getItem("listgo_mylocation"),i=localStorage.getItem("listgo_mylocation_created_at");!this.focusDetectMyLocation&&!_.isNull(i)&&!_.isUndefined(i)&&o.getMinutes()-i<=30?this.oLatLng=e.parseJSON(n):navigator.geolocation&&navigator.geolocation.getCurrentPosition(function(e){t.detectingPosition(e)})},createMap:function(){var e=void 0,t="",o="",i=void 0,a=void 0;this.geocoder=new google.maps.Geocoder,this.location=new google.maps.LatLng(this.oLatLng),this.mapOptions={center:this.location,zoom:7,mapTypeControlOptions:{mapTypeIds:["roadmap","satellite","hybrid","terrain","styled_map"]}},this.map=new google.maps.Map(this.wrapperMap[0],this.mapOptions),this.map.mapTypes.set("styled_map",this.mapStyle()),this.map.setMapTypeId("styled_map"),this.marker=new google.maps.Marker({map:this.map,draggable:!0}),this.infoWindow=new google.maps.InfoWindow,_.isUndefined(this.inputLatLong.val())||_.isEmpty(this.inputLatLong.val())||(t=(a=this.inputLatLong.val().split(","))[0],o=a[1]),""===t||""===o?(i=new google.maps.LatLng(this.oLatLng),e=new google.maps.LatLngBounds(i,i)):(i=new google.maps.LatLng(t,o),e=new google.maps.LatLngBounds(i,i),this.marker.setPosition(i),this.infoWindow.setContent(t+","+o),this.infoWindow.open(this.map,this.marker)),this.map.fitBounds(e),this.search=new google.maps.places.SearchBox(document.getElementById("wiloke-location")),n.initMap(this.el,n)},setPhone:function(e){this.inputPhone.length&&""===this.inputPhone.val()&&this.inputPhone.val(e.international_phone_number)},setWebsite:function(e){this.inputWebsite.length&&""===this.inputWebsite.val()&&this.inputWebsite.val(e.website)},b64EncodeUnicode:function(e){return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,function(e,t){return String.fromCharCode("0x"+t)}))},setPlaceInfo:function(e){this.inputPlaceInfo.length&&this.inputPlaceInfo.val(this.b64EncodeUnicode(JSON.stringify(e)))},geocodePosition:function(e){var t=this;t.stopParseGeocode?t.stopParseGeocode=!1:t.geocoder.geocode({latLng:e},function(e){e&&e.length>0?t.marker.formatted_address=e[0].formatted_address:t.marker.formatted_address="Cannot determine address at this location.",t.inputLocation.val(t.marker.formatted_address)})},listenEvent:function(){var e=this;e.inputLocation.on("updateLatLng",function(t,o){if(e.location&&o&&!0===o.changeLocation){var n=Math.round10(e.location.lat(),-4),i=Math.round10(e.location.lng(),-4);e.inputLatLong.attr("value",n+","+i),e.resize(),_.isEmpty(e.oPlaces)||(e.setPhone(e.oPlaces),e.setWebsite(e.oPlaces),e.setPlaceInfo(e.oPlaces))}}),google.maps.event.addListener(e.search,"places_changed",function(){var t=e.search.getPlaces();if(0===t.length)return e.location=t[0].geometry.location,void(e.oPlaces=t[0]);for(var o,n=new google.maps.LatLngBounds,i=0;o=t[i];i++)n.extend(o.geometry.location),e.location=o.geometry.location,e.oPlaces=o;e.map.fitBounds(n),e.marker.setPosition(e.location),e.stopParseGeocode=!0,google.maps.event.trigger(e.marker,"dragend")}),google.maps.event.addListener(e.map,"bounds_changed",function(){var t=e.map.getBounds();e.search.setBounds(t)}),google.maps.event.addListener(e.marker,"dragend",function(){n.dragMarker()}),google.maps.event.addListener(e.marker,"dragend",function(){e.location=e.marker.getPosition(),e.geocodePosition(e.location);var t=Math.round10(parseFloat(e.location.lat()),-4),o=Math.round10(parseFloat(e.location.lng()),-4);e.infoWindow.setContent(t+", "+o),e.infoWindow.open(e.map,e.marker),n.dragEndMarker(),e.inputLocation.trigger("updateLatLng",{changeLocation:!0})}),google.maps.event.addDomListener(window,"resize",function(){e.resize()})},resize:function(){n.beforeResize(this.el,n),google.maps.event.trigger(this.map,"resize"),this.map.setCenter(this.location),n.afterResize(this.el,n)}},o.WilokeMapAdmin.init()},e(window).load(function(){var t=e("#wiloke-map");t.length&&(t.WilokeMapExtendAdmin({initMap:function(){},beforeResize:function(){},afterResize:function(){},dragMarker:function(){},dragEndMarker:function(){}}),e(window).trigger("resize"))})}(jQuery)}();
[+]
..
[-] wiloke_post_format.js
[edit]
[-] mapextend.js
[edit]
[-] scripts.js
[edit]
[-] findtableid.js
[edit]
[-] contactform7.js
[edit]
[-] taxonomy.js
[edit]
[-] noticeafterupdating.js
[edit]
[-] shortcode.js
[edit]