PageSourceSearch

https://auditorienricgranados.cat/++plone++addon.auditori/views/calendar_events.js

js auditorienricgranados.cat collected 2026-09-26 10:27:01 UTC 1,566 bytes, 60 lines download raw bytes

1require([
2    'jquery',
3    'pat-base',
4], function ($, base, PickADate) {
5    'use strict'
6
7    let month = undefined
8    let year = undefined
9    let calendarURL = $('#calendar-wrapper').data('url')
10    let calendarView = $('#calendar-wrapper').data('query_events')
11
12    loadCalendar(month, year)
13
14    $('body').on('click', '.changeMonthBtn', function () {
15        loadCalendar($(this).data('month'), $(this).data('year'))
16    })
17
18    $('body').on('mouseenter', '.calendarList__link', function () {
19        loadEvents(this)
20    })
21
22    function loadCalendar (month, year) {
23        $.ajax({
24            url: calendarURL + '/@@calendar_events_view',
25            data: {
26                month: month,
27                year: year,
28                ajax_load: 1
29            },
30            success: function (data) {
31                $('#calendar-wrapper').replaceWith(data)
32            },
33        })
34    }
35
36    function loadEvents (dayElement) {
37        let day = $(dayElement)
38        let date = day.data('day')
39        let dropdownButton = $('#dropdown-button-events-' + date)
40        let dropdownMenu = $('#dropdown-menu-events-' + date)
41        dropdownButton.click()
42        
43        let loaded = day.data('loaded')
44        if (loaded)
45            return
46
47        day.data('loaded', true)
48        $.ajax({
49            url: calendarURL + '/@@' + calendarView,
50            data: {
51                date: date,
52                ajax_load: 1
53            },
54            success: function (data) {
55                dropdownMenu.html(data)
56            },
57        })
58    }
59
60})

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.