Current Path : /var/www/www-root/data/www/info.monolith-realty.ru/bitrix/js/landing/ui/panel/ |
Current File : /var/www/www-root/data/www/info.monolith-realty.ru/bitrix/js/landing/ui/panel/alert_panel.min.js |
(function(){"use strict";BX.namespace("BX.Landing.UI.Panel");var t=BX.Landing.Utils.addClass;var e=BX.Landing.Utils.removeClass;var n=BX.Landing.Utils.append;BX.Landing.UI.Panel.Alert=function(e){BX.Landing.UI.Panel.BasePanel.apply(this,arguments);t(this.layout,"landing-ui-panel-alert");this.onCloseClick=this.onCloseClick.bind(this);this.text=BX.create("div",{props:{className:"landing-ui-panel-alert-text"}});this.closeButton=BX.create("button",{props:{className:"ui-btn ui-btn-link"},html:BX.Landing.Loc.getMessage("LANDING_ALERT_ACTION_CLOSE"),events:{click:this.onCloseClick}});this.action=BX.create("div",{props:{className:"landing-ui-panel-alert-action"},children:[this.closeButton]});n(this.text,this.layout);n(this.action,this.layout);n(this.layout,top.document.body)};BX.Landing.UI.Panel.Alert.getInstance=function(){if(!top.BX.Landing.UI.Panel.Alert.instance){top.BX.Landing.UI.Panel.Alert.instance=new BX.Landing.UI.Panel.Alert}return top.BX.Landing.UI.Panel.Alert.instance};BX.Landing.UI.Panel.Alert.prototype={constructor:BX.Landing.UI.Panel.Alert,__proto__:BX.Landing.UI.Panel.BasePanel.prototype,show:function(i,a){var s=Promise.resolve();if(this.isShown()){s=this.hide()}s.then(function(){BX.Landing.UI.Panel.BasePanel.prototype.show.call(this);e(this.layout,"landing-ui-alert");e(this.layout,"landing-ui-error");t(this.layout,i==="error"?"landing-ui-error":"landing-ui-alert");this.text.innerHTML=(a?a:i)+" ";n(this.getSupportLink(),this.text)}.bind(this))},getSupportLink:function(){if(!this.supportLink){var t="https://helpdesk.bitrix24.com/ticket.php";var e=BX.Landing.Loc.getMessage("LANGUAGE_ID");switch(e){case"ru":case"by":case"kz":t="https://helpdesk.bitrix24.ru/ticket.php";break;case"de":t="https://helpdesk.bitrix24.de/ticket.php";break;case"br":t="https://helpdesk.bitrix24.com.br/ticket.php";break;case"es":t="https://helpdesk.bitrix24.es/ticket.php";break}this.supportLink=BX.create("a",{props:{className:"landing-ui-panel-alert-support-link"},html:BX.Landing.Loc.getMessage("LANDING_ALERT_ACTION_SUPPORT_LINK"),attrs:{href:t,target:"_blank"}})}return this.supportLink},onCloseClick:function(){this.hide()}}})(); //# sourceMappingURL=alert_panel.map.js