PageSourceSearch

https://azcapitoltimes.com/wp-content/plugins/BTM-PublicNotice/assets/JS/front.js?ver=1790849789

js azcapitoltimes.com collected 2026-10-01 10:26:36 UTC 8,184 bytes, 261 lines download raw bytes

1/**
2
3 * Javascript & jQuery to implement tabbed login form and toggle visibility of UI elements
4 *
5 * @author Asentech
6 * @uses jQuery
7 */
8
9(function($) {
10	$(document).ready(function() {
11		
12		$(".select_all_results").click(function(){
13
14			if($(this).is(':checked')){
15				$("#selectRecords").modal("show");
16			} else {
17				$(".export_chk").each(function(){
18					$(this).prop('checked',false);
19					$(this).removeAttr('disabled');
20				});
21			}
22			
23		});
24
25		$(".export_chk").click(function(){
26			if($(this).is(':checked')){
27				$('.record_selection').val('on_page_record');
28			} else {
29				$('.record_selection').val('');
30			}
31		});
32
33		$(".selectrecords").click(function(){
34			var Type = $(this).attr("data-type");
35			$('.record_selection').val(Type);
36
37			if(Type == 'on_page_record'){
38				$(".export_chk").each(function(){
39					$(this).prop('checked', true);
40					$(this).removeAttr('disabled');
41					
42				});
43			}
44
45			if(Type == 'all_page_record'){
46				$(".export_chk").each(function(){
47					$(this).prop('checked', true);
48					$(this).attr('disabled', 'disabled');
49				});
50			}
51
52			$("#selectRecords").modal("hide");
53			
54		});
55		
56		$(".modal .modal-dialog .close").click(function(){
57			$(this).parents('.modal').modal("hide");
58		});
59
60		$("#download_exported_file a.downloadCsv").click(function(){
61			$(".select_all_results").prop('checked',false);
62			
63			$(".export_chk").each(function(){
64				$(this).prop('checked',false);
65				$(this).removeAttr('disabled');
66			});
67
68			$("#download_exported_file").modal("hide");
69		});
70
71		$(document).on("click", "#export_csv", function(){
72
73			var selectedResults = [];
74			var selectionType = $('.record_selection').val();
75			var selectedCategory = $('.current_Category').val();
76			var currentPage = $('.current_Page').val();
77
78			if(selectionType == 'on_page_record'){
79				$(".export_chk").each(function(){
80					if($(this).is(":checked")){
81						var AdId = $(this).val();
82						selectedResults.push(AdId);
83					}
84				});
85			}
86
87			$(".loader").show();
88
89			$.ajax({
90				url: front_js_object.ajaxurl,
91				type: 'POST',
92				data: {
93					'action': 'export_search_results',
94					'selectionType': selectionType,
95					'selectedCategory': selectedCategory,
96					'selectedResults': selectedResults,
97					'currentPage': currentPage
98				},
99				success: function(response){
100					$(".loader").hide();
101					
102					if(response){
103						var $obj = $.parseJSON(response);
104						if($obj.status == 'success'){
105							$("#download_exported_file .modal-body .downloadCsv").attr('href', $obj.fileurl);
106							$("#download_exported_file .modal-body .downloadCsv").attr('download', $obj.fileName);
107							$("#download_exported_file .modal-body .downloadCsv").attr('title', $obj.fileName);
108							$("#download_exported_file").modal("show");
109						} else {
110							$('.exportErr').html("<p>"+$obj.message+"</p>");
111							$('.exportErr').show();
112						}
113					}
114				}
115			})
116			
117		});
118
119		$(".tab-link").click(function(){
120			var index = $(this).attr("data-index");
121            var content = $(this).parents(".ad-tab").attr("data-content");
122
123			$(".search_Index option[value='"+index+"']").attr("selected","selected");
124			$(".search_Index option[value='"+index+"']").siblings().removeAttr("selected","selected");
125			$(this).parents(".ad-tab").addClass('active');
126			$(this).parents(".ad-tab").siblings().removeClass('active');
127
128            $(".activeTab").val(content);
129
130            if($(".search-toggle .toggleBtn").hasClass('open')){
131                $("#"+content+"").toggleClass("hidden");
132                $("#"+content+"").siblings().addClass("hidden");
133                
134                $(".search-top.free_search").removeClass("hidden");
135                $(".restricted-content").removeClass("hidden");
136            }
137
138            var urlIndex = $("#search_Index option:selected").attr("data-url");
139            $(".adSearchForm").attr('action', front_js_object.search_result_url+'?indexgroup='+urlIndex);
140		});
141
142		$(".search-toggle .toggleBtn").click(function(){
143
144			if($(".ad-form-tab").length > 0){
145				var content = $(".ad-form-tab li.active").attr("data-content");
146			} else {
147				var content = $(this).attr("data-content");
148			}
149			
150			$(this).toggleClass("open");
151
152			$("#"+content+"").toggleClass("hidden");
153			$("#"+content+"").siblings().addClass("hidden");
154
155			$(".restricted-content").toggleClass("visible");
156            $(".restricted-content").removeClass("hidden");
157            $(".search-top.free_search").removeClass("hidden");
158
159		});
160
161        $("#search_Index").on("change", function(){
162            var selectedVal = $(this).val();
163            var urlIndex = $(this).find("option:selected").attr("data-url");
164
165            $(".ad-form-tab .ad-tab").each(function(){
166                var tabVal = $(this).find(".tab-link").attr('data-index');
167                if(tabVal == selectedVal){
168                    $(this).find(".tab-link").trigger('click');
169                }
170            });
171
172            $(".adSearchForm").attr('action', front_js_object.search_result_url+'?indexgroup='+urlIndex);
173
174        });
175
176        $(".PubDateRange").on("change", function(){
177            if($(this).val() == 'custom'){
178                $(this).parents('.form-field').find('.custom-date-range').removeClass('hide');
179            } else {
180                $(this).parents('.form-field').find('.custom-date-range').addClass('hide');
181            }
182        });
183
184        $(".propertySaleDate").on("change", function(){
185            if($(this).val() == 'custom'){
186                $(this).parents('.form-field').find('.custom-date-range').removeClass('hide');
187            } else {
188                $(this).parents('.form-field').find('.custom-date-range').addClass('hide');
189            }
190        });
191
192        $(".auctionDate").on("change", function(){
193            if($(this).val() == 'custom'){
194                $(this).parents('.form-field').find('.custom-date-range').removeClass('hide');
195            } else {
196                $(this).parents('.form-field').find('.custom-date-range').addClass('hide');
197            }
198        });
199
200		$(".tooltips .learn-more").click(function(){
201			$(this).parents(".tooltips").find(".tooltiptext").toggleClass('visible');
202		});
203
204		if($("body").hasClass("page-template-template-search-detail")){
205			SearchDetailPageMap();
206		}
207
208		
209        $(".ad-tab-content .ad_search_state").on("change", function(){
210            var stateVal = $(this).val();
211            var activeTabContent = $(".activeTab").val();
212
213            $(".ad-form-content #"+activeTabContent+" .ad_search_county").css("opacity", "0.4"); 
214            $(".ad-form-content #"+activeTabContent+" .ad_search_city").css("opacity", "0.4");
215            $(".ad-form-content #"+activeTabContent+" .ad_search_zipcode").css("opacity", "0.4");
216
217            $.ajax({
218                url: front_js_object.ajaxurl,
219                type: "POST",
220                data:{
221                    'action': 'get_state_data',
222                    'state': stateVal
223                },
224                success: function(response){
225                	$(".ad-form-content #"+activeTabContent+" .ad_search_county").css("opacity", "1"); 
226		            $(".ad-form-content #"+activeTabContent+" .ad_search_city").css("opacity", "1");
227		            $(".ad-form-content #"+activeTabContent+" .ad_search_zipcode").css("opacity", "1");
228
229                    if(response){
230                        var Data = $.parseJSON(response);
231                        $(".ad-form-content #"+activeTabContent+" .ad_search_county").html(Data.county); 
232                        $(".ad-form-content #"+activeTabContent+" .ad_search_city").html(Data.city); 
233                        $(".ad-form-content #"+activeTabContent+" .ad_search_zipcode").html(Data.zipcode); 
234                    }
235                }
236            });
237        });
238
239	});
240})(jQuery);
241
242function SearchDetailPageMap(){
243	var Lat = jQuery(".pnMapLat").val();
244	var Long = jQuery(".pnMapLong").val();
245
246	if(Lat != '' && Long != ''){
247		const myLatLng = new google.maps.LatLng(Lat,Long);
248
249		var mapProp = {
250		  center: myLatLng,
251		  zoom: 7,
252		};
253
254		const map = new google.maps.Map(document.getElementById("pndetailMap"),mapProp);
255
256		new google.maps.Marker({
257		    position: myLatLng,
258		    map,
259	  	});
260	}
261}

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.