PageSourceSearch

https://eshop.klinovec.cz/cz/templates/default/assets/js/shop.app.js

js klinovec.cz collected 2026-10-02 17:49:59 UTC 6,700 bytes, 248 lines download raw bytes

1/*
2 * Template Name: 1215pass
3 * Description: Business, Corporate, Portfolio, E-commerce and Blog Theme.
4 * Author: Martin Dobry
5 * Website: http://mycrony.cz
6*/
7
8var App = function () {
9
10    function handleBootstrap() {
11        /*Bootstrap Carousel*/
12        jQuery('.carousel').carousel({
13            interval: 15000,
14            pause: 'hover'
15        });
16
17        /*Tooltips*/
18        jQuery('.tooltips').tooltip();
19        jQuery('.tooltips-show').tooltip('show');
20        jQuery('.tooltips-hide').tooltip('hide');
21        jQuery('.tooltips-toggle').tooltip('toggle');
22        jQuery('.tooltips-destroy').tooltip('destroy');
23
24        /*Popovers*/
25        jQuery('.popovers').popover();
26        jQuery('.popovers-show').popover('show');
27        jQuery('.popovers-hide').popover('hide');
28        jQuery('.popovers-toggle').popover('toggle');
29        jQuery('.popovers-destroy').popover('destroy');
30    }
31
32    function handleSearchV1() {
33        jQuery('.search-button').click(function () {
34            jQuery('.search-open').slideDown();
35        });
36
37        jQuery('.search-close').click(function () {
38            jQuery('.search-open').slideUp();
39        });
40
41        jQuery(window).scroll(function(){
42          if(jQuery(this).scrollTop() > 1) jQuery('.search-open').fadeOut('fast');
43        });
44
45    }
46
47    function handleToggle() {
48        jQuery('.list-toggle').on('click', function() {
49            jQuery(this).toggleClass('active');
50        });
51
52        /*
53        jQuery('#serviceList').on('shown.bs.collapse'), function() {
54            jQuery(".servicedrop").addClass('glyphicon-chevron-up').removeClass('glyphicon-chevron-down');
55        }
56
57        jQuery('#serviceList').on('hidden.bs.collapse'), function() {
58            jQuery(".servicedrop").addClass('glyphicon-chevron-down').removeClass('glyphicon-chevron-up');
59        }
60        */
61    }
62
63    function handleBoxed() {
64        jQuery('.boxed-layout-btn').click(function(){
65            jQuery(this).addClass("active-switcher-btn");
66            jQuery(".wide-layout-btn").removeClass("active-switcher-btn");
67            jQuery("body").addClass("boxed-layout container");
68        });
69        jQuery('.wide-layout-btn').click(function(){
70            jQuery(this).addClass("active-switcher-btn");
71            jQuery(".boxed-layout-btn").removeClass("active-switcher-btn");
72            jQuery("body").removeClass("boxed-layout container");
73        });
74    }
75
76    function handleHeader() {
77         jQuery(window).scroll(function() {
78            if (jQuery(window).scrollTop()>100){
79                jQuery(".header-fixed .header-static").addClass("header-fixed-shrink");
80            }
81            else {
82                jQuery(".header-fixed .header-static").removeClass("header-fixed-shrink");
83            }
84        });
85    }
86
87    function handleMegaMenu() {
88        $(document).on('click', '.mega-menu .dropdown-menu', function(e) {
89            e.stopPropagation()
90        })
91    }
92
93  // Please Wait
94  function handlePleaseWait() {
95  	var is_box_visible = true;
96		$(document).mouseleave(function(e){
97	    if ((e.clientY < 0)&&(is_box_visible === true)) {
98      	$('.g-popup-wrapper').show();
99      	if ($('.g-popup-wrapper').is(':visible')) $('body').addClass('g-blur');
100	    }
101		});
102    $('.g-popup__close').on('click', function(e) {
103      $('.g-popup-wrapper').hide();
104      $('body').removeClass('g-blur');
105      is_box_visible = false;
106    });
107  }
108  
109  	function shopBasketAjax() {
110  		
111  		$(".shop-basket ul").html('<li>loading...</li>');
112  		
113  		$('#AjaxBasket').mouseover(function() {
114  			
115  			var number = parseInt($('.badge-sea').html());
116  			
117  			if(number < 1) {
118  				
119  				$(".shop-basket .badge-open").hide();
120  				
121  			} else {
122  				
123  				$(".shop-basket .badge-open").show();
124  			
125	  			$.ajax({ 
126		            type: 'POST', 
127		            url: '/script/ajax.buy.php', 
128		            data: {
129	          			action: function() {
130	        	  			return 'basket';
131	          			}
132		            }, 
133		            dataType: 'json',
134		            success: function (data) {
135		            	$(".shop-basket ul").html(data.li)
136		            	$(".subtotal-cost").html(data.total+' Kč');
137		            	
138		            	$('.mCustomScrollbar').mCustomScrollbar({
139		                    theme:"minimal",
140		                    scrollInertia: 300,
141		                    scrollEasing: "linear"
142		                });
143		            }
144		        });
145  			
146  			}
147  		});
148  		
149  		
150  		$('#clear_basket').on('click', function() {
151  			$.ajax({ 
152	            type: 'POST', 
153	            url: '/script/ajax.buy.php', 
154	            data: {
155          			action: function() {
156        	  			return 'dellall';
157          			}
158	            }, 
159	            dataType: 'json',
160	            success: function (data) {
161	            	
162	            	$('#basketProduct').html("<li>&nbsp;</li>");
163	            	$('.badge-sea').html("0");
164	            	$(".subtotal-cost").html('0.00 Kč');
165	            	
166	            }
167	        });
168  		});
169  		
170  	}
171
172    return {
173        init: function () {
174        	
175        	$(".shop-basket .badge-open").hide();
176        	
177        	
178            handleBootstrap();
179            handleSearchV1();
180            handleToggle();
181            handleBoxed();
182            handleHeader();
183            handleMegaMenu();
184            //handlePleaseWait();
185            shopBasketAjax();
186            
187            /*
188            
vendor: 163 bytes, lines 188-191
188window.dataLayer = window.dataLayer || [];
189            function gtag(){dataLayer.push(arguments);}
190            gtag('js', new Date());
191            gtag('config', '
191UA-18813166-15
vendor: 16 bytes, lines 191-192
191');
192            
192*/
193            
194
195			
196			$('.backgo').on("click", function() {
197				window.history.back();
198				return false;
199			});
200        },
201
202        initScrollBar: function () {
203            jQuery('.mCustomScrollbar').mCustomScrollbar({
204                theme:"minimal",
205                scrollInertia: 300,
206                scrollEasing: "linear"
207            });
208        },
209
210        initCounter: function () {
211            jQuery('.counter').counterUp({
212                delay: 10,
213                time: 1000
214            });
215        },
216
217        initParallaxBg: function () {
218            jQuery('.parallaxBg').parallax("50%", 0.2);
219            jQuery('.parallaxBg1').parallax("50%", 0.4);
220        }
221    };
222
223}();
224
225
226
227function shopBasketAjaxDel(id) {
228	
229	$.ajax({ 
230        type: 'POST', 
231        url: '/script/ajax.buy.php', 
232        data: {
233  			action: function() {
234	  			return 'delete';
235  			},
236  			id: function() {
237	  			return id;
238  			}
239        }, 
240        dataType: 'json',
241        success: function (data) {
242        	$('.badge-sea').html(data.count);
243        	$('#productList'+id).hide();
244        	
245        }
246    });
247	
248}

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.