PageSourceSearch

https://dedmorozmos.ru/local/media/js/additional.js

js dedmorozmos.ru collected 2026-10-02 10:20:59 UTC 3,284 bytes, 89 lines download raw bytes

1$(document).ready(function (){
2
3    $(document).on("click", ".js-change-season", function (e) {
4        e.preventDefault();
5        var value = $(this).data('value');
6        $.ajax({
7            type: 'POST',
8            url: '/local/ajax/change-season.php',
9            data: {summer:value},
10            //dataType: 'json',
11            dataType: 'html',
12            success: function (data) {
13
14                if(data != 'error'){
15                    location.reload();
16                }
17
18            },
19            error: function( jqXHR,textStatus, errorThrown) {
20                console.log(textStatus);
21                console.log(errorThrown);
22            }
23        });
24
25    });
26
27    $(document).on("submit", ".js-process-form", function (e) {
28        e.preventDefault();
29        var formData = new FormData($(this)[0]);
30        var form = $(this).closest('form');
31        form.find('.form__field.-error, .form__agreement.-error').removeClass('-error');
32        form.addClass('load');
33        $.ajax({
34            type: 'POST',
35            url: form.attr('action'),
36            data: formData,
37            dataType: 'json',
38            contentType: false,
39            processData: false,
40            success: function (data) {
41                form.removeClass('load');
42                if (data['status']) {
43                    $.fancybox.close();
44                    //openMessage('Our specialist will contact you within an hour.');
45                    form.trigger('reset');
46                } else {
47                    for (var $k in data['errors']) {
48                        if (form.find('input[name="' + $k + '"]').length > 0) {
49                            form.find('input[name="' + $k + '"]').closest('.form__field').addClass('-error');
50                        }
51                        if (form.find('input[name="' + $k + '"]').length > 0) {
52                            form.find('input[name="' + $k + '"]').closest('.form__agreement').addClass('-error');
53                        }
54                        if (form.find('textarea[name="' + $k + '"]').length > 0) {
55                            form.find('textarea[name="' + $k + '"]').closest('.form__field').addClass('-error');
56                        }
57                    }
58                }
59                if (typeof data['message'] != 'undefined') {
60                    openMessage(data['message'], data.lang == 'ru' ? 'Закрыть' : 'Close');
61                }
62                if (data['error']) {
63                    openMessage(data['error'], 'Закрыть');
64                }
65            }
66        });
67    });
68
69    function openMessage(message, btnText="Отправлено", autoclose) {
70        if (typeof autoclose === 'undefined')
71            autoclose = true;
72
73        $.fancybox.close();
74
75        var dom = '<div class="subscription-status">\n' +
76            ' <div class="subscription-status__text z1 text-center">' + message + '</div>\n' +
77            '<div class="subscription-status__msg-wrapper"><button class="subscription-status__msg" data-fancybox-close>' + btnText + '</button></div>\n' +
78            '</div>';
79
80        $.fancybox.open(dom);
81
82        /*if (autoclose) {
83            setTimeout(function () {
84                $.fancybox.close();
85            }, 2500);
86        }*/
87    }
88
89});

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.