1/* 2You can use this file with your scripts. 3It will not be overwritten when you upgrade solution. 4*/ 5 6function print1(){ 7 var win=window.open();win.document.write('<img src="/images/map.jpg">');win.print();win.close(); 8} 9 10 11function number_format(number, decimals, dec_point, separator ) { 12 number = (number + '').replace(/[^0-9+\-Ee.]/g, ''); 13 var n = !isFinite(+number) ? 0 : +number, 14 prec = !isFinite(+decimals) ? 0 : Math.abs(decimals), 15 sep = (typeof separator === 'undefined') ? ',' : separator , 16 dec = (typeof dec_point === 'undefined') ? '.' : dec_point, 17 s = '', 18 toFixedFix = function(n, prec) { 19 var k = Math.pow(10, prec); 20 return '' + (Math.round(n * k) / k) 21 .toFixed(prec); 22 }; 23 // ФикÑим баг в IE parseFloat(0.55).toFixed(0) = 0; 24 s = (prec ? toFixedFix(n, prec) : '' + Math.round(n)) 25 .split('.'); 26 if (s[0].length > 3) { 27 s[0] = s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g, sep); 28 } 29 if ((s[1] || '') 30 .length < prec) { 31 s[1] = s[1] || ''; 32 s[1] += new Array(prec - s[1].length + 1) 33 .join('0'); 34 } 35 return s.join(dec); 36} 37 38function LoadCart(){ 39 $.ajax({ 40 url: "/ajax/top_cart.php", 41 type: "GET", 42 dataType: 'html', 43 cache: false, 44 success: function(data){ 45 $("._cart .sdd-header-top-bar__col-inner").html(data); 46 InitTopCart(); 47 }, 48 error: function(xhr, ajaxOptions, thrownError){ 49 50 } 51 }); 52} 53 54 55 56function TopCartDelete(product_id){ 57 58 $.post( '/ajax/item.php', 'delete_item=Y&item='+product_id, $.proxy(function( data ){ 59 // basketFly('open'); 60 // getActualBasket(); 61 // $('.to-cart[data-item='+product_id+']').removeClass("clicked"); 62 })); 63 LoadCart(); 64} 65function InitTopCart(){ 66 if($(".tm-cart-header-pop div").length>0){ 67 $('.tooltipstered').tooltipster({ 68 animation: 'fade', 69 trigger: 'hover', 70 distance: 3, // ÑаÑÑÑоÑние до попапа 71 contentAsHTML: true, // 72 interactive: true, // ÑÑÐ¾Ð±Ñ Ð¼Ð¾Ð¶Ð½Ð¾ бÑло навеÑÑи кÑÑÑÐ¾Ñ Ð¸ ÑÑÐ¾Ð±Ñ Ð¿Ñи ÑÑом не заÑÑÑ Ð°Ð»Ð¾ окно 73 side: 'bottom' 74 }); 75 } 76} 77 78$(document).on('ready', function(){ 79 80 LoadCart(); 81 82 BX.addCustomEvent('onCompleteAction', function(eventdata){ 83 if(eventdata.action === 'loadBasket') 84 LoadCart(); 85 }); 86 87 88 $('.last_text_desc_sect .tree_dots').on('click', function(){ 89 $(this).hide(); 90 $(this).parent('.last_text_desc_sect').find('.hide_desc_text').toggleClass("show_desc_text"); 91 }); 92 93 94 /* Fixed Header Menu */ 95 96 $(window).on("scroll", function() { 97 if ($(window).width() > 767) { 98 if ($(window).scrollTop() > 110) { 99 $('#header-menu').addClass('fixed'); 100 } 101 else { 102 $('#header-menu').removeClass('fixed'); 103 } 104 } 105 }); 106 107 108 /* Tooltipster Cart in Header */ 109 110 $('.aside-categories__item-title .toggler').on('click', function(event) { 111 event.preventDefault(); 112 event.stopPropagation(); 113 114 var curItem = $(this).closest('.aside-categories__item'); 115 116 curItem.toggleClass('_opened'); 117 curItem.find('.aside-subcategories').slideToggle(300); 118 119 }); 120 121 122}); 123 124 125//send cart to Comagic
126var cTargetLocation = { 127 cart: '/order/', 128 confirm: '/order/' 129}; 130if (location.pathname == cTargetLocation.cart && location.search == '') { 131 document.addEventListener('click', function() { 132 var cData = { 133 name: document.querySelector('form#ORDER_FORM input[name="ORDER_PROP_25"]').value, 134 phone: document.querySelector('form#ORDER_FORM input[name="ORDER_PROP_27"]').value, 135 email: document.querySelector('form#ORDER_FORM input[name="ORDER_PROP_26"]').value 136 }; 137 sessionStorage.setItem("cData", JSON.stringify(cData)); 138 }) 139} 140if (location.pathname == cTargetLocation.confirm && (location.search.indexOf('ORDER_ID=') + 1) && sessionStorage.getItem('cData')) { 141 var cData = JSON.parse(sessionStorage.getItem('cData')); 142 var int = setInterval(function() { 143 if (window.Comagic && typeof window.Comagic.addOfflineRequest == 'function') { 144 clearInterval(int); 145 Comagic.addOfflineRequest(cData); 146 sessionStorage.removeItem('cData'); 147 } 148 }, 1000); 149}
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.