PageSourceSearch

https://shop.matusz-vad.hu/assets/js/user.js?v=1790869455

js matusz-vad.hu collected 2026-10-01 15:44:24 UTC 6,530 bytes, 201 lines download raw bytes

1$(function () {
2    /*$('.button-checkbox').each(function () {
3
4        // Settings
5        var $widget = $(this),
6            $button = $widget.find('button'),
7            $checkbox = $widget.find('input:checkbox'),
8            color = $button.data('color'),
9            settings = {
10                on: {
11                    icon: 'glyphicon glyphicon-check'
12                },
13                off: {
14                    icon: 'glyphicon glyphicon-unchecked'
15                }
16            };
17
18        // Event Handlers
19        $button.on('click', function () {
20            $checkbox.prop('checked', !$checkbox.is(':checked'));
21            $checkbox.triggerHandler('change');
22            updateDisplay();
23        });
24        $checkbox.on('change', function () {
25            updateDisplay();
26        });
27
28        // Actions
29        function updateDisplay() {
30            var isChecked = $checkbox.is(':checked');
31
32            // Set the button's state
33            $button.data('state', (isChecked) ? "on" : "off");
34
35            // Set the button's icon
36            $button.find('.state-icon')
37                .removeClass()
38                .addClass('state-icon ' + settings[$button.data('state')].icon);
39
40            // Update the button's color
41            if (isChecked) {
42                $button
43                    .removeClass('btn-default')
44                    .addClass('btn-' + color + ' active');
45            }
46            else {
47                $button
48                    .removeClass('btn-' + color + ' active')
49                    .addClass('btn-default');
50            }
51        }
52
53        // Initialization
54        function init() {
55
56            updateDisplay();
57
58            // Inject the icon if applicable
59            if ($button.find('.state-icon').length == 0) {
60                $button.prepend('<i class="state-icon ' + settings[$button.data('state')].icon + '"></i>');
61            }
62        }
63        init();
64    });*/
65    
66    $(".from_time").on('focus', function () {
67        previous_value_from = $(this).val();
68    })
69
70    $(".from_time").change(function() {
71        var val = $(this).val();
72
73        if($(this).val() < '06:00'){
74            alert(shipping_start);
75        }
76
77        if(val > '18:00'){
78            alert(shipping_end);
79        }
80
81        var valuestart = val;
82        var valuestop = $('.to_time[day='+$(this).attr('day')+']').val();
83
84        var d2 = new Date('2038-01-19 '+valuestart);
85        var d1 = new Date('2038-01-19 '+valuestop);
86
87        var seconds =  (d1-d2)/1000;
88
89        if(broaderShippingTime == 1){                
90            if(seconds > 32400){
91                var msg = confirm(shipping_time_options_error_1);
92                if (msg){
93                    $(this).find("option[value='"+previous_value_from+"']").prop('selected', true);
94                } else{
95                    $(this).find("option[value='"+previous_value_from+"']").prop('selected', true);
96                }
97            }
98        } else{
99            if(seconds > 7200){
100                var msg = confirm(shipping_time_options_error_2);
101                if (msg){
102                    $(this).find("option[value='"+previous_value_from+"']").prop('selected', true);
103                } else{
104                    $(this).find("option[value='"+previous_value_from+"']").prop('selected', true);
105                }
106            }
107        }
108
109        if(seconds <= 0){
110            var msg = confirm(shipping_time_options_error_3);
111            if (msg){
112                $(this).find("option[value='"+previous_value_to+"']").prop('selected', true);
113            } else{
114                $(this).find("option[value='"+previous_value_to+"']").prop('selected', true);
115            }
116        }
117    });
118
119    $(".to_time").on('focus', function () {
120        previous_value_to = $(this).val();
121    })
122
123    $(".to_time").change(function() {
124        var val = $(this).val();
125
126        if(val > '18:00'){
127            alert(shipping_start);
128        }
129
130        if($(this).val() < '06:00'){
131            alert(shipping_end);
132        }
133
134        var valuestart = $('.from_time[day='+$(this).attr('day')+']').val();
135        var valuestop = val;
136
137        var d2 = new Date('2038-01-19 '+valuestart);
138        var d1 = new Date('2038-01-19 '+valuestop);
139
140        var seconds =  (d1-d2)/1000;
141
142        if(broaderShippingTime == 1){                
143            if(seconds > 32400){
144                var msg = confirm(shipping_time_options_error_1);
145                if (msg){
146                    $(this).find("option[value='"+previous_value_to+"']").prop('selected', true);
147                } else{
148                    $(this).find("option[value='"+previous_value_to+"']").prop('selected', true);
149                }
150            }
151        } else{
152            if(seconds > 7200){
153                var msg = confirm(shipping_time_options_error_2);
154                if (msg){
155                    $(this).find("option[value='"+previous_value_to+"']").prop('selected', true);
156                } else{
157                    $(this).find("option[value='"+previous_value_to+"']").prop('selected', true);
158                }
159            }
160        }
161
162        if(seconds <= 0){
163            var msg = confirm(shipping_time_options_error_3);
164            if (msg){
165                $(this).find("option[value='"+previous_value_to+"']").prop('selected', true);
166            } else{
167                $(this).find("option[value='"+previous_value_to+"']").prop('selected', true);
168            }
169        }
170
171    });
172    
173    $('.save-shipping-excluded-time').click(function(e){
174        e.preventDefault();
175        
176        var url = $(this).closest('form').attr('action');
177        var myform = $(this).closest('form').serialize();
178        var call = false;
179
180        if(call === false) {
181            call = true;
182            
183            $.ajax({
184                type: 'post',
185                url: url,
186                data: myform,
187                dataType: 'json',
188                success: function(html){
189                    console.log(html);
190                    if(html.status == false) {
191                        swal('', html.msg, 'success');
192                    } else if(html.status == true) {
193                        swal(upsz_login, html.msg, 'error');
194                    }
195
196                    call = false;
197                }
198            });
199        }
200    });
201});

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.