PageSourceSearch

https://yehud-monosson.muni.il/wp-content/themes/dooble/assets/js/scripts.js?ver=2024-01-18-v-1790901876

js yehud-monosson.muni.il collected 2026-10-02 08:41:07 UTC 35,200 bytes, 1,087 lines download raw bytes

1// jQuery(document).ready(function() {
2//     var owl = jQuery('.owl-carousel');
3//     owl.owlCarousel({
4//       margin: 10,
5//       nav: true,
6//       loop: true,
7//       rtl:true,
8//       responsive: {
9//         0: {
10//           items: 1
11//         },
12//         600: {
13//           items: 1
14//         },
15//         1000: {
16//           items: 1
17//         }
18//       }
19//     })
20//   })
21
22
23
24//   var map;
25
26// // lets define some vars to make things easier later
27// var kml = {
28//   a: {
29//     name: "MPLS/STPL",
30//     url: "https://maps.google.com/maps/ms?authuser=0&vps=5&ie=UTF8&msa=0&output=kml&msid=212971981154994583939.0004b06640255267e038c"
31//   },
32//   b: {
33//     name: "Bicycling Tour Routes",
34//     url: "https://maps.google.com/maps/ms?authuser=0&vps=4&ie=UTF8&msa=0&output=kml&msid=212971981154994583939.0004902a1824bbc8c0fe9"
35//   }
36//   // keep adding more if ye like
37// };
38
39// // initialize our goo
40// function initializeMap() {
41//   var options = {
42//     center: new google.maps.LatLng(44.9812, -93.2687),
43//     zoom: 13,
44//     mapTypeId: google.maps.MapTypeId.ROADMAP
45//   }
46//   map = new google.maps.Map(document.getElementById("map_canvas"), options);
47
48//   createTogglers();
49// };
50
51// google.maps.event.addDomListener(window, 'load', initializeMap);
52
53// // the important function... kml[id].xxxxx refers back to the top
54// function toggleKML(checked, id) {
55
56//   if (checked) {
57
58//     var layer = new google.maps.KmlLayer(kml[id].url, {
59//       preserveViewport: true,
60//       suppressInfoWindows: true
61//     });
62//     // store kml as obj
63//     kml[id].obj = layer;
64//     kml[id].obj.setMap(map);
65//   } else {
66//     kml[id].obj.setMap(null);
67//     delete kml[id].obj;
68//   }
69
70// };
71
72// // create the controls dynamically because it's easier, really
73// function createTogglers() {
74
75//   var html = "<form><ul>";
76//   for (var prop in kml) {
77//     html += "<li id=\"selector-" + prop + "\"><input type='checkbox' id='" + prop + "'" +
78//       " onclick='highlight(this,\"selector-" + prop + "\"); toggleKML(this.checked, this.id)' \/>" +
79//       kml[prop].name + "<\/li>";
80//   }
81//   html += "<li class='control'><a href='#' onclick='removeAll();return false;'>" +
82//     "Remove all layers<\/a><\/li>" +
83//     "<\/ul><\/form>";
84
85//   document.getElementById("toggle_box").innerHTML = html;
86// };
87
88// // easy way to remove all objects
89// function removeAll() {
90//   for (var prop in kml) {
91//     if (kml[prop].obj) {
92//       kml[prop].obj.setMap(null);
93//       delete kml[prop].obj;
94//     }
95
96//   }
97// };
98
99// // Append Class on Select
100// function highlight(box, listitem) {
101//   var selected = 'selected';
102//   var normal = 'normal';
103//   document.getElementById(listitem).className = (box.checked ? selected : normal);
104// };
105
106// function startup() {
107//   // for example, this toggles kml b on load and updates the menu selector
108//   var checkit = document.getElementById('b');
109//   checkit.checked = true;
110//   toggleKML(checkit, 'b');
111//   highlight(checkit, 'selector1');
112// }
113// jQuery(document).ready(function() {
114//   startup();
115// });
116
117var calendar;
118var events_list;
119
120var map;
121var markers_list;
122
123function display_marker_data(item){
124	var html = '';
125	if( item.events && item.events.length ) {
126		jQuery.each( item.events, function(index, column){
127			html = html + `<div class="column">
128				<div class="title">${column.title}</div>
129				<div class="desc">${column.desc}</div>
130			</div>`;
131		});
132	}
133	jQuery('.map-marker-data').html(html);
134}
135
136jQuery(document).ready(function() {
137	// Map: openstreetmap.org
138	// Map options: https://leafletjs.com/reference.html
139	
140	if( jQuery('#map').length ) {
141		init_map();
142		
143		window.existsMapMarker = [];
144		
145		jQuery('#map-search').submit( function(e){
146			e.preventDefault();
147			var search_key = jQuery(this).find('.form-control').val();
148			if( search_key ) {
149				jQuery(markers_list).each( function(index, item){
150					if( item.address && item.address.includes(search_key) ) {
151						var currentCoords = item.lat+', '+item.long;
152						if( window.existsMapMarker.indexOf(currentCoords) === -1 ) {
153							
154							window.existsMapMarker.push(currentCoords);
155							
156							var marker_icon = leafIcon();
157							var showMarker = L.marker( [ item.lat, item.long ], {
158								icon   : marker_icon,
159								index  : index,
160								address: item.address,
161								events : item.events
162							})
163							.addTo(map)
164							.bindPopup( item.address ).openPopup();
165						}
166						
167						map.panTo([item.lat, item.long]);
168						display_marker_data(item);
169					}
170				});
171			}
172		});
173	}
174
175	// fix nav menu classes
176	jQuery('.main-navbar>.navbar-nav li').each(function(index, item){
177		if( index === 2 || index === 3 ){
178			jQuery(item).addClass('d-none-lg');
179		}
180		if( index === 4 || index === 5 || index === 6 ){
181			jQuery(item).addClass('d-none d-block-md');
182		}
183	});
184
185
186	// load owl carousel
187	try {
188	    var owl = jQuery('.owl-carousel');
189	    owl.owlCarousel({
190			margin: 10,
191			autoplayTimeout: 10000,
192			autoplay:true,
193			nav: true,
194			loop: true,
195			rtl:true,
196			responsive: {
197				0: {
198					items: 1
199				},
200				600: {
201					items: 1
202				},
203				1000: {
204					items: 1
205				}
206			}
207	    });
208  	} catch (error) {
209  	}
210
211	try {
212		jQuery("[data-click-toggle]").click((e) => {
213			e.preventDefault();
214			let target = e.currentTarget;
215			jQuery(target.getAttribute('data-target')).toggleClass('active');
216		});
217	} catch (error) {
218	}
219
220	try {
221		const lightbox = GLightbox({
222			touchNavigation: true,
223			loop: true,
224			width: "90vw",
225			height: "90vh"
226		});
227	} catch (error) {
228	}
229
230	theme_responsive_nav();
231
232	theme_search_block();
233
234	theme_out_links();
235
236	theme_home_lightbox_content();
237
238	theme_add_to_calendar();
239});
240
241jQuery( window ).on('resize', function() {
242	theme_responsive_nav();
243});
244
245function theme_add_to_calendar(){
246
247	jQuery(document).on('click', '.trigger-btn-add-to-calendat-btn', function(){
248
249		const parent = jQuery(this).closest('.set-event-link');
250		if( parent.length ){
251			if( parent.hasClass('open-list') ){
252				parent.removeClass('open-list');
253			} else {
254				parent.addClass('open-list');
255			}
256		}
257	});
258}
259
260function theme_home_lightbox_content(){
261
262	setTimeout(function(){
263		if( jQuery('.home-start-side-lightbox').length ){
264			GreyOwlLightbox({
265			    dom_html_element : 'home-start-side-lightbox',
266				max_width : 425,
267				// max_height : 600,
268				lightbox_wrapp_class : 'home-start-side-lightbox-wrapp',
269				lightbox_style       : {
270					// 'background_color' : '#ffffff',
271					'padding_top' : 25,
272					'padding_right' : 50,
273					'padding_bottom' : 25,
274					'padding_left' : 50,
275					'border_radius' : 5,
276				}
277			});
278		}
279
280		if( jQuery('.home-start-lightbox').length ){
281			GreyOwlLightbox({
282			    dom_html_element : 'home-start-lightbox',
283				max_width : 700,
284				// max_height : 600,
285				lightbox_wrapp_class : 'home-start-lightbox-wrapp',
286				lightbox_style       : {
287					// 'background_color' : '#ffffff',
288					'padding_top' : 25,
289					'padding_right' : 50,
290					'padding_bottom' : 25,
291					'padding_left' : 50,
292					'border_radius' : 5,
293				}
294			});
295
296			theme_set_cookie( 'lightbox_start', 'true' );
297		}
298	}, 1500 );
299}
300
301
302
303function theme_out_links(){
304
305	const links = document.getElementsByTagName('a');
306
307	if( typeof site_url != 'undefined' && links.length ){
308
309		let expression = /[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)?/gi;
310		let regex = new RegExp(expression);
311
312		for ( let i = 0; i < links.length; i++ ) {
313
314			let match = links[ i ].host.match( regex );
315
316			if( match && site_url != links[ i ].host ){
317				links[ i ].setAttribute( 'target', '_blank' );
318				// console.log( 'links[ i ]', links[ i ].host );
319			}
320
321			// if( typeof links[ i ].host !== 'undefined' && site_url != links[ i ].host ){
322			//
323			// 	console.log( 'host 1', links[ i ].host );
324			// 	// console.log( 'host 2', links[ i ].baseURI );
325			// }
326		}
327	}
328
329	// const links = jQuery('body a');
330	//
331	// if( links.length ){
332	// 	links.each(function(){
333	// 		const url = jQuery(this).attr('href');
334	// 		console.log('url', url );
335	// 		// console.log('url', url.attr('host') );
336	// 		// console.log('url', jQuery(this).attr('host') );
337	// 	});
338	// }
339}
340
341function theme_search_block(){
342	// personal_area_header_links
343	jQuery(document).on('click', '.trigger-open-search a', function(e){
344		e.preventDefault();
345		GreyOwlLightbox({
346		    dom_html_element : 'search-class-container',
347			lightbox_wrapp_class : 'lightbox-search-content',
348			max_width : 980,
349			lightbox_style : {
350				'background_color' : '',
351				'padding_top' : 0,
352				'padding_right' : 0,
353				'padding_bottom' : 0,
354				'padding_left' : 0,
355				'border_radius' : 60,
356			},
357			close_btn_sett : {
358				'top' : '-45',
359				'left' : 'auto',
360				'right' : '-45',
361			}
362		});
363	});
364
365	// jQuery(document).on('click', '#link-selector-btn', function(){
366	// 	console.log('ADMIN TEST');
367	// });
368
369}
370
371function theme_responsive_nav(){
372	// dropdown-content
373	let nav_list = '';
374	// console.log( jQuery('.header_menu_class.navbar-nav') );
375	const naw_width = jQuery('.header_menu_class.main-top-naw').width();
376	// console.log( 'naw_width', naw_width );
377	jQuery('.header_menu_class.main-top-naw .menu-item').each(function(){
378
379		const prop = jQuery(this).css('display');
380		// console.log('test', jQuery(this).css() );
381		if( prop == 'none' ){
382			const text = jQuery(this).find('a').text();
383			const href = jQuery(this).find('a').attr('href');
384			nav_list += '<a href="'+href+'">'+text+'</a>';
385		}
386	});
387	// console.log( 'nav_list', nav_list );
388	jQuery('.dropdown-content').html( nav_list );
389}
390
391jQuery(document).on('click', '.calendar-menu-list li a', function(e){
392
393	e.preventDefault();
394
395	var term_id = jQuery(this).parents('li').attr('data-term');
396
397	if( events_list && term_id ) {
398		if( 'all' == term_id ) {
399
400			jQuery('.fc-event').show();
401
402			jQuery('.calendar-date-item').show();
403
404		} else {
405
406			jQuery('.fc-event').hide();
407
408			jQuery('.calendar-date-item').hide();
409
410			jQuery('.fc-event[data-department_id="'+term_id+'"]').show();
411
412			jQuery('.calendar-date-item[data-department_id="'+term_id+'"]').show();
413
414		}
415
416	}
417
418	// console.log(term_id);
419	
420	// console.log(events_list);
421
422});
423
424function leafIcon() {
425	var LeafIcon = L.Icon.extend({
426		options: {
427			iconSize:     [45, 45],
428			shadowSize:   [50, 64],
429			iconAnchor:   [22, 94],
430			shadowAnchor: [4, 62],
431			popupAnchor:  [-3, -76]
432		}
433	});
434	return new LeafIcon({iconUrl: site_settings.theme_url + '/images/map-marker.png'});
435}
436function init_map(){
437	// Map: openstreetmap.org
438	// Map options: https://leafletjs.com/reference.html
439
440	markers_list = jQuery.parseJSON( jQuery('#map').attr('data-markers'));
441	// cat_markers_list = jQuery.parseJSON( jQuery('#map').data('catMarkers'));
442	cat_markers_list = jQuery('#map').data('catMarkers') || jQuery('#map').data('cat-markers');
443	map_data = jQuery('#map').data('mapData') || jQuery('#map').data('map-data');
444	/*------------------------------------------------------------------*/
445
446	// console.log( 'cat_markers_list', cat_markers_list );
447
448	// map = L.map('map').setView([ markers_list[0].lat, markers_list[0].long ], 14);
449	// var LeafIcon = L.Icon.extend({
450		// options: {
451			// shadowUrl: 'leaf-shadow.png',
452			// iconSize:     [45, 45],
453			// shadowSize:   [50, 64],
454			// iconAnchor:   [22, 94],
455			// shadowAnchor: [4, 62],
456			// popupAnchor:  [-3, -76]
457		// }
458	// });
459	// var marker_icon = new LeafIcon({iconUrl: site_settings.theme_url + '/images/map-marker.png'});
460	var marker_icon = leafIcon();
461
462	// zoom
463	// long
464	// lat
465	var map_zoom = ( typeof map_data.zoom != 'undefined' ) ? Number( map_data.zoom ) : 14;
466	var map_long = ( typeof map_data.long != 'undefined' ) ? map_data.long : markers_list[0].long;
467	var map_lat  = ( typeof map_data.lat != 'undefined' ) ? map_data.lat : markers_list[0].lat;
468
469	map = L.map('map', {
470		center: [ map_lat, map_long ],
471	    zoom: map_zoom,
472		layers: []
473	    // layers: layers_arr
474	});
475
476	/*------------------------------------------------------------------------*/
477	var overlay_maps = {};
478	var layers_arr = [];
479
480	jQuery.each( cat_markers_list, function( index, item ){
481
482		const markers_arr = item.markers;
483		const cat_slug    = item.cat_slug;
484		const cat_name    = item.cat_name;
485		let temp_arr = [];
486		if( markers_arr.length ){
487			temp_arr = [];
488			jQuery.each( markers_arr, function( key, value ){
489				const data = L.marker( [ value.lat, value.long ], {
490					icon   : marker_icon,
491					index  : index,
492					address: value.address,
493					events : value.events
494				}).bindPopup( value.address ).on('click', function(e) {
495					// console.log( 'Admin', e );
496					display_marker_data( e.target.options );
497				});
498				temp_arr.push( data );
499			});
500		}
501
502		var layer = L.layerGroup( temp_arr );
503
504		layers_arr.push( layer );
505		overlay_maps[ cat_name ] = layer;
506		// layerControl.addOverlay( layer, cat_name );
507	});
508
509
510	L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png?lang=he', {
511		attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors | Supported by <a href="https://www.dooble.co.il/" target="_blank">Dooble</a>'
512	}).addTo(map);
513
514
515
516
517	//var selected_icon = new LeafIcon({iconUrl: site_settings.theme_url + '/images/map-marker.171x256.png'});
518	var layerControl = L.control.layers( {}, overlay_maps,{collapsed:false} ).addTo(map);
519
520	// var openTopoMap = L.tileLayer('https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png', {
521	//     maxZoom: 19,
522	//     attribution: 'Map data: © OpenStreetMap contributors, SRTM | Map style: © OpenTopoMap (CC-BY-SA)'
523	// });
524	/*------------------------------------------------------------------------*/
525
526	// jQuery.each( markers_list, function(index, item){
527	// 	L.marker([item.lat, item.long], {
528	// 		icon   : marker_icon,
529	// 		index  : index,
530	// 		address: item.address,
531	// 		events : item.events
532	// 	}).addTo(map).on('click', function(e) { // append .bindPopup(item.popup_text) before addTo function
533	// 		// change current marker icon.
534	// 		// e.target.setIcon(selected_icon);
535	// 		// console.log(item);
536	// 		// center map on marker:
537	// 		map.panTo([item.lat, item.long]);
538	// 		//display marker data:
539	// 		console.log('TEST', e);
540	// 		display_marker_data( e.target.options );
541	// 	});
542	// });
543}
544
545// load full calendar
546document.addEventListener('DOMContentLoaded', function() {
547
548  	var calendarEl = document.getElementById('calendar');
549
550  // 	if( window.innerWidth < 768 ){
551
552		// if (null != calendarEl ) {
553
554		// 	events_list = jQuery.parseJSON(jQuery('.calendar-data').attr('data-events'));
555		// 	// console.log(events_list);
556		// 	var nowdate = new Date().toLocaleDateString('en-ZA', {year: 'numeric', month: '2-digit', day: '2-digit'});
557		// 	var today   = nowdate.replace('/', '-');
558		// 	today       = today.replace('/', '-');
559
560		//     calendarMonthly = new FullCalendar.Calendar(calendarEl, {
561		//         direction: 'rtl',
562		// 		locale: 'he',
563		// 		customButtons: {
564		// 		    current_month_year: {
565		// 		        text: '',
566		// 		        click: function(e) {
567		// 		            e.preventDefault();
568		// 					var view_date = calendarMonthly.getDate().toLocaleDateString('he-IL', { year:"numeric", month:"long"});
569		// 		        }
570		// 		    }
571		// 		},
572		// 		buttonText : {
573		// 			today: 'חזרה להיום'
574		// 		},
575		//         headerToolbar: {
576		//             left   : 'current_month_year, prev,next today',
577		//             center : 'title',
578		//             right  : 'dayGridMonth,timeGridWeek,timeGridDay,listMonth'
579		//         },
580		//         initialDate: today,
581		//         navLinks: true, // can click day/week names to navigate views
582		//         businessHours: false, // display business hours
583		//         editable: false,
584		//         selectable: false,
585		// 		events : events_list,
586		// 		eventDidMount: function(info) {
587		// 			var extendedProps = info.event.extendedProps;
588
589		// 			// console.log(extendedProps);
590		// 			jQuery(info.el).css('background-color', info.backgroundColor);
591		// 			jQuery(info.el).css('color', info.textColor);
592		// 			jQuery(info.el).attr('data-department_id', extendedProps.department_id);
593		// 		},
594		// 		eventTimeFormat : { // like '14:30'
595		// 		    hour     : '2-digit',
596		// 		    minute   : '2-digit',
597		// 			hour12   : false,
598		// 		    meridiem : false
599		// 		},
600		// 		datesSet: function (dateInfo) {
601		// 	        var view      = dateInfo.view;
602		// 	        var view_date = calendarMonthly.getDate().toLocaleDateString('he-IL', { year:"numeric", month:"long"});
603		// 			jQuery('.fc-current_month_year-button').html(view_date);
604		// 	    },
605		//     });
606		//     calendarMonthly.render();
607	 // 	}
608
609  // 	}else{
610
611  // 		if ( null != calendarEl ) {
612  // 		    events_list = jQuery.parseJSON(jQuery('.calendar-data').attr('data-events'));
613
614  // 		    var now = new Date();
615  // 		    var startOfWeek = new Date(now);
616  // 		    startOfWeek.setDate(now.getDate() - now.getDay()); // Adjust to Sunday start
617  // 		    var endOfWeek = new Date(startOfWeek);
618  // 		    endOfWeek.setDate(startOfWeek.getDate() + 6); // End of the week (Saturday)
619
620  // 		    calendar = new FullCalendar.Calendar(calendarEl, {
621  // 		        direction: 'rtl',
622  // 		        locale: 'he',
623  // 		        initialView: 'timeGridWeek', // Weekly view
624  // 		        visibleRange: {
625  // 		            start: startOfWeek,
626  // 		            end: endOfWeek
627  // 		        },
628  // 		        customButtons: {
629  // 		            current_month_year: {
630  // 		                text: '',
631  // 		                click: function (e) {
632  // 		                    e.preventDefault();
633  // 		                    var view_date = calendar.getDate().toLocaleDateString('he-IL', { year: "numeric", month: "long" });
634  // 		                }
635  // 		            }
636  // 		        },
637  // 		        buttonText: {
638  // 		            today: 'חזרה להיום'
639  // 		        },
640  // 		        headerToolbar: {
641  // 		            left: 'current_month_year, prev,next today',
642  // 		            center: 'title',
643  // 		            right: 'dayGridMonth,timeGridWeek,timeGridDay,listMonth'
644  // 		        },
645  // 		        navLinks: true, // Clickable day/week names
646  // 		        businessHours: false,
647  // 		        editable: false,
648  // 		        selectable: false,
649  // 		        events: events_list,
650  // 		        eventDidMount: function (info) {
651  // 		            var extendedProps = info.event.extendedProps;
652  // 		            jQuery(info.el).css('background-color', info.backgroundColor);
653  // 		            jQuery(info.el).css('color', info.textColor);
654  // 		            jQuery(info.el).attr('data-department_id', extendedProps.department_id);
655  // 		        },
656  // 		        eventTimeFormat: {
657  // 		            hour: '2-digit',
658  // 		            minute: '2-digit',
659  // 		            hour12: false,
660  // 		            meridiem: false
661  // 		        },
662  // 		        datesSet: function (dateInfo) {
663  // 		            var view_date = calendar.getDate().toLocaleDateString('he-IL', { year: "numeric", month: "long" });
664  // 		            jQuery('.fc-current_month_year-button').html(view_date);
665  // 		        }
666  // 		    });
667
668  // 		    calendar.render();
669  // 		}
670
671  // 	}
672
673
674  			// document.addEventListener('DOMContentLoaded', function () {
675  			//   var calendarEl = document.getElementById('calendar');
676
677  			//   var calendar = new FullCalendar.Calendar(calendarEl, {
678  			//     initialView: 'dayGridMonth',
679  			//     initialDate: new Date(), // זה מגדיר שהתחלת התצוגה תהיה היום
680  			//     locale: 'he', // אם אתה רוצה עברית
681  			//     // שאר ההגדרות שלך...
682  			//   });
683
684  			//   calendar.render();
685  			// });
686
687
688
689
690  		if (null != calendarEl ) {
691
692  			events_list = jQuery.parseJSON(jQuery('.calendar-data').attr('data-events'));
693  			// console.log(events_list);
694  			var nowdate = new Date().toLocaleDateString('en-ZA', {year: 'numeric', month: '2-digit', day: '2-digit'});
695  			var today   = nowdate.replace('/', '-');
696  			today       = today.replace('/', '-');
697
698  			console.log('xxxxxxxxxxxxxxxxx '+ today);
699
700  		  //   calendarMonthly = new FullCalendar.Calendar(calendarEl, {
701  		  //       direction: 'rtl',
702  				// locale: 'he',
703  			 //    initialDate: new Date(), // זה מגדיר שהתחלת התצוגה תהיה היום
704  				// customButtons: {
705  				//     current_month_year: {
706  				//         text: '',
707  				//         click: function(e) {
708  				//             e.preventDefault();
709  				// 			var view_date = calendarMonthly.getDate().toLocaleDateString('he-IL', { year:"numeric", month:"long"});
710  				//         }
711  				//     }
712  				// },
713  				// buttonText : {
714  				// 	today: 'חזרה להיום'
715  				// },
716  		  //       headerToolbar: {
717  		  //           left   : 'current_month_year, prev,next today',
718  		  //           center : 'title',
719  		  //           right  : 'dayGridMonth,timeGridWeek,timeGridDay,listMonth'
720  		  //       },
721  		  //       initialDate: today,
722  		  //       navLinks: true, // can click day/week names to navigate views
723  		  //       businessHours: false, // display business hours
724  		  //       editable: false,
725  		  //       selectable: false,
726  				// events : events_list,
727  				// eventDidMount: function(info) {
728  				// 	var extendedProps = info.event.extendedProps;
729
730  				// 	// console.log(extendedProps);
731  				// 	jQuery(info.el).css('background-color', info.backgroundColor);
732  				// 	jQuery(info.el).css('color', info.textColor);
733  				// 	jQuery(info.el).attr('data-department_id', extendedProps.department_id);
734  				// },
735  				// eventTimeFormat : { // like '14:30'
736  				//     hour     : '2-digit',
737  				//     minute   : '2-digit',
738  				// 	hour12   : false,
739  				//     meridiem : false
740  				// },
741  				// datesSet: function (dateInfo) {
742  			 //        var view      = dateInfo.view;
743  			 //        var view_date = calendarMonthly.getDate().toLocaleDateString('he-IL', { year:"numeric", month:"long"});
744  				// 	jQuery('.fc-current_month_year-button').html(view_date);
745  			 //    },
746  		  //   });
747  		  //   calendarMonthly.render();
748
749
750  		  const calendarMonthly = new FullCalendar.Calendar(calendarEl, {
751  		      direction: 'rtl',
752  		      locale: 'he',
753  		      initialDate: new Date(),
754  		      customButtons: {
755  		          current_month_year: {
756  		              text: '',
757  		              click: function (e) {
758  		                  e.preventDefault();
759  		                  calendarMonthly.today();
760  		                  updateMonthYearLabel();
761  		                  scrollToToday();
762  		              }
763  		          }
764  		      },
765  		      buttonText: {
766  		          today: 'חזרה להיום'
767  		      },
768  		      headerToolbar: {
769  		          left: 'current_month_year, prev,next today',
770  		          center: 'title',
771  		          right: 'dayGridMonth,timeGridWeek,timeGridDay,listMonth'
772  		      },
773  		      navLinks: true,
774  		      businessHours: false,
775  		      editable: false,
776  		      selectable: false,
777  		      events: events_list,
778  		      eventDidMount: function (info) {
779  		          const extendedProps = info.event.extendedProps;
780  		          jQuery(info.el).css('background-color', info.backgroundColor);
781  		          jQuery(info.el).css('color', info.textColor);
782  		          jQuery(info.el).attr('data-department_id', extendedProps.department_id);
783  		      },
784  		      eventTimeFormat: {
785  		          hour: '2-digit',
786  		          minute: '2-digit',
787  		          hour12: false,
788  		          meridiem: false
789  		      },
790  		      datesSet: function () {
791  		          updateMonthYearLabel();
792  		          scrollToToday();
793  		      }
794  		  });
795
796  		  calendarMonthly.render();
797
798  		  // Update the custom month/year button label
799  		  function updateMonthYearLabel() {
800  		      const viewDate = calendarMonthly.getDate().toLocaleDateString('he-IL', {
801  		          year: 'numeric',
802  		          month: 'long'
803  		      });
804  		      jQuery('.fc-current_month_year-button').html(viewDate);
805  		  }
806
807  		  // Automatically scroll to today inside FullCalendar's scroller
808  		  function scrollToToday() {
809  		      setTimeout(function () {
810  		          const todayCell = jQuery('.fc-day-today');
811  		          const scroller = jQuery('.fc-scroller');
812
813  		          if (todayCell.length && scroller.length) {
814  		              const offsetTop = todayCell.offset().top - scroller.offset().top + scroller.scrollTop();
815  		              const offsetLeft = todayCell.offset().left - scroller.offset().left + scroller.scrollLeft();
816
817  		              scroller.animate({
818  		                  scrollTop: offsetTop - 50,
819  		                  scrollLeft: offsetLeft - 50
820  		              }, 500);
821  		          }
822  		      }, 300);
823  		  }
824
825
826
827  	 	}
828
829  	console.log('yyyyyyyyyyyyyyyyyyyy');
830
831  	// if ( null != calendarEl ) {
832  	//     events_list = jQuery.parseJSON(jQuery('.calendar-data').attr('data-events'));
833
834  	//     var now = new Date();
835  	//     var startOfWeek = new Date(now);
836  	//     startOfWeek.setDate(now.getDate() - now.getDay()); // Adjust to Sunday start
837  	//     var endOfWeek = new Date(startOfWeek);
838  	//     endOfWeek.setDate(startOfWeek.getDate() + 6); // End of the week (Saturday)
839
840  	//     console.log('xxxx');
841
842  	//     calendar = new FullCalendar.Calendar(calendarEl, {
843  	//         direction: 'rtl',
844  	//         locale: 'he',
845  	//         initialView: 'timeGridWeek', // Weekly view
846  	//         visibleRange: {
847  	//             start: startOfWeek,
848  	//             end: endOfWeek
849  	//         },
850  	//         customButtons: {
851  	//             current_month_year: {
852  	//                 text: '',
853  	//                 click: function (e) {
854  	//                     e.preventDefault();
855  	//                     var view_date = calendar.getDate().toLocaleDateString('he-IL', { year: "numeric", month: "long" });
856  	//                 }
857  	//             }
858  	//         },
859  	//         buttonText: {
860  	//             today: 'חזרה להיום'
861  	//         },
862  	//         headerToolbar: {
863  	//             left: 'current_month_year, prev,next today',
864  	//             center: 'title',
865  	//             right: 'dayGridMonth,timeGridWeek,timeGridDay,listMonth'
866  	//         },
867  	//         navLinks: true, // Clickable day/week names
868  	//         businessHours: false,
869  	//         editable: false,
870  	//         selectable: false,
871  	//         events: events_list,
872  	//         eventDidMount: function (info) {
873  	//             var extendedProps = info.event.extendedProps;
874  	//             jQuery(info.el).css('background-color', info.backgroundColor);
875  	//             jQuery(info.el).css('color', info.textColor);
876  	//             jQuery(info.el).attr('data-department_id', extendedProps.department_id);
877  	//         },
878  	//         eventTimeFormat: {
879  	//             hour: '2-digit',
880  	//             minute: '2-digit',
881  	//             hour12: false,
882  	//             meridiem: false
883  	//         },
884  	//         datesSet: function (dateInfo) {
885  	//             var view_date = calendar.getDate().toLocaleDateString('he-IL', { year: "numeric", month: "long" });
886  	//             jQuery('.fc-current_month_year-button').html(view_date);
887  	//         }
888  	//     });
889
890  	//     calendar.render();
891  	// }
892
893 	var todayFilter = true;
894
895	calendar_mobile_ver(todayFilter);
896
897});
898
899function calendar_mobile_ver(todayFilter=false){
900
901	const calendar_header = jQuery('.fc-col-header');
902	const calendar_table = jQuery('.fc-scrollgrid-sync-table');
903
904	if( calendar_table.length && calendar_header.length ){
905
906		let table_html = '<div class ="mobile-calendar">';
907		let month_year = jQuery('.fc-current_month_year-button').text();
908		let data_day   = {};
909
910		calendar_header.find('thead th').each(function( key, val ){
911
912			data_day[ key ] = jQuery(this).find('a').attr('aria-label');
913
914		});
915
916		var additional_dates = [];
917
918		calendar_table.find('tr').each( function( key, val ){
919
920			jQuery(this).find('td').each( function( key_num, val_data ){
921				
922				var day_num     = jQuery(this).find('.fc-daygrid-day-top a').text();
923				var month_num   = 0;
924				var year_num    = parseInt(month_year.split(" ")[1]);
925				var event_link  = jQuery(this).find('.fc-daygrid-day-events a').attr('href');
926				var event_style = jQuery(this).find('.fc-daygrid-day-events a').attr('style');
927				var event_text  = jQuery(this).find('.fc-daygrid-day-events a').html();
928				var days 		= ['ראשון', 'שני', 'שלישי', 'רביעי', 'חמישי', 'שישי', 'שבת'];
929
930				if( month_year.split(" ")[0] == 'ינואר' ) month_num = 1;
931				if( month_year.split(" ")[0] == 'פברואר' ) month_num = 2;
932				if( month_year.split(" ")[0] == 'מרץ' ) month_num = 3;
933				if( month_year.split(" ")[0] == 'אפריל' ) month_num = 4;
934				if( month_year.split(" ")[0] == 'מאי' ) month_num = 5;
935				if( month_year.split(" ")[0] == 'יוני' ) month_num = 6;
936				if( month_year.split(" ")[0] == 'יולי' ) month_num = 7;
937				if( month_year.split(" ")[0] == 'אוגוסט' ) month_num = 8;
938				if( month_year.split(" ")[0] == 'ספטמבר' ) month_num = 9;
939				if( month_year.split(" ")[0] == 'אוקטובר' ) month_num = 10;
940				if( month_year.split(" ")[0] == 'נובמבר' ) month_num = 11;
941				if( month_year.split(" ")[0] == 'דצמבר' ) month_num = 12;
942
943				var baseDate = new Date(year_num,month_num-1,day_num); // just a Monday
944
945				var today 	 = new Date();
946
947				var dayName = days[baseDate.getDay()];
948
949
950				if( typeof event_text !== 'undefined' ){
951
952					// const data_text = data_day[key]+', '+day_num+' '+month_year;
953					const data_text = dayName+', '+day_num+' '+month_year;
954
955					var calc_date = baseDate.getDate()+'-'+(baseDate.getMonth()-1)+'-'+baseDate.getFullYear();
956					
957					var current_date = baseDate.getDate()+'-'+(baseDate.getMonth()+1)+'-'+baseDate.getFullYear();
958
959					// table_html += '<div data-day="'+day_num+'" class="calendar-date-item">';
960					// 	table_html += '<div class="calendar-date">';
961					// 	table_html += data_text;
962					// 	table_html += '</div>';
963					// 	table_html += '<a href="'+event_link+'" class="event-link" style="'+event_style+'">'+event_text+'</a>';
964					// table_html += '</div>';
965
966					const baseDateStr = baseDate.getDate() + '-' + (baseDate.getMonth() + 1) + '-' + baseDate.getFullYear();
967					const todayStr = today.getDate() + '-' + (today.getMonth() + 1) + '-' + today.getFullYear();
968
969					if( (baseDateStr==todayStr && todayFilter) || !todayFilter ){
970
971						jQuery.each(events_list,function(k,v){
972							
973							console.log(v);
974
975							var each_date = new Date(v.start);
976
977							var each_dayName 	= days[each_date.getDay()];
978							
979							var each_day_num 	= each_date.getMonth();
980							
981							var each_month_year = each_date.getFullYear();
982
983							if( each_day_num==0) each_day_num 	= 'ינואר';
984							if( each_day_num==1) each_day_num 	= 'פברואר';
985							if( each_day_num==2) each_day_num 	= 'מרץ';
986							if( each_day_num==3) each_day_num 	= 'אפריל';
987							if( each_day_num==4) each_day_num 	= 'מאי';
988							if( each_day_num==5) each_day_num 	= 'יוני';
989							if( each_day_num==6) each_day_num 	= 'יולי';
990							if( each_day_num==7) each_day_num 	= 'אוגוסט';
991							if( each_day_num==8) each_day_num 	= 'ספטמבר';
992							if( each_day_num==9) each_day_num 	= 'אוקטובר';
993							if( each_day_num==10) each_day_num 	= 'נובמבר';
994							if( each_day_num==11) each_day_num 	= 'דצמבר';
995							
996							var data_text = each_dayName+', '+each_date.getDate()+' '+each_day_num+' '+each_month_year;
997
998							var each_data_text 	= each_date.getDate()+'-'+(each_date.getMonth()-1)+'-'+each_date.getFullYear();
999
1000							var each_event_text = `
1001							<div class="fc-daygrid-event-dot" style="border-color: rgb(40, 156, 128);"></div>
1002							<div class="fc-event-time">`+v.extendedProps.hours+`</div>
1003							<div class="fc-event-title">`+v.title+`</div>
1004							`;
1005
1006							if( each_data_text==calc_date && !additional_dates.includes(v.id) ){
1007
1008								additional_dates.push(v.id);
1009
1010								table_html += '<div data-department_id="'+v.department_id+'" data-day="'+day_num+'" class="calendar-date-item">';
1011									table_html += '<div class="calendar-date">';
1012									table_html += data_text;
1013									table_html += '</div>';
1014									table_html += '<a href="'+v.url+'" class="event-link" style="background-color:'+v.backgroundColor+';color:'+v.textColor+'">'+each_event_text+'</a>';
1015								table_html += '</div>';
1016
1017							}
1018							
1019						});
1020
1021					}
1022
1023
1024
1025				}
1026
1027
1028			});
1029		});
1030
1031		table_html += '</div>';
1032		
1033		console.log(table_html);
1034
1035		jQuery('#calendar-mobile').html( table_html );
1036
1037		var divs = jQuery('#calendar-mobile .calendar-date-item');
1038		var ordered = divs.sort(function(a, b) {
1039		  return jQuery(a).attr('data-day') - jQuery(b).attr('data-day');
1040		});
1041
1042		jQuery('#calendar-mobile .mobile-calendar').empty().html(ordered);
1043
1044	}
1045};
1046
1047function decodeHTMLEntities (str) {
1048  if(str && typeof str === 'string') {
1049    // strip script/html tags
1050    str = str.replace(/<script[^>]*>([\S\s]*?)<\/script>/gmi, '');
1051    str = str.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gmi, '');
1052    element.innerHTML = str;
1053    str = element.textContent;
1054    element.textContent = '';
1055  }
1056
1057  return str;
1058}
1059
1060function theme_set_cookie( cname, cvalue, exdays ) {
1061    var d = new Date();
1062    d.setTime(d.getTime() + ( exdays*24*60*60*1000 ));
1063    var expires = "expires="+ d.toUTCString();
1064    document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
1065}
1066
1067jQuery('.right-sidebar').siblings('.container-small').length && jQuery('.right-sidebar').length && (function(){
1068	var sideMenuHeight = jQuery('.right-sidebar > ul.rightside-submenu').innerHeight() - 51;
1069	var menuTitleHeight = jQuery('.right-sidebar .sidebar-title').length ? (jQuery('.right-sidebar .sidebar-title').innerHeight() + 15) : 0;
1070	sideMenuHeight = sideMenuHeight + menuTitleHeight;
1071	jQuery('.right-sidebar').siblings('.container-small').css('min-height', sideMenuHeight );
1072
1073}());
1074
1075
1076jQuery(document).on("click",".fc-today-button",function(){
1077
1078	console.log('xxxxxxxx');
1079	calendar_mobile_ver();
1080	
1081});
1082
1083jQuery(document).on("click",".fc-button",function(){
1084
1085	calendar_mobile_ver();
1086
1087});

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.