1$(document).ready(function () { 2 // dropdown-select 3 $(document).on("click", ".dropdown-select--with-dropdown .dropdown-select__title", function () { 4 if (event.target.closest(".delete_filter")) return; 5 6 var _this = $(this), 7 menu = _this.parent().find("> .dropdown-select__list"); 8 if (!_this.hasClass("clicked") && menu.length) { 9 _this.addClass("clicked"); 10 11 _this.toggleClass("opened", menu.is(":hidden")); 12 13 menu.stop().slideToggle(100, function () { 14 _this.removeClass("clicked"); 15 }); 16 } 17 }); 18 19 // close select 20 $("html, body").on("mousedown", function (e) { 21 if (typeof e.target.className == "string" && e.target.className.indexOf("adm") < 0) { 22 e.stopPropagation(); 23 $(".dropdown-select .dropdown-select__title.opened").each(function () { 24 if ($(this).closest("#mobilefilter").length || $(this).hasClass("no-html-close")) return; 25 var $select = $(this).closest(".dropdown-select"); 26 if ($select.data("visible_by_class") && $($select.data("visible_by_class")).is(":visible")) return; 27 28 if($(e.target).hasClass('no-html-close')) return; 29 30 if ($select.closest(".bx_filter").length) { 31 if (!$select.closest(".bx_filter").is(":visible")) return; 32 } 33 34 if (!$(e.target).closest($select).length) { 35 $(this).click(); 36 } 37 }); 38 } 39 }); 40 41 // hint 42 $(document).on("click", ".hint", function (e) { 43 let _this = $(this); 44 let target = e.target; 45 46 e.stopImmediatePropagation(); 47 if (!(target.tagName === "A")) { 48 e.preventDefault(); 49 } 50 51 if (!target.closest(".tooltip")) { 52 _this.toggleClass("active").find(".tooltip").stop().slideToggle(200); 53 } 54 }); 55}); 56 57// gallery switch 58$(document).on("click", ".gallery-view_switch__icons:not(.active)", function () { 59 var $this = $(this); 60 var animationTime = 200; 61 var bSmall = $this.hasClass("gallery-view_switch__icons--small"); 62 var $switchGallery = $this.closest(".gallery-view_switch"); 63 var $bigGallery = ( 64 $this.closest(".big_gallery").length ? $this.closest(".big_gallery") : $this.closest(".gallery") 65 ).find(".gallery-big"); 66 var $bigGalleryCounter = $switchGallery.find(".gallery-view_switch__count-wrapper--big"); 67 var $smallGallery = ( 68 $this.closest(".big_gallery").length ? $this.closest(".big_gallery") : $this.closest(".gallery") 69 ).find(".gallery-small"); 70 var $smallGalleryCounter = $switchGallery.find(".gallery-view_switch__count-wrapper--small"); 71 var $toHideGallery = bSmall ? $bigGallery : $smallGallery; 72 var $toHideGalleryCounter = bSmall ? $bigGalleryCounter : $smallGalleryCounter; 73 var $toShowGallery = bSmall ? $smallGallery : $bigGallery; 74 var $toShowGalleryCounter = bSmall ? $smallGalleryCounter : $bigGalleryCounter; 75 76 $this.addClass("active"); 77 $this.siblings(".active").removeClass("active"); 78 79 $toHideGalleryCounter.fadeOut(animationTime, function () { 80 $toShowGalleryCounter.fadeIn(animationTime); 81 }); 82 83 $toHideGallery.fadeOut(animationTime, function () { 84 $toShowGallery.fadeIn(animationTime); 85 }); 86}); 87 88// reload captcha 89$(document).on("click", ".refresh", function (e) { 90 var captcha = $(this).parents(".captcha-row"); 91 e.preventDefault(); 92 $.ajax({ 93 url: arAsproOptions["SITE_DIR"] + "ajax/captcha.php", 94 }).done(function (text) { 95 captcha.find("input[name=captcha_sid],input[name=captcha_code]").val(text); 96 captcha.find("img").attr("src", "/bitrix/tools/captcha.php?captcha_sid=" + text); 97 captcha.find("input[name=captcha_word]").val("").removeClass("error"); 98 captcha.find(".captcha_input").removeClass("error").find(".error").remove(); 99 }); 100});
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.