PageSourceSearch

https://karmuseum.ru/local/templates/museum_mibok_s1/components/bitrix/news.list/modal_event/script.js

js karmuseum.ru collected 2026-10-02 10:46:56 UTC 1,892 bytes, 68 lines download raw bytes

1var width = $(document).width();
2$(document).ready(function () {
3    $('.modal-event-calendar, .modal-event-calendar-input').datepicker({
4        minDate: new Date(),
5        range: true,
6        multipleDatesSeparator: " - ",
7        onSelect: function (formattedDate, date, inst){
8            var arDate = [];
9            for (var keyDate in date) {
10               var dateObj = new Date(date[keyDate]);
11               arDate.push(formatDate(dateObj));
12            }
13            loadElement(arDate)
14        }
15    });
16})
17
18function loadElement(date){
19    var sendData = {};
20    if (date.length == 1){
21        sendData = {
22            'from' : date[0],
23            'to': date[0]
24        }
25    }else if(date.length == 2) {
26        sendData = {
27            'from' : date[0],
28            'to': date[1]
29        }
30    }
31    sendData.getModalListAjax = 'Y';
32    $.ajax({
33        url: window.location.pathname,
34        type: 'post',
35        data: sendData,
36        success: function (response) {
37            $('.modal-event-list').html(response);
38            initEventSlider();
39        }
40
41    });
42}
43
44$(document).on('click', 'a.btn-visit', function (e) {
45    e.preventDefault();
46    $('.modal-event-block').addClass('show');
47    $('body').addClass('show-modal');
48
49    initEventSlider();
50});
51
52$(document).on('click', '.modal-event-block .close', function () {
53    $('.modal-event-block').removeClass('show');
54    $('body').removeClass('show-modal');
55});
56
57function initEventSlider(){
58    setTimeout(function () {
59        if (width <= 1180){
60            new Swiper("#slider_event_calendar", {
61                prevButton: "#slider_event_calendar .slider-main-prev",
62                nextButton: "#slider_event_calendar .slider-main-next",
63                spaceBetween: 0,
64                slidesPerView: 1,
65            })
66        }
67    })
68}

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.