1$(document).on('click', '.tariffs-list__tabs__item', function(){ 2 var $this = $(this); 3 4 if(!$this.hasClass('current')){ 5 var index = $this.index(); 6 $this.addClass('current').siblings().removeClass('current'); 7 8 var $price = $this.closest('.tariffs-list__tabs').next('.tariffs-list__tabs-content').find('.tariffs-list__tabs-content__item').eq(index); 9 $price.removeClass('hidden').siblings().addClass('hidden'); 10 11 var name = $this.data('name'); 12 var $popupBlock = $this.closest('.js-popup-block'); 13 14 var $data = $popupBlock.find('[data-item]'); 15 if($data.length){ 16 var data = $data.data('item'); 17 if(typeof data !== 'undefined' && data){ 18 data.NAME = name; 19 data.PROPERTY_FILTER_PRICE_VALUE = $this.data('filter_price'); 20 data.PROPERTY_PRICE_VALUE = $this.data('price'); 21 data.PROPERTY_PRICEOLD_VALUE = $this.data('oldprice'); 22 $data.data('item', data); 23 } 24 } 25 26 var $buttonForm = $popupBlock.find('.btn-actions__inner .btn[data-event=jqm]'); 27 if($buttonForm.length){ 28 $buttonForm.each(function(){ 29 $(this).attr("data-autoload-need_product", name); 30 $(this).attr("data-autoload-product", name); 31 $(this).attr("data-autoload-service", name); 32 $(this).attr("data-autoload-project", name); 33 $(this).attr("data-autoload-news", name); 34 $(this).attr("data-autoload-sale", name); 35 $(this).clone().insertAfter($(this)); 36 $(this).remove(); 37 }); 38 } 39 } 40}); 41 42$(document).on('click', '.tariffs-list .tab-nav__item', function (){ 43 var $this = $(this); 44 45 if(!$this.hasClass('active')){ 46 var price_key = $this.data('price_key'); 47 48 if(typeof price_key !== 'undefined' && price_key.toString().length){ 49 $tab = $this.closest('.tariffs-list').find('.tab-content-block[data-price_key=' + price_key + ']'); 50 51 if($tab.length){ 52 $this.addClass('active').siblings().removeClass('active'); 53 $tab.addClass('active').siblings().removeClass('active'); 54 55 if(!$this.hasClass('clicked')){ 56 $this.addClass('clicked'); 57 58 $.ajax({ 59 url: '?BLOCK=tariffs&AJAX_REQUEST=Y&ajax_get=Y', 60 type: 'POST', 61 data: { 62 tariffs_price_key: price_key, 63 }, 64 success: function(response){ 65 $tab.removeClass('loading-state'); 66 67 var obData = BX.processHTML(response); 68 69 $tab[0].innerHTML = obData.HTML; 70 setTimeout(function () { 71 BX.ajax.processScripts(obData.SCRIPT); 72 }, 0); 73 } 74 }); 75 } 76 } 77 } 78 } 79}); 80 81$(document).on('click', '.tariffs-list__item-properties-item-more', function(e) { 82 e.stopImmediatePropagation(); 83 84 var $this = $(this); 85 var $collapsed = $this.closest('.tariffs-list__item-text-top-part').find('.collapsed'); 86 87 if($collapsed.length) { 88 $collapsed.slideToggle(200); 89 var toggletext = $this.data('toggletext'); 90 var toggletextNew = $this.text(); 91 $this.text(toggletext).data('toggletext', toggletextNew); 92 } 93}); 94 95$(document).ready(function(){ 96 $('.tariffs-list .tab-nav-wrapper').scrollTab({ 97 tabs_wrapper: ".tab-nav", 98 tab_item: "> .tab-nav__item", 99 width_grow: 3, 100 outer_wrapper: ".tariffs-list .index-block__title-wrapper", 101 onResize: function (options) { 102 const top_wrapper = options.outer_wrapper_node; 103 let all_width = top_wrapper[0].getBoundingClientRect().width; 104 if (top_wrapper.length) { 105 const tabs_wrapper = options.scrollTab; 106 107 if (window.matchMedia("(max-width: 767px)").matches) { 108 tabs_wrapper.css({ 109 // 'width': '100%', 110 "max-width": all_width, 111 }); 112 return true; 113 } 114
115 const title = top_wrapper.find(".index-block__title-wrapper .index-block__part--left"); 116 const right_link = top_wrapper.find(".index-block__part--right"); 117 if (title.length) { 118 all_width -= title.outerWidth(true); 119 } 120 121 if (right_link.length) { 122 all_width -= right_link.outerWidth(true); 123 } 124 125 all_width -= Number.parseInt(tabs_wrapper.css("margin-left")); 126 all_width -= Number.parseInt(tabs_wrapper.css("margin-right")); 127 128 tabs_wrapper.css({ 129 "max-width": all_width, 130 width: "", 131 }); 132 } 133 options.width = all_width; 134 }, 135 }); 136});
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.