1jQuery(document).ready( function( $ ) { 2 3 var nextIcon = '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 129 129" xmlns:xlink="http://www.w3.org/1999/xlink" enable-background="new 0 0 129 129"><g><path d="m40.4,121.3c-0.8,0.8-1.8,1.2-2.9,1.2s-2.1-0.4-2.9-1.2c-1.6-1.6-1.6-4.2 0-5.8l51-51-51-51c-1.6-1.6-1.6-4.2 0-5.8 1.6-1.6 4.2-1.6 5.8,0l53.9,53.9c1.6,1.6 1.6,4.2 0,5.8l-53.9,53.9z"></path></g></svg>'; 4 var prevIcon = '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 129 129" xmlns:xlink="http://www.w3.org/1999/xlink" enable-background="new 0 0 129 129"><g><path d="m88.6,121.3c0.8,0.8 1.8,1.2 2.9,1.2s2.1-0.4 2.9-1.2c1.6-1.6 1.6-4.2 0-5.8l-51-51 51-51c1.6-1.6 1.6-4.2 0-5.8s-4.2-1.6-5.8,0l-54,53.9c-1.6,1.6-1.6,4.2 0,5.8l54,53.9z"></path></g></svg>'; 5 //--------------------------------------------------------------------------------------------- 6 7 var getElementSettings = function( $element ) { 8 var elementSettings = $element.find('.cel-posts').data( 'settings' ) || {}; 9 return elementSettings; 10 }; 11 12 var Filter = function ( $scope ) { 13 var f = $scope.find( '.cel-filter' ); 14 15 f.on( 'click', 'a', function( e ){ 16 e.preventDefault(); 17 var cat = $( this ).attr( 'data-filter' ) || ''; 18 f.find( 'a' ).removeClass( 'cel-f-active' ); 19 $( this ).addClass( 'cel-f-active' ); 20 if( $scope._shuffleInstance ) { 21 if ( ! cat ) { 22 $scope._shuffleInstance.filter(Shuffle.ALL_ITEMS); 23 } else { 24 $scope._shuffleInstance.filter([cat]); 25 } 26 } 27 } ); 28 }; 29 30 var PostLayout = function( $scope, $posts ){ 31 32 var intShuffle = function(){ 33 var Shuffle = window.Shuffle; 34 var element = $scope.find( '.cel-posts' ); 35 if ( element.length ) { 36 $scope._shuffleInstance = new Shuffle( element[0], { 37 itemSelector: 'article' 38 }); 39 40 $( document ).on( 'customify-pro/elementor/style/changed', function(){ 41 if ( $scope._shuffleInstance ) { 42 $scope._shuffleInstance.update(); 43 } 44 } ); 45 46 } 47 //var element = document.querySelector('.cel-posts'); 48 }; 49 50 var elementSettings = getElementSettings( $scope ); 51 52 // Merge defaults and options, without modifying defaults 53 elementSettings = $.extend( {}, { 54 columns: 1, 55 columns_tablet: false, 56 columns_mobile: false, 57 carousel_autoplay: false, 58 carousel_loop: false, 59 carousel_autoplayHoverPause: false, 60 carousel_autoplayTimeout: false, 61 carousel_show_nav: '', 62 carousel_show_dots: '' 63 }, elementSettings ); 64 65 if ( ! elementSettings.columns_tablet ) { 66 elementSettings.columns_tablet = elementSettings.columns; 67 } 68 if ( ! elementSettings.columns_mobile ) { 69 elementSettings.columns_mobile = elementSettings.columns; 70 } 71 72 var show_filter =elementSettings.show_filter === 'yes'; 73 74 switch ( elementSettings.display_layout ) { 75 case 'slider': 76 case 'carousel': 77 show_filter = false; 78 var t = parseInt( elementSettings.carousel_autoplayTimeout ); 79 if ( isNaN( t ) || t === 0 ) { 80 t = 5000; 81 } 82 83 $('.owl-carousel').owlCarousel({ 84 autoplayTimeout: t, 85 autoplay: elementSettings.carousel_autoplay === 'yes', 86 loop: elementSettings.carousel_loop === 'yes', 87 nav: elementSettings.carousel_show_nav === 'yes', 88 navText: elementSettings.carousel_show_nav === 'yes' ? [ prevIcon, nextIcon ] : false, 89 dots: elementSettings.carousel_show_dots === 'yes', 90 responsive:{ 91 0:{ // phone 92 items: parseInt( elementSettings.columns_mobile ), 93 nav:true 94 }, 95 568:{ // tablet 96 items: parseInt( elementSettings.columns_tablet ), 97 nav:false 98 }, 99 1024:{ // desktop 100 items: parseInt( elementSettings.columns ), 101 nav:true, 102 loop:false 103 } 104 } 105 }); 106 break; 107 case 'masonry': 108 109 break; 110 } 111 112 if ( elementSettings.display_layout === 'masonry' || show_filter ) { 113 intShuffle(); 114 } 115 116 }; 117 118 try { 119 elementorFrontend.hooks.addAction( 'frontend/element_ready/customify-posts.default', function( $scope ) { 120 PostLayout( $scope ); 121 Filter( $scope ); 122 } ); 123 124 if ( elementor ) { 125 elementor.hooks.addFilter('editor/style/styleText', function( css ) { 126 $( document ).trigger( 'customify-pro/elementor/style/changed' ); 127 return css; 128 } ); 129 } 130 131 try { 132 if ( elementor ) { 133 elementor.hooks.addFilter('editor/style/styleText', function( css ) { 134 $( document ).trigger( 'customify-pro/elementor/style/changed' ); 135 return css; 136 } ); 137 } 138 } catch ( e ) { 139 140 } 141 142 } catch ( e ){ 143 $(window).on( 'elementor/frontend/init', function() { 144 elementorFrontend.hooks.addAction( 'frontend/element_ready/customify-posts.default', function( $scope ) { 145 PostLayout( $scope ); 146 Filter( $scope ); 147 } ); 148 149 try { 150 if ( elementor ) { 151 elementor.hooks.addFilter('editor/style/styleText', function( css ) { 152 $( document ).trigger( 'customify-pro/elementor/style/changed' ); 153 return css; 154 } ); 155 } 156 } catch ( e ) { 157 158 } 159 160 }); 161 162 163 } 164 165} );
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.