Your IP : 3.139.102.136


Current Path : /home/bitrix/ext_www/crm.klimatlend.ua/bitrix/js/crm/
Upload File :
Current File : /home/bitrix/ext_www/crm.klimatlend.ua/bitrix/js/crm/slider.min.js

BX.namespace("BX.Crm");if(typeof BX.Crm.EntityEditorToolPanel==="undefined"){BX.Crm.EntityEditorToolPanel=function(){this._id="";this._settings={};this._wrapper=null;this._onButtonClickNotifier=null;this._isVisible=false;this._hasLayout=false;this._isLocked=false};BX.Crm.EntityEditorToolPanel.prototype={initialize:function(t,e){this._id=BX.type.isNotEmptyString(t)?t:BX.util.getRandomString(4);this._settings=e?e:{};this._isVisible=BX.prop.getBoolean(this._settings,"visible",false);this._onButtonClickNotifier=BX.CrmNotifier.create(this)},getId:function(){return this._id},addOnButtonClickListener:function(t){this._onButtonClickNotifier.addListener(t)},removeOnButtonClickListener:function(t){this._onButtonClickNotifier.removeListener(t)},isVisible:function(){return this._isVisible},setVisible:function(t){t=!!t;if(this._isVisible===t){return}this._isVisible=t;if(this._hasLayout){if(!this._isVisible){BX.removeClass(this._wrapper,"crm-section-control-active")}else{BX.addClass(this._wrapper,"crm-section-control-active")}}},layout:function(){this._editButton=BX.create("button",{props:{className:"webform-small-button webform-small-button-accept webform-button-active"},children:[BX.create("span",{props:{className:"webform-small-button-text"},text:this.getMessage("save")})],events:{click:BX.delegate(this.onSaveButtonClick,this)}});this._cancelButton=BX.create("a",{props:{className:"webform-button-link"},text:this.getMessage("cancel"),attrs:{href:"#"},events:{click:BX.delegate(this.onCancelButtonClick,this)}});this._errorContainer=BX.create("DIV",{props:{className:"crm-entity-section-control-error-block"}});this._errorContainer.style.maxHeight="0px";this._wrapper=BX.create("DIV",{props:{className:"crm-entity-wrap"},children:[BX.create("DIV",{props:{className:"crm-entity-section crm-entity-section-control"},children:[this._editButton,this._cancelButton,this._errorContainer]})]});if(!this._isVisible){BX.removeClass(this._wrapper,"crm-section-control-active")}else{BX.addClass(this._wrapper,"crm-section-control-active")}document.body.appendChild(this._wrapper);this._hasLayout=true}};BX.Crm.EntityEditorToolPanel.prototype.onSaveButtonClick=function(t){this._onButtonClickNotifier.notify([{buttonId:"SAVE"}])};BX.Crm.EntityEditorToolPanel.prototype.onCancelButtonClick=function(t){this._onButtonClickNotifier.notify([{buttonId:"CANCEL"}]);return BX.PreventDefault(t)};BX.Crm.EntityEditorToolPanel.prototype.isLocked=function(){return this._isLocked};BX.Crm.EntityEditorToolPanel.prototype.setLocked=function(t){t=!!t;if(this._isLocked===t){return}this._isLocked=t;if(t){BX.addClass(this._editButton,"webform-small-button-wait")}else{BX.removeClass(this._editButton,"webform-small-button-wait")}};BX.Crm.EntityEditorToolPanel.prototype.addError=function(t){this._errorContainer.appendChild(BX.create("DIV",{attrs:{className:"crm-entity-section-control-error-text"},html:t}));this._errorContainer.style.maxHeight=""};BX.Crm.EntityEditorToolPanel.prototype.clearErrors=function(){this._errorContainer.innerHTML="";this._errorContainer.style.maxHeight="0px"};BX.Crm.EntityEditorToolPanel.prototype.getMessage=function(t){var e=BX.Crm.EntityEditorToolPanel.messages;return e.hasOwnProperty(t)?e[t]:t};if(typeof BX.Crm.EntityEditorToolPanel.messages==="undefined"){BX.Crm.EntityEditorToolPanel.messages={}}BX.Crm.EntityEditorToolPanel.create=function(t,e){var i=new BX.Crm.EntityEditorToolPanel;i.initialize(t,e);return i}}
//# sourceMappingURL=slider.map.js