1var FWPBB = FWPBB || {}; 2 3(function($) { 4 5 // Prevent BB scroll 6 FLBuilderLayout._scrollToElement = function(el, callback) { 7 var config = FLBuilderLayoutConfig.anchorLinkAnimations; 8 9 if (el.length > 0) { 10 11 // See _initAnchorLink() within bb-plugin/js/fl-builder-layout.js 12 if ( el.hasClass( 'fl-scroll-link' ) || el.hasClass( 'fl-row' ) || el.hasClass( 'fl-col' ) || el.hasClass( 'fl-module' ) ) { 13 var ot = el.offset().top, 14 dh = $(document).height(), 15 wh = $(window).height(); 16 17 var dest = (ot > dh - wh) ? (dh - wh) : (ot - config.offset); 18 19 $('html, body').animate({ scrollTop: dest }, config.duration, config.easing, function() { 20 if ('undefined' != typeof callback) { 21 callback(); 22 } 23 }); 24 } 25 } 26 } 27 28 // Grids 29 FWPBB.init_grids = function() { 30 $.each(FWPBB.modules, function(id, obj) { 31 if ('grid' === obj.layout) { 32 if ('post-grid' === obj.type) { 33 new FLBuilderPostGrid(obj); 34 $('.fl-node-' + id + ' .fl-post-grid').masonry('reloadItems'); 35 } 36 else if ('pp-content-grid' === obj.type) { 37 new PPContentGrid(obj); 38 } 39 else if ('blog-posts' === obj.type) { 40 new UABBBlogPosts(obj); 41 } 42 else if ('uabb-woo-products' === obj.type) { 43 new UABBWooProducts(obj); 44 } 45 } 46 else if ('gallery' == obj.layout) { 47 new FLBuilderPostGrid(obj); 48 49 $('.fl-post-gallery-img').each(function() { 50 $(this)[0].style.setProperty('max-width', '100%', 'important'); 51 }); 52 } 53 else if ('columns' === obj.layout) { 54 if ('post-grid' === obj.type) { 55 new FLBuilderPostGrid(obj); 56 } 57 } 58 }); 59 clean_pager(); 60 } 61 62 function clean_pager() { 63 $('.facetwp-bb-module a.page-numbers').attr('href', '').each(function() { 64 $(this).trigger('init'); 65 }); 66 } 67 68 $(document).on('click init', '.facetwp-bb-module a.page-numbers', function(e) { 69 e.preventDefault(); 70 71 var $link = $(this); 72 var page = $link.text(); 73 74 if ($link.hasClass('prev')) { // previous 75 page = FWP.settings.pager.page - 1; 76 } 77 78 if ($link.hasClass('next')) { // next 79 page = FWP.settings.pager.page + 1; 80 } 81 82 if (e.type === 'click') { 83 FWP.paged = page; 84 FWP.soft_refresh = true; 85 FWP.refresh(); 86 } 87 else { 88 FWP.facets['paged'] = page; 89 $link.attr('href', '?' + FWP.buildQueryString()); 90 } 91 }); 92 93 $(document).on('facetwp-loaded', function() { 94 if (FWP.loaded || FWP.is_bfcache) { 95 FWPBB.init_grids(); 96 } 97 }); 98 99 $(document).on('facetwp-refresh', function() { 100 if ($('.facetwp-template:first').hasClass('facetwp-bb-module')) { 101 FWP.template = 'wp'; 102 } 103 }); 104})(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.