PageSourceSearch

https://keskisuomenvihreat.fi/content/plugins/artcloud-events/src/…/artcloud-event-search.js?ver=1.0.2

js keskisuomenvihreat.fi collected 2026-10-03 01:01:32 UTC 1,825 bytes, 47 lines download raw bytes

1jQuery(document).ready(function ($) {
2	$("#event-search-form").submit(function (e) {
3		e.preventDefault();
4		var formData = $(this).serialize();
5		var attributes = $(this).data("attr");
6		if (typeof attributes === "object") {
7			attributes = JSON.stringify(attributes);
8		}
9		$.ajax({
10			type: "GET",
11			url: artcloud_MAIN.ajaxurl,
12			data: {
13				action: "artcloud_event_search", // AJAX action hook
14				formData: formData,
15				attributes: attributes,
16			},
17			beforeSend: function () {
18				// Display loading spinner with SVG
19				const loadingSpinner = `
20					<div class="event-loading-container">
21						<svg class="event-loading-spinner" width="50" height="50" viewBox="0 0 50 50" xmlns="http://www.w3.org/2000/svg">
22							<circle class="event-loading-circle" cx="25" cy="25" r="20" fill="none" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-dasharray="31.416" stroke-dashoffset="31.416">
23								<animate attributeName="stroke-dasharray" dur="2s" values="0 31.416;15.708 15.708;0 31.416;0 31.416" repeatCount="indefinite"/>
24								<animate attributeName="stroke-dashoffset" dur="2s" values="0;-15.708;-31.416;-31.416" repeatCount="indefinite"/>
25							</circle>
26						</svg>
27						<p class="event-loading-text">${artcloud_MAIN?.loadingText || 'Ladataan...'}</p>
28					</div>
29				`;
30				$("#search-results").html(loadingSpinner);
31			},
32			success: function (response) {
33				// Update specific <div> with search results
34				$("#search-results").html(response);
35				$(".event-tab-content.event-section").css("display", "none");
36				$("#search-results .event-tab-content.event-section").css(
37					"display",
38					"block"
39				);
40			},
41			error: function (xhr, textStatus, errorThrown) {
42				// Display error message
43				$("#search-results").html("<p>Error: " + textStatus + "</p>");
44			},
45		});
46	});
47});

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.