PageSourceSearch

https://www.screvenchristianacademy.com/pro/responsive/js/calendar_base.js?d=20250320

js screvenchristianacademy.com collected 2026-10-08 06:27:10 UTC 3,245 bytes, 97 lines download raw bytes

1// calendar_base.js
2$(function() {
3    $('.calendar_grid_day a.goto_date').click(function(e) {
4        e.preventDefault();
5        var $scope = $(this).closest('div[id^="tool_"]');
6        if($(window).width()<=768 || $scope.is('.detail_minical')) {
7            var $calendarListDay = getCalendarListDay(this.hash, $scope);
8            $('.calendar_list_day', $scope).hide();
9            $('.calendar_list', $scope).show();
10            $calendarListDay.show();
11            $('.calendar_grid td', $scope).removeClass('active');
12            $(this).parents('td').addClass('active');
13            view.scrollTo($calendarListDay);
14        }
15    });
16    $('.with_both .calendar_grid_day a.goto_date').click(function(e) {
17        var $scope = $(this).closest('div[id^="tool_"]');
18        var $calendarListDay = getCalendarListDay(this.hash, $scope);
19        e.preventDefault();	
20        $('.calendar_list_day', $scope).hide();
21        $('.calendar_list', $scope).show();
22        $calendarListDay.show();
23        $('.calendar_grid td', $scope).removeClass('active');
24        $(this).parents('td').addClass('active');
25        view.scrollTo($calendarListDay);
26    });
27});
28
29function date_selected(calendar, cfname, sel_date, detail) {
30    var full_date = new Date(sel_date);
31    var sel_month = full_date.getMonth() + 1;
32    var sel_year = full_date.getFullYear();
33    var sel_day = full_date.getDate();
34    change_date(calendar, cfname, sel_month, sel_year, sel_day, detail);
35}
36
37function change_date(calendar, cfname, sel_month, sel_year, sel_day, detail) {
38    /* call:
39        change_birthdayanniv_date(), or
40        change_calendar_date(), or
41        change_food_menu_date(), or
42        change_renweblunch_date()
43    */
44    window['change_' + calendar + '_date'](cfname, sel_month, sel_year, sel_day, detail);
45}
46
47function show_cat(id, detail) {
48    var $scope = getCalendarContainer(detail);
49    if($('[name="cat_' + detail + '"]', $scope).first().is(':checkbox')) {
50        show_calendar_cat(id, detail);
51    }
52    else {
53        show_food_menu_cat(id, detail);
54    }
55}
56
57function change_view(view, detailId) {
58	var $scope = getCalendarContainer(detailId);
59	if(view.substring(0,3) == 'cal') {
60		$('.calendar_grid', $scope).show(0);
61		$('.calendar_list', $scope).hide(0);
62	}
63	else {
64		$('.calendar_list', $scope).show(0);
65		$('.calendar_grid', $scope).hide(0);
66
67		var $calendarCategoryCheckboxes = $("input[type=checkbox][name^='cat_']", $scope);
68		if($calendarCategoryCheckboxes.length == 0) {
69			$('.calendar_list_event', $scope).show();
70		}
71		else {
72			$calendarCategoryCheckboxes.each(function(index, element) {
73				if(this.checked) {
74					$('.calcat_' + $(this).val(), $scope).show();
75				}
76			});	
77		}
78	}
79	selected_view = view;
80}
81
82function getCalendarContainer(detailId) {
83	return $('#tool_' + detailId);
84}
85
86function getCalendarListDay(hash, $scope) {
87    var dateArray = hash.replace(/[^0-9_]/g, '').split('_');
88    if(dateArray.length == 1) {
89        return $('div.calendar_list_day[data-day="' + dateArray[0] + '"]', $scope);
90    }
91    else if(dateArray.length == 2) {
92        return $('div.calendar_list_day[data-month="' + dateArray[0] + '"][data-day="' + dateArray[1] + '"]', $scope);
93    }
94    else {
95        return $(hash, $scope);
96    }
97}

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.