PageSourceSearch

https://www.unionmart.ru/bitrix/templates/design2025/js/auth.js

js unionmart.ru collected 2026-10-01 12:36:35 UTC 4,049 bytes, 126 lines download raw bytes

1$(function(){
2
3    // ---------------------------------------------------------
4    // Auth modal
5    // ---------------------------------------------------------
6    var auth_url = '/ajax/auth.php';
7    var auth_timeout = 5000;
8    var auth_error_timeout = 'Внимание! Время ожидания ответа сервера истекло';
9    var auth_error_default = 'Внимание! Произошла ошибка, попробуйте отправить информацию еще раз';
10
11    $('#auth-modal').on('submit','form',function(){
12
13        $.ajax({
14            type: "POST",
15            url: auth_url,
16            data: $(this).serializeArray(),
17            timeout: auth_timeout,
18            error: function(request,error) {
19                if (error == "timeout") {
20                    alert(auth_error_timeout);
21                }
22                else {
23                    alert(auth_error_default);
24                }
25            },
26            success: function(data) {
27                $('#auth-modal .modal-body').html(data);
28                $('#auth-modal .backurl').val(window.location.pathname);
29            }
30        });
31
32        return false;
33    });
34
35    $('#open-register').on('click', function(){
36        $('#auth-modal').modal('show');
37        $.ajax({
38            type: "GET",
39            url: $(this).attr('href'),
40            timeout: auth_timeout,
41            error: function(request,error) {
42                if (error == "timeout") {
43                    alert(auth_error_timeout);
44                }
45                else {
46                    alert(auth_error_default);
47                }
48            },
49            success: function(data) {
50                $('#auth-modal .modal-body').html(data);
51                $('#auth-modal .backurl').val(window.location.pathname);
52            }
53        });
54
55        return false;
56    });
57
58    $('#auth-modal').on('click','.ajax-link',function(){
59        $.ajax({
60            type: "GET",
61            url: $(this).attr('href'),
62            timeout: auth_timeout,
63            error: function(request,error) {
64                if (error == "timeout") {
65                    alert(auth_error_timeout);
66                }
67                else {
68                    alert(auth_error_default);
69                }
70            },
71            success: function(data) {
72                $('#auth-modal .modal-body').html(data);
73                $('#auth-modal .backurl').val(window.location.pathname);
74            }
75        });
76        return false;
77    });
78
79    $('#auth-modal').on('click','.reload-captcha',function(){
80
81        var reload_captcha = $(this);
82        reload_captcha.find('.uk-icon-refresh').addClass('uk-icon-spin');
83
84        $.ajax({
85            type: "GET",
86            url: $(this).attr('href'),
87            timeout: auth_timeout,
88            error: function(request,error) {
89                if (error == "timeout") {
90                    alert(auth_error_timeout);
91                }
92                else {
93                    alert(auth_error_default);
94                }
95            },
96            success: function(data) {
97                $('#auth-modal .bx-captcha').html(data);
98                reload_captcha.find('.uk-icon-refresh').removeClass('uk-icon-spin');
99            }
100        });
101
102        return false;
103    });
104
105    $('#open-auth, .open-auth').on('click', function(){
106            $('#auth-modal').modal('show');
107            $.ajax({
108                type: "POST",
109                url: auth_url,
110                timeout: auth_timeout,
111                error: function(request,error) {
112                    if (error == "timeout") {
113                        alert(auth_error_timeout);
114                    }
115                    else {
116                        alert(auth_error_default);
117                    }
118                },
119                success: function(data) {
120                    $('#auth-modal .modal-body').html(data);
121                    $('#auth-modal .backurl').val(window.location.pathname);
122                }
123            });
124
125    });
126});

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.