1(function($) { 2 /* 3 * Create magnificPopup for coverflow carousel 4 */ 5 $(document).ready(function() { 6 function swiperMagnificPopup(wrapper, imageClass, moduleName) { 7 const moduleWrapper = $(wrapper).find('.swiper-wrapper') 8 const { lightbox } = moduleWrapper.data(); 9 const moduleAnchor = $(`${wrapper}`).find(`${imageClass}`); 10 11 if (moduleWrapper.length > 0 && "on" === lightbox) { 12 moduleWrapper.each(function() { 13 const that = `.${$(this) 14 .parent() 15 .parent() 16 .parent() 17 .parent() 18 .attr("class") 19 .split(" ") 20 .join(".")} ${wrapper} .swiper-wrapper`; 21 22 $(that).magnificPopup({ 23 removalDelay: 500, 24 delegate: `${imageClass}`, 25 type: "image", 26 gallery: { 27 enabled: true, 28 navigateByImgClick: true, 29 tCounter: "%curr% of %total%", // Markup for "1 of 7" counter 30 }, 31 image: { 32 markup: 33 `<div class="mfp-figure dnxte-${moduleName}-mfp-config">` + 34 '<div class="mfp-close"></div>' + 35 '<div class="mfp-img"></div>' + 36 '<div class="mfp-bottom-bar">' + 37 '<div class="mfp-title"></div>' + 38 '<div class="mfp-counter"></div>' + 39 "</div>" + 40 "</div>", 41 titleSrc: function (item) { 42 return item.el.attr("data-title"); // 43 //return item.el.find('img').attr("alt"); 44 }, 45 }, 46 zoom: { 47 enabled: true, 48 duration: 500, 49 opener: function(element) { 50 return element.find("img"); 51 }, 52 }, 53 }); 54 }); 55 } else { 56 if ("thumbs-gallery" === moduleName) { 57 moduleAnchor.each(function() { 58 $(this).removeAttr("href"); 59 }); 60 } 61 } 62 } 63 64 if ($(".dnext-thumbs-gallery-top").length > 0) { 65 $(".dnext-thumbs-gallery-top") 66 .each(function() { 67 const mainClass = 68 "." + 69 $(this) 70 .attr("class") 71 .split(" ") 72 .join("."); 73 74 swiperMagnificPopup( 75 `${mainClass}`, 76 ".dnext-thumbs-gallery-top-image-link", 77 "thumbs-gallery" 78 ); 79 }); 80 } 81 if ($(".dnxte-coverflowslider-active").length > 0) { 82 $(".dnxte-coverflowslider-active") 83 .each(function() { 84 const mainClass = 85 "." + 86 $(this) 87 .attr("class") 88 .split(" ") 89 .join("."); 90 91 swiperMagnificPopup( 92 `${mainClass}`, 93 ".dnxte-coverflow-image-link", 94 "coverflow" 95 ); 96 }); 97 } 98 99 }); 100})(jQuery);
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.