This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
form_submit.click( function( e ) { | |
let $inputs = $(document).find('#inspiry-additional-details-container input'), | |
$titleInputs = $(document).find('.inspiry-detail-title input'), | |
$valueInputs = $(document).find('.inspiry-detail-value input'), | |
$emptyTitleInputs = $titleInputs.filter(function(){ return !$(this).val(); }).length, | |
$emptyValueInputs = $valueInputs.filter(function(){ return !$(this).val(); }).length; | |
if ( $emptyTitleInputs !== $emptyValueInputs) { | |
e.preventDefault(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(window).on('load', function () { | |
let agentSelect = $("#agent-selectbox"); | |
if (agentSelect.find("option").length > 3) { | |
for (let i = 0; i < 3; i++) { | |
agentSelect.find("option:first-child").remove(); | |
} | |
agentSelect.select2("destroy"); | |
agentSelect.select2(); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function remove_agents_from_dropdown( $hook ) { | |
if ( 'property' !== get_current_screen()->post_type ) { | |
return; | |
} | |
?> | |
<script> | |
window.addEventListener('load', function () { | |
let agentSelect = $("#REAL_HOMES_agents"); | |
if (agentSelect.find("option").length > 3) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Javascript to handle google map for property submit page | |
*/ | |
jQuery( function( $ ) { | |
'use strict'; | |
var mapField = {}; | |
(function(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if((/[a-z]/i.test(address))){ | |
this.geocoder.geocode({'address': address}, function (results, status) | |
{ | |
if ( status == window.google.maps.GeocoderStatus.OK ) | |
{ | |
that.updatePositionInput(results[0].geometry.location); | |
that.marker.setPosition(results[0].geometry.location); | |
that.map.setCenter(that.marker.position); | |
that.map.setZoom(15); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Leaflet.markercluster, Provides Beautiful Animated Marker Clustering functionality for Leaflet, a JS library for interactive maps. | |
https://github.com/Leaflet/Leaflet.markercluster | |
(c) 2012-2013, Dave Leaver, smartrak | |
*/ | |
(function (window, document, undefined) {/* | |
* L.MarkerClusterGroup extends L.FeatureGroup by clustering the markers contained within | |
*/ | |
L.MarkerClusterGroup = L.FeatureGroup.extend({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.leaflet-cluster-anim .leaflet-marker-icon, .leaflet-cluster-anim .leaflet-marker-shadow { | |
-webkit-transition: -webkit-transform 0.3s ease-out, opacity 0.3s ease-in; | |
-moz-transition: -moz-transform 0.3s ease-out, opacity 0.3s ease-in; | |
-o-transition: -o-transform 0.3s ease-out, opacity 0.3s ease-in; | |
transition: transform 0.3s ease-out, opacity 0.3s ease-in; | |
} | |
.leaflet-cluster-spider-leg { | |
/* stroke-dashoffset (duration and function) should match with leaflet-marker-icon transform in order to track it exactly */ | |
-webkit-transition: -webkit-stroke-dashoffset 0.3s ease-out, -webkit-stroke-opacity 0.3s ease-in; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Javascript to handle open street map for multiple properties | |
*/ | |
jQuery( function( $ ) { | |
'use strict'; | |
if ( typeof propertiesMapData !== "undefined" ) { | |
if ( 0 < propertiesMapData.length ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
.rh_form__item #attachment-thumbs-container { | |
display: -webkit-box; | |
display: -webkit-flex; | |
display: -ms-flexbox; | |
display: flex; | |
-webkit-flex-wrap: wrap; | |
-ms-flex-wrap: wrap; | |
flex-wrap: wrap; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create the autocomplete object, restricting the search predictions to | |
// geographical location types. | |
var autocomplete = new google.maps.places.Autocomplete( | |
document.getElementById(addressField), {types: ['geocode']}); | |
// Avoid paying for data that you don't need by restricting the set of | |
// place fields that are returned to just the address components. | |
autocomplete.setFields(['geometry']); | |
// When the user selects an address from the drop-down, populate the |
OlderNewer