%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/bitrix/www/bitrix/components/bitrix/landing.sites/templates/.default/
Upload File :
Create Path :
Current File : /home/bitrix/www/bitrix/components/bitrix/landing.sites/templates/.default/script.min.js

(function(){"use strict";BX.namespace("BX.Landing.TileGrid");BX.Landing.TileGrid=function(i){if(typeof i==="object"){this.wrapper=i.wrapper;this.inner=i.inner;this.tiles=i.tiles;this.minTileWidth=0;this.maxTileWidth=0;this.tileRowLength=0;if(i.sizeSettings){this.minTileWidth=i.sizeSettings.minWidth;this.maxTileWidth=i.sizeSettings.maxWidth}else if(i.tileRowLength){this.tileRowLength=i.tileRowLength}else{this.minTileWidth=250;this.maxTileWidth=350}this.tileRatio=i.tileRatio||1.48;this.maxTileHeight=this.maxTileWidth/this.tileRatio}this.setTileWidth();BX.bind(window,"resize",this.setTileWidth.bind(this));requestAnimationFrame(function(){this.wrapper.classList.add("landing-ui-show")}.bind(this))};BX.Landing.TileGrid.prototype={setTileWidth:function(){var i=this.getTileCalculating();var t=i.width;var e=i.height;if(this.minTileWidth){t=t<=this.maxTileWidth?i.width:this.maxTileWidth;e=e<=this.maxTileHeight?i.height:this.maxTileHeight}requestAnimationFrame(function(){for(var s=0;s<this.tiles.length;s++){this.tiles[s].style.width=t+"px";this.tiles[s].style.height=e+"px";this.tiles[s].style.marginLeft=i.margin+"px";this.tiles[s].style.marginTop=i.margin+"px"}this.inner.style.marginLeft=i.margin*-1+"px";this.inner.style.marginTop=i.margin*-1+"px"}.bind(this))},getTileCalculating:function(){var i=this.wrapper.clientWidth-12;var t=i/100*6;var e=0,s=0;if(this.tileRowLength){s=this.tileRowLength;e=(i-t)/this.tileRowLength}else{e=this.minTileWidth;s=(i-t)/e;if(s>this.tiles.length){e=(i-t)/this.tiles.length;e=e>this.maxTileWidth?this.maxTileWidth:e}else if(s-Math.floor(s)>0){s=Math.floor(s);e=(i-t)/s}}return{width:e,margin:t/(s-1),height:e/this.tileRatio}},action:function(i,t){BX.ajax({url:"/bitrix/tools/landing/ajax.php?action="+i,method:"POST",data:{data:t,sessid:BX.message("bitrix_sessid")},dataType:"json",onsuccess:function(i){if(typeof i.type!=="undefined"&&typeof i.result!=="undefined"){if(i.type==="error"){var t=i.result[0].error;var e=BX.Landing.UI.Tool.ActionDialog.getInstance();if((t=="PUBLIC_SITE_REACHED"||t=="PUBLIC_PAGE_REACHED")&&typeof BX.Landing.PaymentAlertShow!=="undefined"){BX.Landing.PaymentAlertShow({message:i.result[0].error_description})}else{e.show({content:i.result[0].error_description,confirm:"OK",type:"alert"})}}else{BX.onCustomEvent("BX.Main.Filter:apply")}}}})}}})();
//# sourceMappingURL=script.map.js

Zerion Mini Shell 1.0