PageSourceSearch

https://www.ckrumlov.info/php/tempo/turista/scripts20240926.js

js ckrumlov.info collected 2026-10-02 06:57:43 UTC 12,135 bytes, 342 lines download raw bytes

1$(document).ready(function() {
2	if ($('#cat_search').length) {
3		$( "#cat_search" ).submit();
4	}
5	if ($('#design-search').length) {
6		$( "#design-search" ).submit();
7	}
8	if ($('#design-static-search').length) {
9		$( "#design-static-search" ).submit();
10	}
11	if ($('#event-search').length) {
12		$( "#event-search" ).submit();
13	}
14	if ($('#map-detail').length) {
15        init_map();
16        add_marker();
17	}
18	$(".jGallery").justifiedGallery({
19	    rowHeight : 150,
20		waitThumbnailsLoad : false,
21	    margins : 8
22	});
23});
24
25const API_KEY_1 = '91LR826s-bYjOwNdLphB6Ok9oYSx6wEIfreLBwRF3-E';
26const API_KEY = 'c2HbGO2yW0eYcwVTyM62-jXCSD9aQZnxVTwsqFyoUsI';
27
28
29$('.filter-section-head').on('click', function(e) {
30	$('#null').load('/php/tempo/turista/backend_session.php', { 
31        'id': $(this).data('target') + '_open',
32        'value': '0/1',
33	});
34});
35
36$('.pager a').on('click', function(e) {
37	$('#null').load('/php/tempo/turista/backend_cat_scrollto.php', {});
38});
39
40$('#cat_search.uby .form-check-input, #cat_search.ksz .form-check-input, #cat_search.vyl .form-check-input').click (function () {
41	var myEvets = {'uby' : 'Filtr - Ubytování', 'ksz' : 'Filtr - Gastronomie', 'tra' : 'Filtr - Výlety / Procházky' };
42	var myTyps = {'narocnost' : 'Fyzická náročnost', 'tema' : 'Téma', 'vzdalenost' : 'Vzdálenost', 'casova' : 'Časová náročnost', 'doprava' : 'Typ', 'typ' : 'Typ', 'sluzby' : 'Služby', 'komfort' : 'Komfort', 'lokalita' : 'Lokalita', 'vzdalenost' : 'Vzdálenost od náměstí v Krumlově', 'kuchyne' : 'Kuchyně' };
43	var thisCheck = $(this);
44	if (thisCheck.is (':checked')) {
45		var tmpText = thisCheck.attr("name").split("_");
46		var tmpKey = tmpText[0];
47		var eventValue = myEvets[tmpKey];
48		tmpKey = tmpText[2].replace("[]", "");
49		var eventType = myTyps[tmpKey];
50		var eventLabel = thisCheck.next("label").html().replace(" ", " ");
51		dataLayer.push({  
52			'event': eventValue,
53			'action': eventType,
54			'label': eventLabel
55		});
56/*		console.log("event: " + eventValue + "\naction: " + eventType + "\nlabel: " + eventLabel); */
57	}
58});
59
60$('#cat_search.uby .switch-input, #cat_search.ksz .switch-input').click (function () {
61	var myEvets = {'uby' : 'Filtr - Ubytování', 'ksz' : 'Filtr - Gastronomie', 'tra' : 'Filtr - Výlety / Procházky' };
62	var myTyps = {'map' : 'Mapa', 'list' : 'Seznam' };
63	var thisCheck = $(this);
64	if (thisCheck.is (':checked')) {
65		var tmpText = thisCheck.attr("name").split("_");
66		var tmpKey = tmpText[0];
67		var eventValue = myEvets[tmpKey];
68		tmpKey = thisCheck.attr("id");
69		var eventType = myTyps[tmpKey];
70		var eventLabel = '';
71		dataLayer.push({  
72			'event': eventValue,
73			'action': eventType,
74			'label': eventLabel
75		});
76/*		console.log("event: " + eventValue + "\naction: " + eventType + "\nlabel: " + eventLabel); */
77	}
78});
79
80
81
82$( "#cat_search input" ).on( "change", function( event ) {
83    event.preventDefault();
84	$('.filter-results').html( '<img src="/img/loading2.gif" class="waiting" alt="waiting for data" />' );
85    var data = $( "#cat_search" ).serialize();
86    $.post('/php/tempo/turista/backend_cat_change.php', data, function(response) {
87        $('#cat_search_result').html( response );
88    });                 
89});
90$( "#cat_search" ).on( "submit", function( event ) {
91    event.preventDefault();
92	$('.filter-results').html( '<img src="/img/loading2.gif" class="waiting" alt="waiting for data" />' );
93    var data = $( this ).serialize();
94    $.post('/php/tempo/turista/backend_cat_search.php', data, function(response) {
95        $('#cat_search_result').html(response);
96    }); 
97});
98
99$("#cat_search input[type='text']").keyup(function() { 
100	$( "#cat_search" ).submit();
101});
102
103$( "input[name='uby_search_vzdalenost[]']" ).on( "click", function( event ) {
104	$("input[name='uby_search_vzdalenost[]']").prop('checked', false);
105	$(this).prop('checked', true);
106});
107
108$( "#design-search" ).on( "submit", function( event ) {
109    event.preventDefault();
110	$('#items-count').html( '<img src="/img/loading2.gif" class="waiting" alt="waiting for data" />' );
111	$('#share-url').html( '' );
112    var data = $( this ).serialize();
113    $.post('/php/tempo/turista/backend_design_search.php', data, function(response) {
114        $('#cat_search_result').html( response );
115    }); 
116});
117
118$( "#design-search input.filter" ).on( "change", function( event ) {
119    event.preventDefault();
120	var search_all = '#' + $( "#design-search #kname" ).val() + '_search_all';
121	$( search_all ).prop( "checked", false );
122	$('#items-count').html( '<img src="/img/loading2.gif" class="waiting" alt="waiting for data" />' );
123	$('#share-url').html( '' );
124	removeHover();
125    var data = $( "#design-search" ).serialize();
126    $.post('/php/tempo/turista/backend_design_search_change.php', data, function(response) {
127        $('#cat_search_result').html( response );
128    });                 
129});
130
131$( "#design-static-search" ).on( "submit", function( event ) {
132    event.preventDefault();
133	$('#items-count').html( '<img src="/img/loading2.gif" class="waiting" alt="waiting for data" />' );
134	$('#share-url').html( '' );
135    var data = $( this ).serialize();
136    $.post('/php/tempo/turista/backend_design_static_search.php', data, function(response) {
137        $('#cat_search_result').html( response );
138    }); 
139});
140
141$('.show-static-list-map input').on('click', function(e) {
142	$('#null').load('/php/tempo/turista/backend_session.php', { 
143        'id': $( "#design-static-search #kname" ).val() + '_static_search_view',
144        'value': $(this).val(),
145	}, function(response) {
146        $( "#design-static-search" ).submit();
147    });                 
148});
149
150$('#akc_reset').on('click', function(e) {
151	$("#null").load("/php/tempo/turista/backend_session.php", { 
152        'id': "akc_reset",
153        'value': "1",
154	}, function() {
155		location.reload(); 
156	});
157});
158
159$('#zaz_reset').on('click', function(e) {
160	$("#null").load("/php/tempo/turista/backend_session.php", { 
161        'id': "zaz_reset",
162        'value': "1",
163	}, function() {
164		location.reload(); 
165	});
166});
167
168$('#atr_reset').on('click', function(e) {
169	$("#null").load("/php/tempo/turista/backend_session.php", { 
170        'id': "atr_reset",
171        'value': "1",
172	}, function() {
173		location.reload(); 
174	});
175});
176
177
178
179function hasTouch() {
180  return 'ontouchstart' in document.documentElement
181         || navigator.maxTouchPoints > 0
182         || navigator.msMaxTouchPoints > 0;
183}
184
185function removeHover() {
186	if (hasTouch()) {
187	  try {
188	    for (var si in document.styleSheets) {
189	      var styleSheet = document.styleSheets[si];
190	      if (!styleSheet.rules) continue;
191
192	      for (var ri = styleSheet.rules.length - 1; ri >= 0; ri--) {
193	        if (!styleSheet.rules[ri].selectorText) continue;
194
195	        if (styleSheet.rules[ri].selectorText.match(':hover')) {
196	          styleSheet.deleteRule(ri);
197	        }
198	      }
199	    }
200	  } catch (ex) {}
201	}
202}
203
204
205$( "#design-search input.all" ).on( "change", function( event ) {
206    event.preventDefault();
207	$('#design-search input.filter').each(function(i){
208		$( this ).prop( "checked", false );
209	});
210	$('#items-count').html( '<img src="/img/loading2.gif" class="waiting" alt="waiting for data" />' );
211	$('#share-url').html( '' );
212	removeHover();
213    var data = $( "#design-search" ).serialize();
214    $.post('/php/tempo/turista/backend_design_search_change.php', data, function(response) {
215        $('#cat_search_result').html( response );
216    });                 
217});
218
219$('.show-list-map input').on('click', function(e) {
220	$('#null').load('/php/tempo/turista/backend_session.php', { 
221        'id': $( "#design-search #kname" ).val() + '_search_view',
222        'value': $(this).val(),
223	}, function(response) {
224        $( "#design-search" ).submit();
225    });                 
226});
227
228
229$( "#event-search .tag-list-1 input.filter" ).on( "change", function( event ) {
230    event.preventDefault();
231	var search_all = '#akc_search_all';
232	$( search_all ).prop( "checked", false );
233	$('#items-count').html( '<img src="/img/loading2.gif" class="waiting" alt="waiting for data" />' );
234	$('#share-url').html( '' );
235	removeHover();
236    var data = $( "#event-search" ).serialize();
237    $.post('/php/tempo/turista/backend_event_search_change.php', data, function(response) {
238        $('#cat_search_result').html( response );
239    });                 
240});
241
242$( "#event-search .tag-list-1 input.all" ).on( "change", function( event ) {
243    event.preventDefault();
244	$('#event-search .tag-list-1 input.filter').each(function(i){
245		$( this ).prop( "checked", false );
246	});
247	$('#items-count').html( '<img src="/img/loading2.gif" class="waiting" alt="waiting for data" />' );
248	$('#share-url').html( '' );
249    var data = $( "#event-search" ).serialize();
250    $.post('/php/tempo/turista/backend_event_search_change.php', data, function(response) {
251        $('#cat_search_result').html( response );
252    });                 
253});
254
255$( "#event-search .tag-list-2 input.filter" ).on( "change", function( event ) {
256	var id = $( this ).attr('id');
257    event.preventDefault();
258	$('#event-search .tag-list-2 input.filter').each(function(i){
259		$( this ).prop( "checked", false );
260	});
261	$("#akce_search_from").val('');
262	$("#akce_search_from").removeClass('active');
263	$("#akce_search_till").val('');
264	$("#akce_search_till").removeClass('active');
265	$('#event-search .tag-list-2 #' + id).prop( "checked", true );
266	
267	$('#items-count').html( '<img src="/img/loading2.gif" class="waiting" alt="waiting for data" />' );
268	$('#share-url').html( '' );
269    var data = $( "#event-search" ).serialize();
270    $.post('/php/tempo/turista/backend_event_search_change.php', data, function(response) {
271        $('#cat_search_result').html( response );
272    });                 
273});
274
275$( "#event-search #events_fromtill_fields input, .event-search input" ).on( "change", function( event ) {
276/*	$('#event-search #events_fromtill_fields input').each(function(i){ */
277	$('.event-search input').each(function(i){
278		if ($( this ).val() != '') {
279			$( this ).addClass('active');
280		} else {
281			$( this ).removeClass('active');
282		}
283	});
284	if ($("#akce_search_from").val() != '') {
285		$('#event-search .tag-list-2 input.filter').each(function(i){
286			$( this ).prop( "checked", false );
287		});
288	}
289	$('#items-count').html( '<img src="/img/loading2.gif" class="waiting" alt="waiting for data" />' );
290	$('#share-url').html( '' );
291    var data = $( "#event-search" ).serialize();
292    $.post('/php/tempo/turista/backend_event_search_change.php', data, function(response) {
293        $('#cat_search_result').html( response );
294    });                 
295});
296
297
298$('#akce_search_title').keypress(function(event){
299  var keycode = (event.keyCode ? event.keyCode : event.which);
300  if(keycode == '13'){
301      event.preventDefault();
302  	  $(this).addClass('active');
303  	var search_all = '#akc_search_all';
304  	$( search_all ).prop( "checked", false );
305	  $(search_all).removeClass('active');
306  	$('#items-count').html( '<img src="/img/loading2.gif" class="waiting" alt="waiting for data" />' );
307  	$('#share-url').html( '' );
308  	removeHover();
309      var data = $( "#event-search" ).serialize();
310      $.post('/php/tempo/turista/backend_event_search_change.php', data, function(response) {
311          $('#cat_search_result').html( response );
312      });                 
313  }
314});
315
316$( "#event-search" ).on( "submit", function( event ) {
317    event.preventDefault();
318	$('#items-count').html( '<img src="/img/loading2.gif" class="waiting" alt="waiting for data" />' );
319	$('#share-url').html( '' );
320    var data = $( this ).serialize();
321    $.post('/php/tempo/turista/backend_event_search.php', data, function(response) {
322        $('#cat_search_result').html( response );
323    }); 
324});
325
326$(".event-ticket").on("click",function(){
327	$('#ps-eventid').val($(this).attr('data-ps-eventid'));
328	$('#mrsid').val($(this).attr('data-mrsid'));
329});
330
331function set_datepicker_limit (id_of_limit,type_of_limit,value_of_limit) {
332	$(id_of_limit).datepicker( 'option', type_of_limit, value_of_limit ); 
333}
334
335$( "#akce_search_from" ).on( "change", function( event ) {
336	set_datepicker_limit('#akce_search_till','minDate',$(this).val());
337});
338
339$( "#akce_search_till" ).on( "change", function( event ) {
340	set_datepicker_limit('#akce_search_from','maxDate',$(this).val());
341});
342

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.