trAvis - MANAGER
Edit File: plus-social-feed.min.js
!function(){"use strict";function t(t,m){t.find(".tp-social-feed").each(function(){let e=m(this),a=e.data("id"),o=e.data("fancy-option"),i=e.data("scroll-normal");if(m().fancybox({selector:'[data-fancybox="'+a+'"]',buttons:o.button,image:{preload:0},loop:o.loop,infobar:o.infobar,animationEffect:o.animationEffect,animationDuration:o.animationDuration,transitionEffect:o.transitionEffect,transitionDuration:o.transitionDuration,arrows:o.arrows,clickContent:o.clickContent,clickSlide:o.slideclick,dblclickContent:!1,dblclickSlide:!1,smallBtn:!1,iframe:{preload:0},youtube:{autoplay:0},vimeo:{autoplay:0},mp4:{autoplay:0},video:{autoStart:0},afterShow:function(){var t;"Instagram"==this.$content[0].dataset.fancyfeedtype&&(t=this.src,(t=m(t).find("#IGGP-slider")).length&&t.slick({speed:1e3,prevArrow:'<a href="#" class="slick-prev IGGP-slide-arrow">‹</a>',nextArrow:'<a href="#" class="slick-next IGGP-slide-arrow">›</a>'}))}}),m(".grid-item.feed-Facebook.FbAlbum_Cls",this).each(function(){var t=m(this).data("index");m('[data-fancybox="album-'+t+"-"+a+'"]',this).fancybox({buttons:o.button,image:{preload:!0},loop:o.loop,infobar:o.infobar,animationEffect:o.animationEffect,animationDuration:o.animationDuration,transitionEffect:o.transitionEffect,transitionDuration:o.transitionDuration,arrows:o.arrows,clickContent:o.clickContent,clickSlide:o.slideclick,dblclickContent:!1,dblclickSlide:!1})}),1==i.ScrollOn&&0==i.TextLimit){let t=e.find(".tp-sf-feed .tp-message");t.each(function(){m(this)[0].clientHeight>=i.Height&&(m(this).addClass(i.className),m(this).css("height",i.Height))})}var t;1==i.FancyScroll&&0==i.TextLimit&&(t=e.find(".fancybox-si .tp-message"),m(t).addClass(i.Fancyclass),m(t).css("height",i.FancyHeight)),m(document).on("click","."+a+".tp-social-feed .readbtn",function(){var e=m(this).closest(".tp-message"),t=e.closest(".list-isotope .post-inner-loop"),a=e.closest(".tp-social-feed").data("scroll-normal"),o=e.find(".showtext");if(e.hasClass("show-text"))e.removeClass("show-text "),m(this).html("Show More"),e.find(".sf-dots").css("display","inline"),1==a.ScrollOn&&1==a.TextLimit&&(o.removeClass(a.className),o.removeAttr("style"));else{e.addClass("show-text "),m(this).html("Show Less"),e.find(".sf-dots").css("display","none");let t=m(".tp-social-feed").find(o);1==a.ScrollOn&&1==a.TextLimit&&t.each(function(){m(this)[0].clientHeight>=a.Height&&(o.addClass(a.className),o.css("height",a.Height))})}t.isotope({itemSelector:".grid-item",resizable:!0,sortBy:"original-order"})}),m(document).on("click",".tp-widget-"+a+".fancybox-si .readbtn",function(){var t=m(this).closest(".fancybox-si .tp-message"),e=m(".tp-social-feed").data("scroll-normal"),a=m(this).closest(".fancybox-si .tp-message");t.hasClass("show-text")?(t.removeClass("show-text"),m(this).html("Show More"),t.find(".sf-dots").css("display","inline"),1==e.FancyScroll&&1==e.TextLimit&&(a.removeClass(e.Fancyclass),a.removeAttr("style"))):(t.addClass("show-text"),m(this).html("Show Less"),t.find(".sf-dots").css("display","none"),1==e.FancyScroll&&1==e.TextLimit&&a.each(function(){let t=m(this);t[0].clientHeight>=e.FancyHeight&&(t.addClass(e.Fancyclass),t.css("height",e.FancyHeight))}))});var s,n,p,f,h,l,d,u=0;0<m("."+a+".tp-social-feed").find(".ajax_load_more").length&&m("."+a+" .post-load-more").on("click",function(t){t.preventDefault();var l=m(this),e=l.data("loadattr"),o=l.data("loadview"),d=l.data("loadclass"),r=l.data("layout"),a=l.data("loadingtxt"),c=l.text();l.data("requestRunning")||(l.data("requestRunning",!0),m.ajax({type:"POST",data:"action=tp_feed_load&view="+u+"&feedshow="+o+"&loadattr="+e,url:theplus_ajax_url,beforeSend:function(){m(l).text(a)},success:function(a){var t=JSON.parse(a),i=t&&t.HTMLContent?t.HTMLContent:"",s=t&&t.totalFeed?t.totalFeed:"",n=t&&t.FilterStyle?t.FilterStyle:"",a=t&&t.allposttext?t.allposttext:"";if(""==t)m(l).addClass("hide");else{let o="."+d,t=m(o+" .all .all_post_count"),e=m(o+" .post-inner-loop");e.append(i);i=m(o).find(".grid-item").length;m(t).html("").append(i),"style-2"!=n&&"style-3"!=n||(n=m(o+" .category-filters li .filter-category-list").not(".all"),m.each(n,function(t,e){var a=m(e).find("span:nth-child(2)").data("hover"),a=m(o).find(".grid-item."+a).length;m(e).find("span:nth-child(1).all_post_count").html("").append(a)})),"grid"!=r&&"masonry"!=r||m(o).hasClass("list-isotope")&&m(e).isotope("layout").isotope("reloadItems"),s<=i?(m(l).addClass("hide"),m(l).parent(".ajax_load_more").append('<div class="plus-all-posts-loaded">'+a+"</div>")):m(l).text(c)}u+=o},complete:function(){l.data("requestRunning",!1),"grid"!=r&&"masonry"!=r||m("."+e.load_class).hasClass("list-grid-client")||setTimeout(function(){m("."+d+" .post-inner-loop").isotope("layout").isotope("reloadItems")},500)}}).then(function(){m("."+d).hasClass("list-isotope")&&("grid"!=r&&"masonry"!=r||m("."+d+" .post-inner-loop").isotope({itemSelector:".grid-item",resizable:!0,sortBy:"original-order"}))}))}),m("body").find("."+a+" .ajax_lazy_load").length&&(l=m(window),(d=function(){l.width(),s=l.height(),n=m("body").height(),f=m("."+a+".list-isotope").height(),h=m("."+a+".list-isotope").offset().top+50,setTimeout(function(){f=m("."+a+".list-isotope").height(),h=m("."+a+".list-isotope").offset().top+50},50)})(),l.resize(d),l.bind("scroll",function(t){t.preventDefault(),d(),p=l.scrollTop(),m("."+a+".list-isotope").each(function(){var l,t,e,d,r,a,c;f=m(this).height(),h=m(this).offset().top+50,m(this).find(".post-lazy-load").length&&p<n&&f+h-s<p+60&&(t=(l=m(this).find(".post-lazy-load")).data("lazyattr"),e=l.data("lazyview"),d=l.data("lazyclass"),r=l.data("lazylayout"),a=l.data("loadingtxt"),c=l.text(),l.data("requestRunning")||(l.data("requestRunning",!0),m.ajax({type:"POST",data:"action=tp_feed_load&view="+u+"&feedshow="+e+"&loadattr="+t,url:theplus_ajax_url,beforeSend:function(){m(l).text(a)},success:function(a){var t=JSON.parse(a),i=t&&t.HTMLContent?t.HTMLContent:"",s=t&&t.totalFeed?t.totalFeed:"",n=t&&t.FilterStyle?t.FilterStyle:"",a=t&&t.allposttext?t.allposttext:"";if(""==t)m(loadFeed_click).addClass("hide");else{let o="."+d,t=m(o+" .all .all_post_count"),e=m(o+" .post-inner-loop");e.append(i);i=m(o).find(".grid-item").length;m(t).html("").append(i),"style-2"!=n&&"style-3"!=n||(n=m(o+" .category-filters li .filter-category-list").not(".all"),m.each(n,function(t,e){var a=m(e).find("span:nth-child(2)").data("hover"),a=m(o).find(".grid-item."+a).length;m(e).find("span:nth-child(1).all_post_count").html("").append(a)})),"grid"!=r&&"masonry"!=r||m(o).hasClass("list-isotope")&&m(e).isotope("layout").isotope("reloadItems"),s<=i?(m(l).addClass("hide"),m(l).parent(".ajax_load_more").append('<div class="plus-all-posts-loaded">'+a+"</div>")):m(l).text(c)}u+=e},complete:function(){l.data("requestRunning",!1)}}).then(function(){}).then(function(){m("."+d).hasClass("list-isotope")&&("grid"!=r&&"masonry"!=r||m("."+d+" .post-inner-loop").isotope({itemSelector:".grid-item",resizable:!0,sortBy:"original-order"}))})))})}))}),m(".tp-social-feed .tp-sf-copy-icon").unbind().click(function(){let t=this,e=document.createElement("textarea");e.value=t.dataset.copypostid,document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e),t.innerHTML='<svg version="1.1" id="L9" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 100 100" enable-background="new 0 0 0 0" xml:space="preserve" ><path fill="#fff" d="M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50"><animateTransform attributeName="transform" attributeType="XML" type="rotate" dur="1s" from="0 50 50" to="360 50 50" repeatCount="indefinite" /></path></svg>',setTimeout(function(){t.innerHTML='<i class="far fa-copy CopyLoading"></i>'},500)})}jQuery(window).on("elementor/frontend/init",function(){elementorFrontend.hooks.addAction("frontend/element_ready/tp-social-feed.default",t)})}();