1InitMenuNavigationAim = function () { 2 var $block = $(".menu-navigation__sections-wrapper .menu-navigation__sections:not(.aim-init)"); 3 if ($block.length) { 4 $block.addClass("aim-init"); 5 BX.loadScript(arAsproOptions["SITE_TEMPLATE_PATH"] + "/vendor/js/jquery.menu-aim.js", function () { 6 $block.menuAim({ 7 firstActiveRow: true, 8 rowSelector: "> .menu-navigation__sections-item", 9 activate: function activate(a) { 10 var _this = $(a), 11 index = _this.index(), 12 items = _this.closest(".menu-navigation__sections-wrapper").next(), 13 link = _this.find("> a"); 14 15 _this.siblings().find("> a").addClass("dark_link"); 16 link.addClass("colored_theme_text").removeClass("dark_link"); 17 items.find(".parent-items").siblings().hide(); 18 items.find(".parent-items").eq(index).show(); 19 }, 20 deactivate: function deactivate(a) { 21 var _this = $(a), 22 index = _this.index(), 23 items = _this.closest(".menu-navigation__sections-wrapper").next(), 24 link = _this.find("> a"); 25 26 link.removeClass("colored_theme_text").addClass("dark_link"); 27 items.find(".parent-items").siblings().hide(); 28 }, 29 }); 30 }); 31 } 32}; 33 34$(document).ready(function () { 35 //dropdown-select 36 $(document).on("click", ".dropdown-select .dropdown-select__title", function () { 37 var _this = $(this), 38 menu = _this.parent().find("> .dropdown-select__list"), 39 bVisibleMeu = menu.is(":visible"), 40 animate = !bVisibleMeu ? "transition.slideUpIn" : "fadeOut"; 41 42 if (!_this.hasClass("clicked")) { 43 _this.addClass("clicked"); 44 45 menu.velocity("stop").velocity(animate, { 46 duration: 300, 47 // delay: 250, 48 begin: function () { 49 _this.toggleClass("opened"); 50 }, 51 complete: function () { 52 _this.removeClass("clicked"); 53 }, 54 }); 55 } 56 }); 57 58 // close select 59 $("html, body").on("mousedown", function (e) { 60 if (typeof e.target.className == "string" && e.target.className.indexOf("adm") < 0) { 61 e.stopPropagation(); 62 63 if (!$(e.target).closest(".dropdown-select").length) { 64 $(".dropdown-select .dropdown-select__title.opened").click(); 65 } 66 } 67 }); 68 /**/ 69 70 /*side head block*/ 71 $(document).on("click", ".slide-block .slide-block__head", function (e) { 72 var _this = $(this), 73 menu = _this.siblings(".slide-block__body"), 74 bVisibleMeu = menu.is(":visible"), 75 animate = bVisibleMeu ? "slideUp" : "slideDown"; 76 77 if (!_this.hasClass("clicked") && menu.length && !_this.hasClass("ignore") && !$(e.target).attr("href")) { 78 var type = _this.data("id"); 79 _this.addClass("clicked"); 80 81 if (bVisibleMeu) $.cookie(type + "_CLOSED", "Y"); 82 else $.removeCookie(type + "_CLOSED"); 83 84 menu.velocity("stop").velocity(animate, { 85 duration: 150, 86 // delay: 250, 87 begin: function () { 88 _this.toggleClass("closed"); 89 }, 90 complete: function () { 91 _this.removeClass("clicked"); 92 93 if (typeof window["stickySidebar"] !== "undefined") { 94 window["stickySidebar"].updateSticky(); 95 } 96 }, 97 }); 98 } 99 }); 100 /**/ 101 102 /*sku change props*/ 103 if (!("SelectOfferProp" in window) && typeof window.SelectOfferProp != "function") { 104 SelectOfferProp = function () { 105 // return false; 106 var _this = $(this), 107 obParams = {}, 108 obSelect = {}, 109 objUrl = parseUrlQuery(), 110 add_url = "", 111 selectMode = _this.hasClass("list_values_wrapper") ? true : false, 112 container = _this.closest(".bx_catalog_item_scu"), 113 img = _this.closest(".item-parent").find(".thumb img"), 114 bDetail = _this.closest(".product-main").length; 115 116 /* request params */ 117 obParams = { 118 PARAMS: bDetail ? $(".js-sku-config").data("params") : _this.closest(".js_wrapper_items").data("params"), 119 ID: container.data("offer_id"), 120 SITE_ID: container.data("site_id"), 121 LINK_ID: container.data("id") + "_" + (bDetail ? "detail" : _this.closest(".cur").data("c
121ode")), 122 IBLOCK_ID: container.data("offer_iblockid"), 123 IBLOCK_ID_PARENT: container.data("iblockid"), 124 PROPERTY_ID: container.data("propertyid"), 125 DEPTH: _this.closest(".item_wrapper").index(), 126 VALUE: selectMode ? _this.find("option:selected").data("onevalue") : _this.data("onevalue"), 127 CLASS: "inner_content", 128 PICTURE: img.data("src") ? img.data("src") : img.attr("src"), 129 ARTICLE_NAME: _this.closest(".item-parent").find(".article_block").data("name"), 130 ARTICLE_VALUE: _this.closest(".item-parent").find(".article_block").data("value"), 131 }; 132 /**/ 133 134 if ("clear_cache" in objUrl) { 135 if (objUrl.clear_cache == "Y") add_url += "?clear_cache=Y"; 136 } 137 138 let isActiveContainer = container.hasClass("js-selected"); 139 // set active 140 $(".bx_catalog_item_scu").removeClass("js-selected"); 141 container.addClass("js-selected"); 142 143 /* save selected values */ 144 for (i = 0; i < obParams.DEPTH + 1; i++) { 145 strName = "PROP_" + container.find(".item_wrapper:eq(" + i + ") > div").data("id"); 146 if (container.find(".item_wrapper:eq(" + i + ") select").length) { 147 obSelect[strName] = container.find(".item_wrapper:eq(" + i + ") select option:selected").data("onevalue"); 148 obParams[strName] = container.find(".item_wrapper:eq(" + i + ") select option:selected").data("onevalue"); 149 } else { 150 obSelect[strName] = container.find(".item_wrapper:eq(" + i + ") li.item.active").data("onevalue"); 151 obParams[strName] = container.find(".item_wrapper:eq(" + i + ") li.item.active").data("onevalue"); 152 } 153 } 154 155 // obParams.SELECTED = JSON.stringify(obSelect); 156 /**/ 157 158 if (!selectMode) { 159 _this.siblings().removeClass("active"); 160 _this.addClass("active"); 161 } 162 163 if (_this.attr("title")) { 164 var skuVal = _this.attr("title").split(":")[1]; 165 _this.closest(".item_wrapper").find(".show_class .val").text(skuVal); 166 } else { 167 var img_row = _this.find(" > i"); 168 if (img_row.length && img_row.attr("title")) { 169 var skuVal = img_row.attr("title").split(":")[1]; 170 _this.closest(".item_wrapper").find(".show_class .val").text(skuVal); 171 } 172 } 173 174 /* get sku */ 175 if (window.obOffers && typeofExt(obOffers) === "array" && isActiveContainer) { 176 //from /ajax/js_item_detail.php 177 selectedValues = obSelect; 178 strPropValue = obParams["VALUE"]; 179 depth = obParams["DEPTH"]; 180 //wrapper = item; 181 arFilter = {}; 182 tmpFilter = []; 183 184 UpdateSKUInfoByProps(); 185 finalActionSKUInfo(_this); 186 } else { 187 /* get sku */ 188 $.ajax({ 189 url: arMaxOptions["SITE_DIR"] + "ajax/js_item_detail.php" + add_url, 190 type: "POST", 191 data: obParams, 192 }).success(function (html) { 193 var ob = BX.processHTML(html); 194 BX.ajax.processScripts(ob.SCRIPT); 195 finalActionSKUInfo(_this); 196 }); 197 } 198 function finalActionSKUInfo(th) { 199 if ($(".counter_wrapp.list")) { 200 $(".counter_wrapp.list .counter_block.big").removeClass("big"); 201 } 202 var sku_props = th.closest(".sku_props").find(".item_wrapper .item.active"); 203 $.each(sku_props, function (index, value) { 204 value = $(value); 205 if (value.attr("title")) { 206 var skuVal = value.attr("title").split(":")[1]; 207 value.closest(".item_wrapper").find(".show_class .val").text(skuVal); 208 } else { 209 var img_row = value.find(" > i"); 210 if (img_row.length && img_row.attr("title")) { 211 var skuVal = img_row.attr("title").split(":")[1]; 212 value.closest(".item_wrapper").find(".show_class .val").text(skuVal); 213 } 214 } 215 }); 216 } 217 }; 218 $(document).on("click", ".ajax_load .bx_catalog_item_scu li.item", SelectOfferProp); 219 $(document).on("change", ".ajax_load .bx_catalog_item_scu select.list_values_wrapper", SelectOfferProp); 220 //detail 221 $(document).on("click", ".bx_catalog_item_scu.sku_in_detail li.item", SelectOfferProp); 222 $(document).on("change", ".bx_catalog_item_scu.sku_in_detail select.list_values_wrapper", SelectOfferProp); 223 } 224 225 /**/ 226 227 /**/ 228 $(".switch-item-block .switch-item-block__icons").on("click", function () { 229 var $this = $(this), 230 animationTime = 200; 231 232 if ($this.hasClass("switch-item-block__icons--small") && !$this.hasClass("active")) { 233 $this.addClass("active"); 234 $this.siblings(".switch-item-block__icons--big").removeClass("active"); 235 $this 236 .closest(".switch-item-block") 237 .find(".switch-item-block__count-wrapper--big") 238 .fadeOut(animationTime, function () { 239 $this.closest(".switch-item-block").find(".switch-item-block__count-wrapper--small").fadeIn(animationTime); 240 }); 241 242 $this 243 .closest(".switch-item-block") 244 .siblings(".big-gallery-block") 245 .fadeOut(animationTime, function () { 246 $this.closest(".switch-item-block").siblings(".small-gallery-block").fadeIn(animationTime); 247 }); 248 } else if ($this.hasClass("switch-item-block__icons--big") && !$this.hasClass("active")) { 249 $this.addClass("active"); 250 $this.siblings(".switch-item-block__icons--small").removeClass("active"); 251 $this 252 .closest(".switch-item-block") 253 .find(".switch-item-block__count-wrapper--small") 254 .fadeOut(animationTime, function () { 255 $this.closest(".switch-item-block").find(".switch-item-block__count-wrapper--big").fadeIn(animationTime); 256 }); 257 258 $this 259 .closest(".switch-item-block") 260 .siblings(".small-gallery-block") 261 .fadeOut(animationTime, function () { 262 $this.closest(".switch-item-block").siblings(".big-gallery-block").fadeIn(animationTime); 263 }); 264 } 265 setTimeout(function () { 266 InitLazyLoad(); 267 }, 300); 268 }); 269 /**/ 270 271 /*many items menu*/ 272 273 // InitMenuNavigationAim(); 274 /**/ 275});
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.