Файловый менеджер - Редактировать - /home/kunzqhe/www/wp-content/plugins/builder-mosaic/assets/scripts.js
Ðазад
(function ($,Themify) { 'use strict'; let winW=Themify.w, cssText='.grid-stack .grid-stack-item{position:absolute;left:0;top:0;padding:0}.grid-stack.grid-stack-1{width:auto;margin-left:0;height:auto!important}.grid-stack.grid-stack-1 .builder_mosaic_item.grid-stack-item{position:relative;top:0;left:0;width:auto;margin-bottom:20px}'; const loaded={}, isActive=Themify.is_builder_active===true, st=document.createElement('style'), loadedSt={}, base=8.333, selector='.grid-stack .grid-stack-item', args=tbLocalScript['addons']['mosaic'], css_url=args.url+'modules/', options = { float:true, verticalMargin:0, disableDrag:true, disableWindowResize:true, disableResize:true, ddPlugin:false, animate:false, rtl:Themify.isRTL }, setCss=function(left,w){ if(loadedSt['l'+left]===undefined){ loadedSt['l'+left]=true; let v=left*base; if(left%3===0){ v=Math.round(v); } st.textContent+=selector+'[data-gs-x="'+left+'"]{left:'+v+'%}'; } if(loadedSt['w'+w]===undefined){ loadedSt['w'+w]=true; let v=w==0?base:(w*base); if(w%3===0){ v=Math.round(v); } st.textContent+=selector+'[data-gs-width="'+w+'"]{width:'+v+'%}'; } }, init = function (el) { const items=Themify.selectWithParent('tpgs-wrap',el); for(let i=items.length-1;i>-1;--i){ if(!items[i].classList.contains('grid-stack-done')){ options['cellHeight']=parseFloat(items[i].getAttribute( 'data-cell-height' )); options['minWidth']=parseFloat(items[i].getAttribute( 'data-min-width' )); let grid= GridStack.init(options,items[i]), stacks=Themify.convert(items[i].getElementsByClassName('builder_mosaic_item')).reverse(); if(options['minWidth']>=winW){ items[i].classList.add('grid-stack-1'); } for(let j=stacks.length-1;j>-1;--j){ let left=stacks[j].getAttribute( 'data-gs-x' ), w=stacks[j].getAttribute( 'data-gs-width' ), hover=stacks[j].getAttribute( 'data-hover' ); if(hover && loadedSt['ef'+hover]!==true){ loadedSt['ef'+hover]=true; Themify.LoadCss(css_url+ 'effects/'+ hover+'.css', args.ver); } if(options['minWidth']<winW){ setCss(left,w); } grid.addWidget( stacks[j], {x:left,y:stacks[j].getAttribute( 'data-gs-y' ), width:w, height:stacks[j].getAttribute( 'data-gs-height' )} ); if(isActive===false){ stacks[j].style['visibility']='visible'; stacks[j].style['animationDelay']=(j * 200) + 'ms'; stacks[j].classList.add('animated',stacks[j].getAttribute( 'data-effect')); } } items[i].classList.add('grid-stack-done'); initSlider(items[i]); } } }, infiniteScroll = function (el) { const p = el?el[0]:document, item=p.getElementsByClassName('tbm_wrap_more')[0]; if(item){ if(!Themify.cssLazy['tbm_infinity']){ Themify.cssLazy['tbm_infinity']=true; Themify.LoadCss(css_url+ 'infinite.css', args.ver); } const container=item.previousElementSibling, isLoadMore=container.parentNode.classList.contains('pagination-load-more'); $(container).on('infiniteloaded.themify',function(e,items){ let last=this; while(true){ if(last.nextElementSibling && last.nextElementSibling.classList.contains('tpgs-wrap')){ last=last.nextElementSibling; } else{ break; } } if(items instanceof jQuery){ items=items.get(); } const wrap=this.cloneNode(false); wrap.classList.remove(this.gridstack.opts['_class'],'grid-stack-done'); wrap.removeAttribute('data-gs-current-row'); for(let i=0,len=items.length;i<len;++i){ wrap.appendChild(items[i]); } init(wrap); last.parentNode.insertBefore(wrap, last.nextSibling); }); if(isLoadMore){ item.classList.remove('tf_hidden'); } Themify.infinity(container,{scrollThreshold:!isLoadMore,history:false}); } }, initSlider=function(el){ const swiper = el.closest('.swiper-container'); if(swiper && !swiper.classList.contains('swiper-container-initialized')){ Themify.InitCarousel(swiper); } }, check=function(el){ if(loaded['css']===true && loaded['gridstack']===true){ init(el); if(isActive===false){ Themify.requestIdleCallback(function(){ infiniteScroll(el); },100); } } }; st.id='tb_mosaic_css'; if(Themify.isRTL){ cssText+='.grid-stack-rtl{direction:ltr}.grid-stack-rtl .grid-stack-item{direction:rtr}'; } if(isActive===true){ cssText+='.themify_builder_active .builder_mosaic_item{visibility:visible}'; } st.textContent=cssText; document.head.appendChild(st); cssText=null; Themify.on( 'builder_load_module_partial', function(el,type,isLazy){ if(isLazy===true && !el[0].classList.contains('module-mosaic')){ return; } if(!Themify.cssLazy['tbm_products']){ const p=el?el[0]:document; if(p.getElementsByClassName('product')[0]){ Themify.cssLazy['tbm_products']=true; Themify.LoadCss(css_url + 'product.css', args.ver); } } if(!loaded['css']){ Themify.loadAnimateCss(function(){ loaded['css']=true; check(el); }); } if(!loaded['gridstack']){ Themify.LoadAsync( args.url + 'gridstack.js', function(){ loaded['gridstack']=true; check(el); }, null, null, function(){ return ( 'undefined' !== typeof GridStack ); } ); } check(el); } ) .on('tfsmartresize',function(e){ if(e){ winW=e.w; const items=document.getElementsByClassName('grid-stack-done'); for(let i=items.length-1;i>-1;--i){ if(items[i].getAttribute( 'data-min-width' )>=winW){ items[i].classList.add('grid-stack-1'); } else{ for(let stacks=items[i].getElementsByClassName('grid-stack-item'),j=stacks.length-1;j>-1;--j){ setCss(stacks[j].getAttribute( 'data-gs-x' ),stacks[j].getAttribute( 'data-gs-width' )); } items[i].classList.remove('grid-stack-1'); } } } }); }(jQuery,Themify));
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка