Current Path : /var/www/www-root/data/www/info.monolith-realty.ru/bitrix/js/main/core/ |
Current File : /var/www/www-root/data/www/info.monolith-realty.ru/bitrix/js/main/core/core_tooltip.min.js |
(function(window){if(BX.tooltip)return;var arTooltipIndex={},bDisable=false;BX.tooltip=function(i,t,s,e,o,a){if(BX.message("TOOLTIP_ENABLED")!="Y"){return}if(BX.browser.IsAndroid()||BX.browser.IsIOS()){return}BX.ready((function(){var r=BX(t);if(null==r){return}var n=i;if(o&&BX.type.isNotEmptyString(s)){var l=0;for(var h=0,d=s.length;h<d;h++){l=31*l+s.charCodeAt(h)<<0}n=l+i}if(null==arTooltipIndex[n]){arTooltipIndex[n]=new BX.CTooltip(i,r,s,e,o,a)}else{arTooltipIndex[n].ANCHOR=r;arTooltipIndex[n].rootClassName=e;arTooltipIndex[n].LOADER=o&&BX.type.isNotEmptyString(s)?s:"/bitrix/tools/tooltip.php";arTooltipIndex[n].params=a;arTooltipIndex[n].Create()}}))};BX.tooltip.disable=function(){bDisable=true};BX.tooltip.enable=function(){bDisable=false};BX.tooltip.hide=function(i){if(BX("user_info_"+i)){BX("user_info_"+i).style.display="none"}};BX.tooltip.openIM=function(i){const t=top.BX.Reflection.namespace("BX.Messenger.Public");if(t){t.openChat(i);BX.tooltip.hide(i)}else if(BX("MULSonetMessageChatTemplate")){window.open(BX("MULSonetMessageChatTemplate").replace("#user_id#",i).replace("#USER_ID#",i).replace("#ID#",i),"","location=yes,status=no,scrollbars=yes,resizable=yes,width=700,height=550,top="+Math.floor((screen.height-550)/2-14)+",left="+Math.floor((screen.width-700)/2-5));BX.tooltip.hide(i)}return false};BX.tooltip.openCallTo=function(i){const t=top.BX.Reflection.namespace("BX.Messenger.Public");if(t){t.startVideoCall(i)}return false};BX.tooltip.checkCallTo=function(i){};BX.tooltip.openVideoCall=function(i){const t=top.BX.Reflection.namespace("BX.Messenger.Public");if(t){t.startVideoCall(i)}else if(BX("MULVideoCallTemplate")){window.open(BX("MULVideoCallTemplate").replace("#user_id#",i).replace("#USER_ID#",i).replace("#ID#",i),"","location=yes,status=no,scrollbars=yes,resizable=yes,width=1000,height=600,top="+Math.floor((screen.height-600)/2-14)+",left="+Math.floor((screen.width-1e3)/2-5));BX.tooltip.hide(i)}return false};BX.CTooltip=function(user_id,anchor,loader,rootClassName,bForceUseLoader,params){this.LOADER=bForceUseLoader&&BX.type.isNotEmptyString(loader)?loader:"/bitrix/tools/tooltip.php";this.USER_ID=user_id;this.ANCHOR=anchor;this.rootClassName="";this.params=typeof params!="undefined"?params:{};if(rootClassName!="undefined"&&rootClassName!=null&&rootClassName.length>0){this.rootClassName=rootClassName}var old=document.getElementById("user_info_"+this.USER_ID);if(null!=old){if(null!=old.parentNode)old.parentNode.removeChild(old);old=null}var _this=this;this.INFO=null;this.width=393;this.height=302;this.RealAnchor=null;this.CoordsLeft=0;this.CoordsTop=0;this.AnchorRight=0;this.AnchorBottom=0;this.DIV=null;this.ROOT_DIV=null;if(BX.browser.IsIE()){this.IFRAME=null}this.v_delta=0;this.classNameAnim=false;this.classNameFixed=false;this.left=0;this.top=0;this.tracking=false;this.active=false;this.showed=false;this.Create=function(){_this.ANCHOR.onmouseover=function(){if(!bDisable){_this.StartTrackMouse(this)}};_this.ANCHOR.onmouseout=function(){_this.StopTrackMouse(this)}};this.Create();this.TrackMouse=function(i){if(!_this.tracking)return;var t;if(i&&i.pageX)t={x:i.pageX,y:i.pageY};else t={x:i.clientX+document.body.scrollLeft,y:i.clientY+document.body.scrollTop};if(t.x<0)t.x=0;if(t.y<0)t.y=0;t.time=_this.tracking;if(!_this.active)_this.active=t;else{if(_this.active.x>=t.x-1&&_this.active.x<=t.x+1&&_this.active.y>=t.y-1&&_this.active.y<=t.y+1){if(_this.active.time+20<=t.time)_this.ShowTooltip()}else _this.active=t}};this.ShowTooltip=function(){var i=document.getElementById("user_info_"+_this.USER_ID);if(bDisable||i&&i.style.display=="block")return;var t=BX.browser.IsIE()&&!BX.browser.IsIE10();if(!BX.type.isPlainObject(this.params)){this.params={}}if(null==_this.DIV&&null==_this.ROOT_DIV){_this.ROOT_DIV=document.body.appendChild(document.createElement("DIV"));_this.ROOT_DIV.style.position="absolute";BX.ZIndexManager.register(_this.ROOT_DIV);_this.DIV=_this.ROOT_DIV.appendChild(document.createElement("DIV"));if(t)_this.DIV.className="bx-user-info-shadow-ie";else _this.DIV.className="bx-user-info-shadow";_this.DIV.style.width=_this.width+"px";_this.DIV.style.height=_this.height+"px"}var s=_this.CoordsLeft;var e=_this.CoordsTop+30;var o=BX.GetWindowScrollPos();var a=document.body;var r=false;var n=false;if(a.clientWidth+o.scrollLeft<s+_this.width){s=_this.AnchorRight-_this.width;r=true}if(e-o.scrollTop<0){e=_this.AnchorBottom-5;n=true;_this.v_delta=40}else _this.v_delta=0;_this.ROOT_DIV.style.left=parseInt(s)+"px";_this.ROOT_DIV.style.top=parseInt(e)+"px";BX.ZIndexManager.bringToFront(_this.ROOT_DIV);BX.bind(BX(_this.ROOT_DIV),"click",BX.eventCancelBubble);if(this.rootClassName!="undefined"&&this.rootClassName!=null&&this.rootClassName.length>0)_this.ROOT_DIV.className=this.rootClassName;if(""==_this.DIV.innerHTML){var l=_this.LOADER+(_this.LOADER.indexOf("?")>=0?"&":"?")+"MUL_MODE=INFO&USER_ID="+_this.USER_ID+"&site="+(BX.message("SITE_ID")||"")+(typeof _this.params!="undefined"&&typeof _this.params.entityType!="undefined"&&_this.params.entityType.length>0?"&entityType="+_this.params.entityType:"")+(typeof _this.params!="undefined"&&typeof _this.params.entityId!="undefined"&&parseInt(_this.params.entityId)>0?"&entityId="+parseInt(_this.params.entityId):"");BX.ajax.get(l,_this.InsertData);_this.DIV.id="user_info_"+_this.USER_ID;_this.DIV.innerHTML='<div class="bx-user-info-wrap">'+'<div class="bx-user-info-leftcolumn">'+'<div class="bx-user-photo" id="user-info-photo-'+_this.USER_ID+'"><div class="bx-user-info-data-loading">'+BX.message("JS_CORE_LOADING")+"</div></div>"+'<div class="bx-user-tb-control bx-user-tb-control-left" id="user-info-toolbar-'+_this.USER_ID+'"></div>'+"</div>"+'<div class="bx-user-info-data">'+'<div id="user-info-data-card-'+_this.USER_ID+'"></div>'+'<div class="bx-user-info-data-tools">'+'<div class="bx-user-tb-control bx-user-tb-control-right" id="user-info-toolbar2-'+_this.USER_ID+'"></div>'+'<div class="bx-user-info-data-clear"></div>'+"</div>"+"</div>"+'</div><div class="bx-user-info-bottomarea"></div>'}if(t){_this.DIV.className="bx-user-info-shadow-ie";_this.classNameAnim="bx-user-info-shadow-anim-ie";_this.classNameFixed="bx-user-info-shadow-ie"}else{_this.DIV.className="bx-user-info-shadow";_this.classNameAnim="bx-user-info-shadow-anim";_this.classNameFixed="bx-user-info-shadow"}_this.filterFixed="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/bitrix/components/bitrix/main.user.link/templates/.default/images/cloud-left-top.png', sizingMethod = 'crop' );";if(r&&n){if(BX.browser.IsIE6()){_this.DIV.className="bx-user-info-shadow-hv-ie6";_this.classNameAnim="bx-user-info-shadow-hv-anim-ie6";_this.classNameFixed="bx-user-info-shadow-hv-ie6"}else if(t){_this.DIV.className="bx-user-info-shadow-hv-ie";_this.classNameAnim="bx-user-info-shadow-hv-anim-ie";_this.classNameFixed="bx-user-info-shadow-hv-ie"}else{_this.DIV.className="bx-user-info-shadow-hv";_this.classNameAnim="bx-user-info-shadow-hv-anim";_this.classNameFixed="bx-user-info-shadow-hv"}_this.filterFixed="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/bitrix/components/bitrix/main.user.link/templates/.default/images/cloud-right-bottom.png', sizingMethod = 'crop' );"}else{if(r){if(t){_this.DIV.className="bx-user-info-shadow-h-ie";_this.classNameAnim="bx-user-info-shadow-h-anim-ie";_this.classNameFixed="bx-user-info-shadow-h-ie"}else{_this.DIV.className="bx-user-info-shadow-h";_this.classNameAnim="bx-user-info-shadow-h-anim";_this.classNameFixed="bx-user-info-shadow-h"}_this.filterFixed="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/bitrix/components/bitrix/main.user.link/templates/.default/images/cloud-right-top.png', sizingMethod = 'crop' );"}if(n){if(BX.browser.IsIE6()){_this.DIV.className="bx-user-info-shadow-v-ie6";_this.classNameAnim="bx-user-info-shadow-v-anim-ie6";_this.classNameFixed="bx-user-info-shadow-v-ie6"}else if(t){_this.DIV.className="bx-user-info-shadow-v-ie";_this.classNameAnim="bx-user-info-shadow-v-anim-ie";_this.classNameFixed="bx-user-info-shadow-v-ie"}else{_this.DIV.className="bx-user-info-shadow-v";_this.classNameAnim="bx-user-info-shadow-v-anim";_this.classNameFixed="bx-user-info-shadow-v"}_this.filterFixed="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/bitrix/components/bitrix/main.user.link/templates/.default/images/cloud-left-bottom.png', sizingMethod = 'crop' );"}}if(BX.browser.IsIE()&&null==_this.IFRAME){_this.IFRAME=document.body.appendChild(document.createElement("IFRAME"));_this.IFRAME.id=_this.DIV.id+"_frame";_this.IFRAME.style.position="absolute";_this.IFRAME.style.width=_this.width-60+"px";_this.IFRAME.style.height=_this.height-100+"px";_this.IFRAME.style.borderStyle="solid";_this.IFRAME.style.borderWidth="0px";_this.IFRAME.style.zIndex=550;_this.IFRAME.style.display="none"}if(BX.browser.IsIE()){_this.IFRAME.style.left=parseInt(s)+25+"px";_this.IFRAME.style.top=parseInt(e)+30+_this.v_delta+"px"}_this.DIV.style.display="none";_this.ShowOpacityEffect({func:_this.SetVisible,obj:_this.DIV,arParams:[]},0);document.getElementById("user_info_"+_this.USER_ID).onmouseover=function(){_this.StartTrackMouse(this)};document.getElementById("user_info_"+_this.USER_ID).onmouseout=function(){_this.StopTrackMouse(this)};BX.onCustomEvent("onTooltipShow",[this])};this.InsertData=function(data){if(null!=data&&data.length>0){eval("_this.INFO = "+data);var cardEl=document.getElementById("user-info-data-card-"+_this.USER_ID);cardEl.innerHTML=_this.INFO.RESULT.Card;var photoEl=document.getElementById("user-info-photo-"+_this.USER_ID);photoEl.innerHTML=_this.INFO.RESULT.Photo;var toolbarEl=document.getElementById("user-info-toolbar-"+_this.USER_ID);toolbarEl.innerHTML=_this.INFO.RESULT.Toolbar;var toolbar2El=document.getElementById("user-info-toolbar2-"+_this.USER_ID);toolbar2El.innerHTML=_this.INFO.RESULT.Toolbar2;if(BX.type.isArray(_this.INFO.RESULT.Scripts)){for(var i=0;i<_this.INFO.RESULT.Scripts.length;i++){eval(_this.INFO.RESULT.Scripts[i])}}BX.onCustomEvent("onTooltipInsertData",[_this])}}};BX.CTooltip.prototype.StartTrackMouse=function(i){var t=this;if(!this.tracking){var s=BX.pos(i);this.RealAnchor=i;this.CoordsLeft=s.left+0;this.CoordsTop=s.top-325;this.AnchorRight=s.right;this.AnchorBottom=s.bottom;this.tracking=1;BX.bind(document,"mousemove",t.TrackMouse);setTimeout((function(){t.tickTimer()}),500)}};BX.CTooltip.prototype.StopTrackMouse=function(){var i=this;if(this.tracking){BX.unbind(document,"mousemove",i.TrackMouse);this.active=false;setTimeout((function(){i.HideTooltip()}),500);this.tracking=false}};BX.CTooltip.prototype.tickTimer=function(){var i=this;if(this.tracking){this.tracking++;if(this.active){if(this.active.time+5<=this.tracking)this.ShowTooltip()}setTimeout((function(){i.tickTimer()}),100)}};BX.CTooltip.prototype.HideTooltip=function(){if(!this.tracking)this.ShowOpacityEffect({func:this.SetInVisible,obj:this.DIV,arParams:[]},1)};BX.CTooltip.prototype.ShowOpacityEffect=function(i,t){var s=3;var e=1;var o=1/s;var a=0,r,n=this;if(BX.browser.IsIE()&&n.DIV)n.DIV.className=n.classNameAnim;var l=function(){a++;if(a>s){clearInterval(h);if(!i.arParams)i.arParams=[];if(i.func&&i.obj)i.func.apply(i.obj,i.arParams);return}r=t?1-a*o:a*o;if(n.DIV!=null){try{n.DIV.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity="+r*100+")";n.DIV.style.opacity=r;n.DIV.style.MozOpacity=r;n.DIV.style.KhtmlOpacity=r}catch(i){}finally{if(!t&&a==1)n.DIV.style.display="block";if(t&&a==s&&n.DIV)n.DIV.style.display="none";if(BX.browser.IsIE()&&a==1&&t&&n.IFRAME)n.IFRAME.style.display="none";if(BX.browser.IsIE()&&a==s&&n.DIV){if(!t)n.IFRAME.style.display="block";n.DIV.style.filter=n.filterFixed;n.DIV.className=n.classNameFixed;n.DIV.innerHTML=""+n.DIV.innerHTML}if(t){BX.onCustomEvent("onTooltipHide",[n])}}}};var h=setInterval(l,e)}})(window); //# sourceMappingURL=core_tooltip.map.js