Your IP : 3.133.137.107


Current Path : /var/www/www-root/data/www/www.monolith-realty.ru/bitrix/js/landing/ui/card/
Upload File :
Current File : /var/www/www-root/data/www/www.monolith-realty.ru/bitrix/js/landing/ui/card/base_card.min.js

(function(){"use strict";BX.namespace("BX.Landing.UI.Card");BX.Landing.UI.Card.BaseCard=function(a){a=!!a&&typeof a==="object"?a:{};this.id=typeof a.id==="string"?a.id:"";this.hidden=typeof a.hidden==="boolean"?a.hidden:false;this.layout=BX.Landing.UI.Card.BaseCard.createLayout();this.header=BX.Landing.UI.Card.BaseCard.createHeader();this.body=BX.Landing.UI.Card.BaseCard.createBody();this.layout.appendChild(this.header);this.layout.appendChild(this.body);this.header.innerText=typeof a.title==="string"?a.title:"";this.layout.hidden=this.hidden;this.onClickHandler=typeof a.onClick==="function"?a.onClick:function(){};this.fields=new BX.Landing.Collection.BaseCollection;if(typeof a.className==="string"){this.layout.classList.add(a.className)}this.layout.addEventListener("click",this.onClick.bind(this))};BX.Landing.UI.Card.BaseCard.createLayout=function(){return BX.create("div",{props:{className:"landing-ui-card"}})};BX.Landing.UI.Card.BaseCard.createHeader=function(){return BX.create("div",{props:{className:"landing-ui-card-header"}})};BX.Landing.UI.Card.BaseCard.createBody=function(){return BX.create("div",{props:{className:"landing-ui-card-body"}})};BX.Landing.UI.Card.BaseCard.prototype={onClick:function(){this.onClickHandler(this)},show:function(){this.layout.hidden=false},hide:function(){this.layout.hidden=true},getNode:function(){return this.layout}}})();
//# sourceMappingURL=base_card.map.js