1// reload 2function orderListReload() 3{ 4 $.post( 5 '/ajax/cart.php', 6 function(data) 7 { 8 $('.order-list').html($(data).find('.order-list').html()); 9 $('.total .totals').html($(data).find('.total .totals').html()); 10 //sendCriteoData(); 11 } 12 ); 13} 14 15// обновление малой коÑÐ·Ð¸Ð½Ñ 16function basketLineReload(){ 17 $.post( 18 location.href, 19 function(data){ 20 $('#top-basket-line').html($(data).find('#top-basket-line').html()); 21 } 22 ); 23} 24 25$(document).ready(function() 26 { 27 var s = 0; 28 setInterval(function() { 29 s += 1; 30 }, 1000); 31 // Смена мейнпиков 32 $(function(){ 33 $(".mainpic-images img").stop().hide().eq(0).show(); 34 $(".mainpic-previews li").click(function(){ 35 $(".mainpic-previews li").removeClass("selected"); 36 $(this).addClass("selected"); 37 $(".mainpic-images img").stop().fadeOut(400); 38 $(".mainpic-images #"+$(this).data('image')).stop().fadeIn(400); 39 $(".mainpic-info").stop().hide(200); 40 $('#video-container').hide(); // 09.04.2015 "tony 41 $('.mainpic-shadow').hide(); // 21.04.2015 "tony 42 }); 43 $(".mainpic-previews li:first-child").click(function(){ 44 $(".mainpic-info").stop().show(200); 45 $('.mainpic-shadow').show(); // 21.04.2015 "tony 46 }); 47 }); 48 49 // Смена вкладок в комменÑаÑиÑÑ 50 $(function () { 51 var tabContainers = $('.comments-tabs .comments-tab'); 52 tabContainers.fadeOut().filter(':first').show(); 53 54 $('.comments-nav div').click(function () { 55 tabContainers.stop().fadeOut(200); 56 tabContainers.filter($(this).data("href")).stop().fadeIn(600); 57 $('.comments-nav div').removeClass('active'); 58 $(this).addClass('active'); 59 return false; 60 }).filter(':first').click(); 61 }); 62 63 // вÑпадалка 64 $('.popover-trigger').click(function(){ 65 // $(this).parent().toggleClass('top-layer'); 66 $(this).toggleClass('opened'); 67 $(this).siblings(".popover-content").stop().toggle(200); 68 $(".popover-overlay").toggle(); 69 }); 70 71 $('.popover-close').click(function(){ 72 $('.popover-trigger').removeClass('opened'); 73 $(".popover-content").stop().hide(); 74 $(".popover-overlay").hide(); 75 // $('.popover-trigger').parent().removeClass('top-layer'); 76 }); 77 78 $(".popover-overlay").click(function(){ 79 // $('.popover-trigger').parent().removeClass('top-layer'); 80 $('.popover-trigger').removeClass('opened'); 81 $(".popover-content").stop().hide(); 82 $(this).hide(); 83 }); 84 85 // ÐÑкÑÑвание нÑжной вкладки в комменÑаÑиÑÑ 86 $(".action-nav .review-item-link").click(function(){ 87 $('.comments-nav-link').eq(2).click(); 88 }); 89 $(".action-nav .comments-link").click(function(){ 90 $('.comments-nav-link').eq(1).click(); 91 }); 92 $(".action-nav .reviews-link").click(function(){ 93 $('.comments-nav-link').eq(0).click(); 94 }); 95 96 // СкÑÑÑие/показ ÑоÑÐ¼Ñ Ð´Ð»Ñ Ð¾ÑвеÑа комменÑаÑÐ¸Ñ 97 $(".comment .request").click(function(){ 98 $(this).parent().parent().siblings(".request-block").toggle(200); 99 }); 100 101 $(".rating-star").click(function(){ 102 var mark = $(this).data("mark"); 103 $(".review-rating").removeClass("star1"); 104 $(".review-rating").removeClass("star2"); 105 $(".review-rating").removeClass("star3"); 106 $(".review-rating").removeClass("star4"); 107 $(".review-rating").removeClass("star5"); 108 $(".review-rating").addClass("star"+mark); 109 $("#selectedMark").val(mark); 110 }); 111 112 // from script_layout.js 113 //ÐакÑепленнÑе ÑлеменÑÑ 114 // if ($(".action-nav")) { 115 // $(".action-nav").autofix_anything(); 116 // if (document.body.clientHeight > 658) 117 // $(".floating").autofix_anything(); 118 // } 119/* 120 $(window).resize(function() { 121 $(".sidebar-new.floating").css("left", $(".content").offset().left + 800); 122 $(".action-nav").css("left", $(".content").offset().left); 123 124 if (document.body.clientHeight > 658) 125 $(".floating").autofix_anything(); 126 $(".action-nav").autofix_anything(); 127 }); 128 129 $(window).resize(); 130 131 $(window).scroll(function() { 132 if ($(window).scrollLeft() > 0) { 133 $(".sidebar-new.floating").css("left", $(".content").offset().left + 800 - $(window).scrollLeft()); 134 $(".action-nav").css("left", $(".content").offset().left - $(window).scrollLeft()); 135 }; 136 }); 137*/ 138 // end from script_layout.js 139 140 // ÐÑÐ±Ð¾Ñ Ð²Ð°ÑианÑа подаÑка 141 $(function(){ 142 //$("#selected_cost_type").val($(".cost-line:first-child").data('variant')); 143 $("#selected_cost_type").val($(".cost-line.selected").data('variant')); 144 $(".cost-line").click(function(){ 145 var variant = $(this).data('variant'); 146 $("#selected_cost_type").val(variant); 147 $('.cost-line').removeClass("selected"); 148 $('.cost-line[data-variant = "'+variant+'"]').addClass("selected"); 149 }); 150 }); 151 152 // video 153 $('#play-video-btn').click(function() 154 { 155 $('#play-video-trigger').click(); 156 var video = $("#video-container").data("video"); 157 if (video) { 158 $("#video-container").html("<iframe id=\"vimeo-player\" src=\"https://player.vimeo.com/video/" + video + "?api=1\" width=\"" + $(".mainpic-images").width() + "\" height=\"" + $(".mainpic-images").height() + "\" frameborder=\"0\" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>"); 159 } 160 161 $('#video-container').show(); 162 } 163 ); 164 165 166 $(".service-buy-btn").click(function(e){ 167 e.preventDefault(); 168 if (!$(this).hasClass("disabled")) { 169 var id = $("#selected_cost_type").val(); 170 171 $.post( 172 '/ajax/basket_add2.php', 173 { 174 id: id 175 }, 176 function (data) { 177 console.log(data); 178 //alert(JSON.stringify(data)); 179 if (data.quantity) { 180 $(".top-basket-link-quantity").html(data.quantity); 181 $(".basket-link-mobile__quantity").html(data.quantity); 182 } 183 $("#basketAddPopupBtn").click(); 184 //window.location.href = "/basket/"; 185 /* 186 console.log(data); 187 if (data.success) { 188 console.log('rrr'); 189 window.location.href = "/basket/"; 190 } 191 */ 192 }, 193 'json' 194 ); 195 } 196 }); 197 198 /* 199 // Add to basket 200 $('#sidebar-buy-buttons, #center-buy-buttons, #bottom-buy-buttons').on('click', '.service-buy-btn, .service-add-link', function (e) { 201 e.preventDefault(); 202 203 if (!$(this).hasClass("disabled")) { 204 var selectedProduct = $('#selected_cost_type').val(); 205 206 var el = $(this); 207 208 $.post( 209 '/ajax/basket_add.php', 210 { 211 PRODUCT_ID: selectedProduct, 212 COUPON_TYPE: '' // Ð´Ð»Ñ ÑовмеÑÑимоÑÑи 213 }, 214 function (data) { 215 216 217 218 // open basket/order popup 219 if (el.hasClass('service-buy-btn')) { 220 window.location.href = "/basket/"; 221 //showBasket(); 222 } else { 223 // обновиÑÑ ÑпиÑок ÑоваÑов и малÑÑ ÐºÐ¾Ñзин
223Ñ 224 orderListReload(); 225 basketLineReload(); 226 } 227 } 228 ); 229 } 230 231 }); 232 */ 233 234 $('#sidebar-buy-buttons, #center-buy-buttons, #bottom-buy-buttons').on('click', '.service-buy-btn', function() 235 { 236 yaCounter37422695.reachGoal('BUTTON_BUY'); 237 } 238 ); 239 240 // One click 241 242 243 var fastOrderProcessing = false; 244 $('#fast-order-form').submit(function(e) 245 { 246 e.preventDefault(); 247 //clearCoupon(); 248 var form = $(this); 249 var itemId = $('.buy-block .cost-line.selected').data('variant'); 250 251 $("#fastOrderItemId").val(itemId); 252 253 var result = checkAllFormValids(form, '.popup-error'); 254 // console.log($(this).serialize()); 255 // $("#modal-7 .md-close").click(); 256 // $("#fast-order-success-btn").click(); 257 //return 0; 258 if (result == true && !fastOrderProcessing){ 259 fastOrderProcessing = true; 260 $("#modal-7 .btn-pink").addClass("disabled-bnt"); 261 $(".send-text").css({visibility:"visible"}); 262 263 var url = form.attr('action'); 264 265 var name = form.find('input[name=username]').val(); 266 var phone = form.find('input[name=phone]').val(); 267 var page = location.href; 268 $("#modal-7 .send-text").addClass("sending"); 269 $.post( 270 url, 271 ($(this).serialize() + '&s=' + s), 272 function(data){ 273 $("#modal-7 .md-close").click(); 274 $("#fast-order-success-btn").click(); 275 if (data.s) { 276 var selectItem = ($(".buy-block .cost-line.selected")); 277 var id = selectItem.data("variant"); 278 var price = selectItem.data("intprice"); 279 if (id && price) { 280 var productsCriteo = { 281 id: id, 282 price: price, 283 quantity: 1 284 }; 285 window.criteo_q.push( 286 { event: "setAccount", account: 26568 }, 287 { event: "setSiteType", type: "d" }, 288 { event: "setEmail", email: '[email protected]' }, 289 { event: "trackTransaction", id: data.transactionId, item: [productsCriteo]} 290 ); 291 } 292 293 if (data.sellactionId) { 294 var selId = data.sellactionId; 295 var minPrice = false; 296 $(".buy-block .cost-list .cost-line").each(function(){ 297 var strPrice = $(this).find('[itemprop="price"]').attr("content"); 298 var intPrice = parseInt(strPrice.replace(new RegExp(" ",'g'),"")); 299 if (minPrice === false) { 300 minPrice = intPrice; 301 } else { 302 minPrice = Math.min(minPrice, intPrice); 303 } 304 }); 305 if (minPrice) { 306 selId += minPrice + '.00'; 307 } 308 $("#sellactionImg").html('<img src="http://sellaction.net/reg.php?id=' + selId + '&order_id=' + data.orderId + '" height="1" width="1" />'); 309 } 310 311 312 313 // // close popup / show confirm 314 // $('div.md-overlay').click(); 315 // form.find('.confirm-trigger').click(); 316 317 // 26.10.2015, ownedmuhaha 318 // СÑÑÑÑик Collector 319 (function(_,r,e,t,a,i,l){_['retailCRMObject']=a;_[a]=_[a]||function(){(_[a].q=_[a].q||[]).push(arguments)};
319_[a].l=1*new Date();l=r.getElementsByTagName(e)[0];i=r.createElement(e);i.async=!0;i.src=t;l.parentNode.insertBefore(i,l)})(window,document,'script','https://collector.retailcrm.ru/w.js','_rc'); 320 321 _rc('create', 'RC-66205973576-3', { 322 'customerId': data.USER_ID 323 }); 324 325 _rc('send', 'pageView'); 326 //------------------------- 327 dataLayer.push({ 328 'event': 'pagePhoneComplete', 329 'transactionId': data.transactionId, 330 'transactionTotal': 7, 331 'transactionProfit': 7, 332 'transactionProducts': [{ 333 'sku' : 'phoneorder', 334 'name' : 'phoneorder', 335 'price' : 7, 336 'quantity' : 1 337 }] 338 }); 339 } 340 }, 341 'json' 342 ).always(function(){ 343 fastOrderProcessing = false; 344 $("#modal-7 .btn-pink").removeClass("disabled-bnt"); 345 $(".send-text").css({visibility:"hidden"}); 346 $("#modal-7 .send-text").removeClass("sending"); 347 }); 348 349 if (window.yaCounter37422695 !== undefined) { 350 yaCounter37422695.reachGoal('QUICK_ORDER'); 351 } 352 } 353 354 return false; // block submit 355 356 } 357 ); 358 359 // one click remove errors 360 $('#fast-order-form').on('focus', 'input', function(){ 361 $(this).removeClass('error'); 362 var currentLabel = $(this).parent(); 363 currentLabel.find('.popup-error').removeClass('active'); 364 }); 365 366 // close one click confirm 367 $('#modal-8 .confirm-close-btn').click(function() 368 { 369 $('div.md-overlay').click(); 370 } 371 ); 372 373 } 374);
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.