PageSourceSearch

https://darintansey.com/wp-content/plugins/idxboost/build/17543472…/dgt-contact.js?ver=1754693608.1791353147

js darintansey.com collected 2026-10-07 06:06:56 UTC 8,593 bytes, 224 lines download raw bytes

1(function($) {
2    // handle inquiry contact form
3    var flex_idx_contact_form;
4    
5    $(function () {
6        // dom ready
7        var idForm=[];
8        for(i=0;i<$('.idx_id_form').length;i++){
9            idForm.push('#'+$('.idx_id_form').eq(i).val());
10        }
11        
12        flex_idx_contact_form = $(idForm.join(', '));
13
14        if (flex_idx_contact_form.length) {
15            flex_idx_contact_form.on("submit", function(event) {
16                event.preventDefault();
17
18                var _self = $(this);
19                $('.idx_contact_email').val( $('.idx_contact_email_temp').val());
20
21                if (__flex_g_settings.hasOwnProperty("has_enterprise_recaptcha")) { // enterprise recaptcha
22                    if ("1" == __flex_g_settings.has_enterprise_recaptcha) {
23                        // pending...
24                    } else { // regular recaptcha
25                        grecaptcha.ready(function() {
26                            grecaptcha
27                            .execute(__flex_g_settings.google_recaptcha_public_key, { action: 'contact_inquiry' })
28                            .then(function(token) {
29                                _self.prepend('<input type="hidden" name="recaptcha_response" value="'+token+'">');
30
31                                $.ajax({
32                                    url: __flex_g_settings.ajaxUrl,
33                                    type: "POST",
34                                    data: _self.serialize(),
35                                    dataType: "json",
36                                    success: function(response) {
37                                        if (response.success) {
38                                            _self.trigger('reset');
39                                            sweetAlert(word_translate.email_sent, word_translate.your_email_was_sent_succesfully, "success");
40                                        }
41                                    }
42                                });
43                            });
44                        });
45                    }
46                } else { // regular recaptcha
47                    grecaptcha.ready(function() {
48                        grecaptcha
49                        .execute(__flex_g_settings.google_recaptcha_public_key, { action: 'contact_inquiry' })
50                        .then(function(token) {
51                            _self.prepend('<input type="hidden" name="recaptcha_response" value="'+token+'">');
52
53                            $.ajax({
54                                url: __flex_g_settings.ajaxUrl,
55                                type: "POST",
56                                data: _self.serialize(),
57                                dataType: "json",
58                                success: function(response) {
59                                    if (response.success) {
60                                        _self.trigger('reset');
61                                        sweetAlert(word_translate.email_sent, word_translate.your_email_was_sent_succesfully, "success");
62                                    }
63                                }
64                            });
65                        });
66                    });
67                }
68            });
69        }
70    });
71
72    if($("#map").length){
73        // map
74        google.maps.event.addDomListener(window, "load", function() {
75            
76            var style_map=[];
77
78            if(style_map_idxboost != undefined && style_map_idxboost != '') {
79                style_map=JSON.parse(style_map_idxboost);
80            }
81
82
83            var flex_map_mini_view = $("#map");
84            if (flex_map_mini_view.length) {
85
86                var idx_zoom=16;
87                if(flex_map_mini_view.data('zoom') != '' && flex_map_mini_view.data('zoom') != undefined){
88                    idx_zoom=flex_map_mini_view.data('zoom');
89                }
90                console.log(idx_zoom);
91
92                var myLatLng2 = {
93                    lat: parseFloat(flex_map_mini_view.data('lat')),
94                    lng: parseFloat(flex_map_mini_view.data('lng'))
95                };
96                var miniMap = new google.maps.Map(document.getElementById('map'), {
97                    zoom: idx_zoom,
98                    styles: style_map,
99                    center: myLatLng2
100                });
101                var marker = new google.maps.Marker({
102                    position: myLatLng2,
103                    map: miniMap,
104                    icon: flex_idx_contact.idxboost_uri+'images/marker.png'
105                });
106                $("#map").removeAttr("data-lat").removeAttr("data-lng");
107
108				google.maps.event.addListenerOnce(miniMap, 'tilesloaded', setupMapControls);
109
110				function handleSatelliteButton(event){
111					event.stopPropagation();
112					event.preventDefault();
113					miniMap.setMapTypeId(google.maps.MapTypeId.HYBRID)
114				
115					if($(this).hasClass("is-active")){
116						$(this).removeClass("is-active");
117						miniMap.setMapTypeId(google.maps.MapTypeId.ROADMAP)
118					}else{
119						$(this).addClass("is-active");
120						miniMap.setMapTypeId(google.maps.MapTypeId.HYBRID)
121					}
122				}
123				
124				function handleZoomInButton(event) {
125					event.stopPropagation();
126					event.preventDefault();
127					miniMap.setZoom(miniMap.getZoom() + 1);
128				}
129				
130				function handleZoomOutButton(event) {
131					event.stopPropagation();
132					event.preventDefault();
133					miniMap.setZoom(miniMap.getZoom() - 1);
134				}
135				
136				function handlefullscreenButton() {
137				
138					var elementToSendFullscreen = miniMap.getDiv().firstChild;
139				
140					if (isFullscreen(elementToSendFullscreen)) {
141						exitFullscreen();
142					} else {
143						requestFullscreen(elementToSendFullscreen);
144					}
145				
146					document.onwebkitfullscreenchange = document.onmsfullscreenchange = document.onmozfullscreenchange = document.onfullscreenchange = function () {
147						if (isFullscreen(elementToSendFullscreen)) {
148							fullscreenControl.classList.add("is-fullscreen");
149						} else {
150							fullscreenControl.classList.remove("is-fullscreen");
151						}
152					};
153				}
154				
155				function isFullscreen(element) {
156					return (
157						(document.fullscreenElement ||
158							document.webkitFullscreenElement ||
159							document.mozFullScreenElement ||
160							document.msFullscreenElement) == element
161					);
162				}
163				
164				function requestFullscreen(element) {
165					if (element.requestFullscreen) {
166						element.requestFullscreen();
167					} else if (element.webkitRequestFullScreen) {
168						element.webkitRequestFullScreen();
169					} else if (element.mozRequestFullScreen) {
170						element.mozRequestFullScreen();
171					} else if (element.msRequestFullScreen) {
172						element.msRequestFullScreen();
173					}
174				}
175				
176				function exitFullscreen() {
177					if (document.exitFullscreen) {
178						document.exitFullscreen();
179					} else if (document.webkitExitFullscreen) {
180						document.webkitExitFullscreen();
181					} else if (document.mozCancelFullScreen) {
182						document.mozCancelFullScreen();
183					} else if (document.msExitFullscreen) {
184						document.msExitFullscreen();
185					}
186				}
187				
188				function setupMapControls() {
189					// setup buttons wrapper
190					mapButtonsWrapper = document.createElement("div");
191					mapButtonsWrapper.classList.add('flex-map-controls-ct');
192				
193					// setup Full Screen button
194					fullscreenControl = document.createElement("div");
195					fullscreenControl.classList.add('flex-map-fullscreen');
196					mapButtonsWrapper.appendChild(fullscreenControl);
197				
198					// setup zoom in button
199					mapZoomInButton = document.createElement("div");
200					mapZoomInButton.classList.add('flex-map-zoomIn');
201					mapButtonsWrapper.appendChild(mapZoomInButton);
202				
203					// setup zoom out button
204					mapZoomOutButton = document.createElement("div");
205					mapZoomOutButton.classList.add('flex-map-zoomOut');
206					mapButtonsWrapper.appendChild(mapZoomOutButton);
207				
208					// setup Satellite button
209					satelliteMapButton = document.createElement("div");
210					satelliteMapButton.classList.add('flex-satellite-button');
211					mapButtonsWrapper.appendChild(satelliteMapButton);
212				
213					// add Buttons
214					google.maps.event.addDomListener(mapZoomInButton, "click", handleZoomInButton);
215					google.maps.event.addDomListener(mapZoomOutButton, "click", handleZoomOutButton);
216					google.maps.event.addDomListener(fullscreenControl, "click", handlefullscreenButton);
217					google.maps.event.addDomListener(satelliteMapButton, "click", handleSatelliteButton);
218				
219					miniMap.controls[google.maps.ControlPosition.TOP_RIGHT].push(mapButtonsWrapper);
220				}
221            }
222        });
223    }
224})(jQuery);

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.