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
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
$(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
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(); |
NewerOlder