1$(document).ready(function () { 2 3 4 console.log("ready!"); 5 6 $('.js_coupon_next, .js_coupon_prev').on('click', function () { 7 $('.coupon-section').toggleClass('active'); 8 }); 9 $('.js_coupon_close').on('click', function () { 10 $('.coupon-wrapper-bg').fadeOut(); 11 }); 12 $('.js_coupon_send').on('click', function () { 13 var formName = $('[name=C_NAME]').val().length; 14 var formEmail = $('[name=C_EMAIL]').val().length; 15 if (formName == 0 || formEmail == 0) { 16 alert('ÐаполниÑе вÑе полÑ'); 17 return false; 18 } 19 sendAjaxForm(); 20 return false; 21 }); 22 23 /* for discount 20 start */ 24 /*$('.sticker-new, .sticker-hit').remove(); 25 $('.product_item').each(function(index){ 26 if($(this).find('.sticker-discount').length==0){ 27 $(this).children().append('<div class="sticker-discount-new"></div>'); 28 } 29 });*/ 30 /* for discount 20 end */ 31 32 33 /* menu active check start */ 34 var active_section = $('#js_active_section').attr('data-menu-active'); 35 $('.menu_v2-inner li#' + active_section).addClass('active-menu-item'); 36 if (active_section == 'action') { 37 $('.menu_v2-inner .last-child-wrapper').addClass('active-menu-item'); 38 } 39 /* menu active check end */ 40 41}); 42 43 44$(window).load(function () { 45 console.log("ready22"); 46 $('.product_item .rating').fadeIn(); 47 $('.reviews .reviews_list .review_info .rating').fadeIn(); 48}); 49 50function addPhoneMask(id) { 51 /*$(id).mask("8 (999) 999-99-99"); 52 $(id).prop('autocomplete', 'off'); 53 $(id).prop('placeholder', '8 (___) ___-__-__');*/ 54 $(id).attr("onfocus", "$(this).mask('8 (999) 999-99-99');if (this.value==='') this.value='8 (';") 55} 56 57function customFormBasket() { 58 //$('div[data-property-id-row=6]').before('<h4 class="m0">2. Ðак ÐÑ Ñ Ð¾ÑиÑе полÑÑиÑÑ Ð·Ð°ÐºÐ°Ð·?</h4>'); 59 $('#sale_order_props').show(); 60 $('#order_form_content').find('a.slide').hide(); 61} 62 63function couponPopupShow() { 64 $('.coupon-wrapper-bg').fadeIn(); 65} 66 67function sendAjaxForm() { 68 $.ajax({ 69 url: '/ajax/coupon.php', 70 type: "POST", 71 dataType: "html", 72 data: $("#ajax_form").serialize(), 73 success: function (response) { 74 result = $.parseJSON(response); 75 if (result['ERROR'] === false) { 76 $('.coupon-section_form').html(result['TEXT']); 77 $('.coupon-section_inner-item.two .inner-item_title').remove(); 78 $('.inner-item_fail').remove(); 79 $('.coupon-section_logo').addClass('finish'); 80 } else { 81 if (result['ERROR'] === true) { 82 if (result['ERROR_CODE'] === 2) { 83 alert(result['TEXT_ERROR']); 84 } 85 } 86 } 87 }, 88 error: function (jqXHR, textStatus, errorThrown) { 89 console.log('Error: ' + errorThrown); 90 alert('ЧÑо-Ñо поÑло не Ñак. ÐопÑобÑйÑе полÑÑиÑÑ ÐаÑÑ ÑÐºÐ¸Ð´ÐºÑ Ð¿Ð¾Ð·Ð¶Ðµ.'); 91 } 92 }); 93} 94 95function deliveryChecked() { 96 $('[name=PAY_SYSTEM_ID]').each(function () { 97 if ($(this).prop('checked') === true) { 98 $(this).parent().parent().addClass('bx_block_active') 99 } 100 }); 101 $('[name=DELIVERY_ID]').each(function () { 102 if ($(this).prop('checked') === true) { 103 $(this).parent().parent().addClass('bx_block_active') 104 } 105 }); 106}; 107 108function popupShow(id) { 109 $('#' + id).fadeIn(); 110} 111 112function popupClose(id) { 113 if (!!id) { 114 $('#' + id).fadeOut(); 115 } else { 116 $('.popup-wrapper-bg').fadeOut(); 117 } 118} 119 120//submitForm(); 121 122function changePlaceholder(el) { 123 var placeholderText = $(el).val(); 124 $('input#coupon').attr('placeholder', placeholderText); 125} 126 127function addErrorTextForInput() { 128 $('input[name=ORDER_PROP_1]').after('<p class="error_prop error_prop_1">введиÑе ÐаÑе имÑ</p>'); 129 $('input[name=ORDER_PROP_2]').after('<p class="error_prop error_prop_2">введиÑе Email</p>'); 130 $('input[name=ORDER_PROP_3]').after('<p class="error_prop error_prop_3">введиÑе Ð½Ð¾Ð¼ÐµÑ ÑелеÑона</p>'); 131 $('textarea[name=ORDER_PROP_7]').after('<p class="error_prop error_prop_7">ÐаполниÑе адÑÐµÑ Ð´Ð¾ÑÑавки</p>'); 132 133 $('input[name=ORDER_PROP_22]').after('<p class="error_prop error_prop_22">ÐаполниÑе ÑлиÑÑ Ð´Ð¾ÑÑавки</p>'); 134 $('input[name=ORDER_PROP_23]').after('<p class="error_prop error_prop_23">ÐаполниÑе ÐÐ¾Ð¼ÐµÑ Ðома</p>'); 135 $('input[name=ORDER_PROP_25]').after('<p class="error_prop error_prop_25">ÐаполниÑе подÑезд</p>'); 136 $('input[name=ORDER_PROP_26]').after('<p class="error_prop error_prop_26">ÐаполниÑе кваÑÑиÑÑ</p>'); 137 138 $('input[name=ORDER_PROP_29]').after('<p class="error_prop error_prop_29">ÐаполниÑе ÑÑаж</p>'); 139} 140 141function testfunc(){
142 console.log(213123); 143} 144 145function nextStep(step, stepPrevBool) { 146 var optUser = false; 147 if ($('html').hasClass("opt-user")) { 148 optUser = true; 149 } 150 /* lang construction START */ 151 if (optUser === false) { 152 var step1text = '1. ÐонÑакÑÐ½Ð°Ñ Ð¸Ð½ÑоÑмаÑиÑ'; 153 var step2text = '2. Ðак ÐÑ Ñ Ð¾ÑиÑе полÑÑиÑÑ Ð·Ð°ÐºÐ°Ð·?'; 154 var step3text = '3. Ðак Ðам бÑÐ´ÐµÑ Ñдобнее оплаÑиÑÑ Ð·Ð°ÐºÐ°Ð·?'; 155 var step4text = '4. Скидки к заказÑ'; 156 } else { 157 var step1text = '1. ÐонÑакÑÐ½Ð°Ñ Ð¸Ð½ÑоÑмаÑиÑ'; 158 var step2text = '2. ÐаÑе меÑÑоположение'; 159 var step3text = '3. СпоÑоб полÑÑÐµÐ½Ð¸Ñ Ð¸ оплаÑÑ'; 160 var step4text = '4. ТоваÑÑ Ð² заказе'; 161 } 162 /* lang construction END */ 163 164 var inputName = $('input[name=ORDER_PROP_1]').val(); 165 var inputPhone = $('input[name=ORDER_PROP_2]').val(); 166 var inputEmail = $('input[name=ORDER_PROP_3]').val(); 167 var inputAddress = $('textarea[name=ORDER_PROP_7]').val(); 168 var inputAddressStreet = $('input[name=ORDER_PROP_22]').val(); 169 var inputAddressDom = $('input[name=ORDER_PROP_23]').val(); 170 var inputAddressPod = $('input[name=ORDER_PROP_25]').val(); 171 var inputAddressKv = $('input[name=ORDER_PROP_26]').val(); 172 var inputAddressFloor = $('input[name=ORDER_PROP_29]').val(); 173 var error = false; 174 var errorStep2 = false; 175 if (inputName.length === 0) { 176 error = true; 177 $('.error_prop_1').fadeIn(); 178 } else { 179 $('.error_prop_1').fadeOut(); 180 } 181 if (inputPhone.length === 0) { 182 error = true; 183 $('.error_prop_2').fadeIn(); 184 } else { 185 $('.error_prop_2').fadeOut(); 186 } 187 if (inputEmail.length === 0) { 188 error = true; 189 $('.error_prop_3').fadeIn(); 190 } else { 191 $('.error_prop_3').fadeOut(); 192 } 193 if (step == 3) { 194 if (inputAddressStreet !== undefined) { 195 if (inputAddressStreet.length === 0) { 196 errorStep2 = true; 197 $('.error_prop_22').fadeIn(); 198 } else { 199 $('.error_prop_22').fadeOut(); 200 } 201 } 202 if (inputAddressDom !== undefined) { 203 if (inputAddressDom.length === 0) { 204 errorStep2 = true; 205 $('.error_prop_23').fadeIn(); 206 } else { 207 $('.error_prop_23').fadeOut(); 208 } 209 } 210 if (inputAddressPod !== undefined) { 211 if (inputAddressPod.length === 0) { 212 errorStep2 = true; 213 $('.error_prop_25').fadeIn(); 214 } else { 215 $('.error_prop_25').fadeOut(); 216 } 217 } 218 if (inputAddressKv !== undefined) { 219 if (inputAddressKv.length === 0) { 220 errorStep2 = true; 221 $('.error_prop_26').fadeIn(); 222 } else { 223 $('.error_prop_26').fadeOut(); 224 } 225 } 226 if (inputAddressFloor !== undefined) { 227 if (inputAddressFloor.length === 0) { 228 errorStep2 = true; 229 $('.error_prop_29').fadeIn(); 230 } else { 231 $('.error_prop_29').fadeOut(); 232 } 233 } 234 } 235 236 if (error === true) { 237 return false; 238 } 239 if (errorStep2 === true && step == 3) { 240 return false; 241 } 242 var nextStepInt = step + 1; 243 var prevStepInt = step - 1; 244 $('.basket-section').hide(); 245 $('.basket-section[data-section=' + step + ']').fadeIn(); 246 $('#js_next_btn').attr('onClick', 'nextStep(' + nextStepInt + ');'); 247 $('#js_prev_btn').attr('onClick', 'nextStep(' + prevStepInt + ', true);'); 248 249 if (stepPrevBool === true) { 250 $('div[data-number=' + nextStepInt + ']').removeClass('active'); 251 $('div[data-number=' + step + ']').addClass('active'); 252 $('div[data-number=' + step + ']').removeClass('complete'); 253 } else { 254 $('div[data-number=' + prevStepInt + ']').addClass('complete'); 255 $('div[data-number=' + prevStepInt + ']').removeClass('active'); 256 $('div[data-number=' + step + ']').addClass('active'); 257 } 258 259 $('.table_total_wrapper').hide(); 260 $('#ORDER_CONFIRM_BUTTON').hide(); 261 $('#js_next_btn').fadeIn(); 262 if (step === 1) { 263 $('#js-basket-title').html(step1text); 264 $('#js_prev_btn').addClass('hide'); 265 $('.mobile-step').attr('data-step', '1'); 266 } 267 if (step === 2) { 268 $('#js-basket-title').html(step2text); 269 $('#js_prev_btn').removeClass('hide'); 270 $('.mobile-step').attr('data-step', '2'); 271 history.pushState({}, '', '?step=2'); 272 } 273 if (step === 3) { 274 $('#js-basket-title').html(step3text); 275 $('#js_prev_btn').removeClass('hide'); 276 $('.mobile-step').attr('data-step', '3'); 277 history.pushState({}, '', '?step=3'); 278 } 279 if (step === 4) { 280 $('#js_next_btn').hide(); 281 $('.table_total_wrapper').fadeIn(100); 282 $('#ORDER_CONFIRM_BUTTON').css('display', 'inline-block'); 283 $('#js-basket-title').html(step4text); 284 $('#js_prev_btn').removeClass('hide'); 285 $('.mobile-step').attr('data-step', '4'); 286 history.pushState({}, '', '?step=4'); 287 } 288 //$('#ButtonName').removeAttr('onclick'); 289} 290 291 292function setBasketCount() { 293 $.ajax({
294 url: '/ajax/set_basket_count.php', 295 type: "POST", 296 dataType: "html", 297 //data: $("#ajax_form").serialize(), 298 success: function (response) { 299 var result = $.parseJSON(response); 300 $('.basket__button-counter').html(result); 301 }, 302 error: function (jqXHR, textStatus, errorThrown) { 303 console.log('Error: ' + errorThrown); 304 alert('ЧÑо-Ñо поÑло не Ñак. ÐопÑобÑйÑе полÑÑиÑÑ ÐаÑÑ ÑÐºÐ¸Ð´ÐºÑ Ð¿Ð¾Ð·Ð¶Ðµ.'); 305 } 306 }); 307} 308 309/* пеÑеклÑÑаÑÐµÐ»Ñ Ñабов на главной (блок Ð¥Ð¸Ñ Ð¿Ñодаж) */ 310$('.bestseller-header__item').on('click', function () { 311 $('.bestseller-header__item').removeClass('active'); 312 $(this).addClass('active'); 313 var num = $(this).attr('data-num'); 314 $('.bestseller-body__item').removeClass('active'); 315 $('.bestseller-body__item[data-num="' + num + '"]').addClass('active'); 316}); 317 318 319$('a.header__burger-custom').on('click', function () { 320 $('#menu__mobile').show("slide", { 321 direction: "left" 322 }, 250); 323 $('#menu__mobile-wrap').fadeIn(250); 324 return false; 325}); 326$('#menu__mobile-wrap, .menu__mobile-close').on('click', function () { 327 $('#menu__mobile').hide("slide", { 328 direction: "left" 329 }, 250); 330 $('#menu__mobile-wrap').fadeOut(250); 331}); 332$('.search__open').on('click', function () { 333 $('.hdr-body_search').fadeIn(); 334 $('.search__close').fadeIn(); 335 $('#search-query-header').focus(); 336}); 337$('.search__close').on('click', function () { 338 $('.hdr-body_search').fadeOut(); 339}); 340 341 342$('.product-item-detail-buy-button').on('click', function () { 343 setTimeout(setCountProdBasket, 1000); 344}); 345 346function setCountProdBasket() { 347 $.ajax({ 348 url: '/ajax/set_basket_count2.php', 349 type: "POST", 350 dataType: "html", 351 //data: $("#ajax_form").serialize(), 352 success: function (response) { 353 var result = $.parseJSON(response); 354 $('.hdr-body_basket a').html(result['d']); 355 $('.basket__count span').html(result['m']); 356 }, 357 error: function (jqXHR, textStatus, errorThrown) { 358 console.log('Error: ' + errorThrown); 359 alert('ЧÑо-Ñо поÑло не Ñак. ÐопÑобÑйÑе полÑÑиÑÑ ÐаÑÑ ÑÐºÐ¸Ð´ÐºÑ Ð¿Ð¾Ð·Ð¶Ðµ.'); 360 } 361 }); 362} 363 364function replaceAll(string, search, replace) { 365 return string.split(search).join(replace); 366} 367 368function showPropDetailProd(skuID) { 369 $.ajax({ 370 url: '/ajax/prop_detail_prop.php', 371 type: "POST", 372 dataType: "html", 373 data: { 374 ID: skuID, 375 }, 376 success: function (response) { 377 var result = $.parseJSON(response); 378 if (result.KOMPLEKTATSIYA !== null) { 379 $('.komplekt__section').show(); 380 $('.komplekt__section p').empty().append(replaceAll(result.KOMPLEKTATSIYA, ".,", "<br>")); 381 } else { 382 $('.komplekt__section').hide(); 383 } 384 }, 385 error: function (jqXHR, textStatus, errorThrown) { 386 $('.komplekt__section').hide(); 387 } 388 }); 389} 390/* 391document.querySelectorAll('form').forEach(form => { 392 form.addEventListener('keydown', function(e) { 393 if (e.key === 'Enter') { 394 e.preventDefault(); // ÐÑменÑем ÑÑандаÑÑное поведение 395 return false; 396 } 397 }); 398}); 399*/ 400/*function podmenaSisFunc() { 401 $('.hdr-body_contacts-phone-nn, .menu__mobile-top_phone').html('+7(499)286-88-72').attr('href', 'tel:+74992868872'); 402 $('.hdr-body_contacts-email-nn, .menu__mobile-top_email').html('[email protected]').attr('href', 'mailto:[email protected]'); 403} 404setTimeout(podmenaSisFunc, 740);*/ 405 406 407/*$(document).ready(function(){ 408 var myBlock = document.getElementById("menu__mobile-wrap"); 409 // вÑзов ÑÑнкÑии swipe Ñ Ð¿ÑедваÑиÑелÑнÑми наÑÑÑойками 410 swipe(myBlock, { maxTime: 1000, minTime: 100, maxDist: 150, minDist: 60 }); 411 // обÑабоÑка Ñвайпов 412 myBlock.addEventListener("swipe", function() { 413 console.log(e.detail); 414 }); 415});*/
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.