Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/bitrix/ext_www/cvetdv.ru/bitrix/js/burlakastudio.realcommenter/ |
Upload File : |
function LHEButton(a,b){a.name||(a.name=a.id);a.title||(a.title=a.name);this.disabled=!1;this.pLEditor=b;(this.oBut=a)&&"function"==typeof this.oBut.OnBeforeCreate&&(this.oBut=this.oBut.OnBeforeCreate(this.pLEditor,this.oBut));this.oBut&&this.Create()} LHEButton.prototype={Create:function(){var a=this;this.pWnd=this.pCont=BX.create("INS",{attrs:{"data-button":this.oBut.id.toLowerCase()},html:this.oBut.html||"undefined"!==this.oBut.html?this.oBut.html:this.oBut.id,style:this.oBut.style?this.oBut.style:!1});this.oBut.disableOnCodeView&&BX.addCustomEvent(this.pLEditor,"OnChangeView",BX.proxy(this.OnChangeView,this));this.pWnd.onmousedown=function(b){a.OnClick(b,this)}},OnClick:function(a,b){if(this.disabled)return!1;a=!1;"code"===this.pLEditor.sEditorMode&& this.pLEditor.bBBCode&&"function"==typeof this.oBut.bbHandler?a=!1!==this.oBut.bbHandler(this):("function"==typeof this.oBut.handler&&(a=!1!==this.oBut.handler(this)),"code"!==this.pLEditor.sEditorMode&&!a&&this.oBut.cmd&&(a=this.pLEditor.executeCommand(this.oBut.cmd)),this.pLEditor.SetFocus(),BX.defer(this.pLEditor.SetFocus,this.pLEditor)());return a},Check:function(a){a===this.checked||this.disabled||((this.checked=a)?BX.addClass(this.pWnd,"lhe-button-checked"):BX.removeClass(this.pWnd,"lhe-button-checked"))}, Disable:function(a){if(a===this.disabled)return!1;(this.disabled=a)?BX.addClass(this.pWnd,"lhe-button-disabled"):BX.removeClass(this.pWnd,"lhe-button-disabled")},OnChangeView:function(){this.oBut.disableOnCodeView&&this.Disable("code"===this.pLEditor.sEditorMode)}};function LHETransOverlay(a,b){this.pLEditor=b;this.id="lhe_trans_overlay";this.zIndex=a.zIndex||100} LHETransOverlay.prototype={Create:function(){this.bCreated=!0;this.bShowed=!1;var a=BX.GetWindowScrollSize();this.pWnd=document.body.appendChild(BX.create("DIV",{props:{id:this.id,className:"lhe-trans-overlay"},style:{zIndex:this.zIndex,width:a.scrollWidth+"px",height:a.scrollHeight+"px"}}));this.pWnd.ondrag=BX.False;this.pWnd.onselectstart=BX.False},Show:function(a){this.bCreated||this.Create();this.bShowed=!0;this.pLEditor.bPopup=!0;var b=BX.GetWindowScrollSize();this.pWnd.style.display="block"; this.pWnd.style.width=b.scrollWidth+"px";this.pWnd.style.height=b.scrollHeight+"px";a||(a={});a.zIndex&&(this.pWnd.style.zIndex=a.zIndex);BX.bind(window,"resize",BX.proxy(this.Resize,this));return this.pWnd},Hide:function(){var a=this;setTimeout(function(){a.pLEditor.bPopup=!1},50);this.bShowed&&(this.bShowed=!1,this.pWnd.style.display="none",BX.unbind(window,"resize",BX.proxy(this.Resize,this)),this.pWnd.onclick=null)},Resize:function(){this.bCreated&&(this.pWnd.style.width=BX.GetWindowScrollSize().scrollWidth+ "px")}};