uawdijnntqw1x1x1
IP : 3.15.10.50
Hostname : axolotl
Kernel : Linux axolotl 4.9.0-13-amd64 #1 SMP Debian 4.9.228-1 (2020-07-05) x86_64
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
OS : Linux
PATH:
/
var
/
www
/
axolotl
/
data
/
www
/
axolotl.ru
/
www
/
bitrix
/
js
/
intranet
/
event_calendar
/
events.min.js
/
/
JCEC.prototype.LoadEvents_ex=function(e,t){var i=++this.LoadEventsCount;var n=this;setTimeout(function(){if(n.LoadEventsCount>i)return;n.LoadEvents(e,t);n.LoadEventsCount=0},600)};JCEC.prototype.LoadEvents=function(e,t,i){var n=[],a,r=this,s=[];for(a in this.oActiveCalendars){a=bxInt(a);if(a>0&&!isNaN(a)){if(this.oActiveCalendars[a])n.push(a);else s.push(a)}}var o=this.GetPostData("load_events",{month:parseInt(e,10)+1,year:t,usecl:"Y",cl:n,hcl:s});var l=++this.loadReqCount;this.Request({postData:o,errorText:EC_MESS.LoadEventsErr,handler:function(n){return window._bx_ar_events?r.HandleLoadedEvents(window._bx_ar_events,e,t,l,i):false}})};JCEC.prototype.ReloadEvents=function(){this.arLoadedEventsId={};this.arLoadedParentId={};this.arLoadedMonth={};this.arEvents=[];this.LoadEvents_ex(this.activeDate.month,this.activeDate.year)};JCEC.prototype.HandleLoadedEvents=function(e,t,i,n,a){if(this.loadReqCount>n)return;this.loadReqCount=0;var r,s,o,l;for(r=0,s=e.length;r<s;r++){o=e[r];l=this.GetEventSmartId(o);if(!o.ID||this.arLoadedEventsId[l])continue;this.arEvents.push(o);this.arLoadedEventsId[l]=true;if(o.HOST&&o.HOST.parentId&&!o.bSuperposed)this.arLoadedParentId[o.HOST.parentId]=true}this.arLoadedMonth[t+"."+i]=true;if(!a)a={};if(isNaN(bxInt(a.month)))a.month=t;if(isNaN(bxInt(a.year)))a.year=i;this.SetView(a)};JCEC.prototype.BuildEventHolder=function(){if(this.EventHolderCont)this.EventHolderCont=null;this.EventHolderCont=this.DaysGridCont.appendChild(BX.create("DIV",{props:{className:"bxec-event-holder"}}));var e=this;var t=this.oDaysGridTable.rows[0].cells[0];setTimeout(function(){e.arCellCoords={};for(var i=0;i<7;i++){e.arCellCoords[i]={left:bxInt(e.oDaysGridTable.rows[0].cells[i].offsetLeft),width:bxInt(e.oDaysGridTable.rows[0].cells[i].offsetWidth)+bxGetPixel(true)};if(i/2==Math.round(i/2))e.arCellCoords[i].width+=bxGetPixel()}e.dayCellHeight=parseInt(t.offsetHeight);e.dayCellWidth=parseInt(t.offsetWidth);e.DisplayEventsMonth()},10)};JCEC.prototype.DisplayEventsMonth=function(e){var t,i;if(e||this.bJustRedraw){BX.cleanNode(this.EventHolderCont);for(t=0,i=this.activeDateObjDays.length;t<i;t++)this.activeDateObjDays[t].arEvents={begining:[],all:[]}}else{this.activeFirst=this.activeDateDays[0].getTime();this.activeLast=this.activeDateDays[this.activeDateDays.length-1].getTime()}for(t=0,i=this.arEvents.length;t<i;t++)if(this.arEvents[t])this.HandleEventMonth(this.arEvents[t],t);this.RefreshEventsOnWeeks([0,1,2,3,4,5])};JCEC.prototype.HandleEventMonth=function(e,t,i){var n,a,r,s,o;this.arLoadedEventsId[this.GetEventSmartId(e)]=true;e=this.HandleEventCommon(e,t);if(!e)return;e.oParts=[];e.oWeeks=[];if(!i){n=bxGetDate(e.DATE_FROM,false,true);n={date:n.date,month:n.month-1,year:n.year};a=bxGetDate(e.DATE_TO,false,true);a={date:a.date,month:a.month-1,year:a.year};s=new Date(n.year,n.month,n.date).getTime();o=new Date(a.year,a.month,a.date).getTime()}else{n=i.d_from;a=i.d_to;s=i._d_from;o=i._d_to}if(s>o||o<this.activeFirst||s>this.activeLast)return;var l={real_from:n,real_to:a,from:s,to:o,real_from_t:s,real_to_t:o};if(s<this.activeFirst&&o<this.activeLast)l.from=this.activeFirst;else if(s>this.activeFirst&&o>this.activeLast)l.to=this.activeLast;else if(s<this.activeFirst&&o>this.activeLast){l.from=this.activeFirst;l.to=this.activeLast}e.display=true;this.DisplayEvent_M(l,e);if(e.STATUS=="Q")this.BlinkEvent(e)};JCEC.prototype.HandleEventCommon=function(e,t){if(e.IBLOCK_SECTION_ID&&!this.oActiveCalendars[bxInt(e.IBLOCK_SECTION_ID)])return false;if(e.IS_MEETING&&e.bSuperposed&&(e.HOST&&e.HOST.parentId&&this.arLoadedEventsId[e.HOST.parentId]||this.arLoadedParentId[e.ID]))return false;if(!e.oParts)e.oParts=[];if(!e.oWeeks)e.oWeeks=[];e.ind=t;e=this.SetEventsColors(e);return e};JCEC.prototype.DisplayEvent_M=function(e,t){var i,n,a,r,s={partDaysCount:0},o=false,l=false;for(a=0,r=this.activeDateDays.length;a<r;a++){n=this.activeDateDays[a];i=this.convertDayIndex(n.getDay());if(n.getTime()==e.from){o=true;s={left:this.arCellCoords[i].left+1,arInit:e,dayIndex:a,partDaysCount:0}}s.partDaysCount++;if(!o)continue;this.activeDateObjDays[a].arEvents.all.push({oEvent:t,partInd:t.oParts.length,daysCount:s.partDaysCount});if(i==6){l=n.getTime()==e.to;s.width=this.arCellCoords[i].left+this.arCellCoords[i].width-s.left-3;s.bEnd=l&&e.to==e.real_to_t;this.BuildEventDiv(s,t);if(l)break}if(!l&&i==0&&n.getTime()!=e.from)s={left:this.arCellCoords[0].left+1,arInit:e,dayIndex:a,partDaysCount:1};if(n.getTime()==e.to){l=true;s.width=this.arCellCoords[i].left+this.arCellCoords[i].width-s.left-3;s.bEnd=true;this.BuildEventDiv(s,t);break}}};JCEC.prototype.BuildEventDiv=function(e,t){var i,n,a,r,s,o;this.activeDateObjDays[e.dayIndex].arEvents.begining.push({oEvent:t,partInd:t.oParts.length,daysCount:e.partDaysCount});var l="bxec-event";if(t.bDark)l+=" bxec-dark";i=BX.create("DIV",{props:{className:l},style:{left:e.left+"px",width:bxInt(e.width)+"px",display:"none",backgroundColor:t.displayColor}});r=i.appendChild(BX.create("TABLE"));s=r.insertRow(-1);var d=this;if(t.oParts.length>0||e.arInit.real_from_t<e.arInit.from){o=s.insertCell(-1);o.innerHTML='<img class="bxec-iconkit" src="/bitrix/images/1.gif">';o.className="bxec-event-ar-l"}else{var f=s.insertCell(-1);f.innerHTML='<img class="bxec-iconkit" src="/bitrix/images/1.gif">';f.className="bxec-event-dd-dot"}var v=t.HOST||t.GUESTS&&t.GUESTS.length>0,h=v?'<img class="bxec-iconkit bxec-enc-icon" src="/bitrix/images/1.gif" align="top">':"",c=v&&t.STATUS=="Q",E=c?'<b title="'+EC_MESS.NotConfirmed+'" class="bxec-stat-q">?</b>':"",u=s.insertCell(-1);u.innerHTML='<div class="bxec-event-title"><nobr'+this.GetEventLabelStyle(t)+">"+h+E+t.NAME+"</nobr></div>";this.BuildEventActions({cont:u,oEvent:t,evCont:i});o=s.insertCell(-1);o.innerHTML='<img class="bxec-iconkit" src="/bitrix/images/1.gif">';o.className=e.bEnd?"bxec-event-resize":"bxec-event-ar-r";i.onmouseover=function(){d.HighlightEvent_M(t,this)};i.onmouseout=function(){d.HighlightEvent_M(t,this,true)};i.ondblclick=function(){d.ShowViewEventDialog(t)};t.oWeeks.push({dayIndex:e.dayIndex,bEnd:e.bEnd});t.oParts.push(i);this.EventHolderCont.appendChild(i);this.AppendHint2Event(t,u.firstChild)};JCEC.prototype.GetEventLabelStyle=function(e){var t="";imp=e.IMPORTANCE;if(imp&&imp!="normal")t=' style="'+(imp=="high"?"font-weight: bold;":"color: #535353;")+'"';return t};JCEC.prototype.AppendHint2Event=function(e,t){var i="<b>"+e.NAME+"</b><br>"+e.DATE_FROM+" - "+e.DATE_TO,n=e.DETAIL_TEXT.length,a=350,r=this.oCalendars[e.IBLOCK_SECTION_ID];if(r&&r.NAME){if(r.SP_PARAMS&&r.SP_PARAMS.NAME)i+="<br>["+r.SP_PARAMS.NAME+" :: "+r.NAME+"]";else i+="<br>["+r.NAME+"]"}if(n>0){if(n<a)i+="<br>"+e.DETAIL_TEXT;else i+="<br>"+e.DETAIL_TEXT.substr(0,a)+"..."}e.hintContent=i;setTimeout(function(){if(t.offsetWidth>0)new BX.CHintSimple({parent:t,hint:i})},200)};JCEC.prototype.HighlightEvent_M=function(e,t,i){if(!e||!e.oParts||e.oParts.length==0)return;var n,a,r=i?BX.removeClass:BX.addClass;for(n=0,a=e.oParts.length;n<a;n++)r(e.oParts[n],"bxec-event-over");r(t,"bxec-event-over");if(e.pMoreDivs)for(n=0,a=e.pMoreDivs.length;n<a;n++)r(e.pMoreDivs[n],"bxec-event-over")};JCEC.prototype.GetEventWeeks=function(e){var t,i,n=[],a,r;for(a=0,r=e.oParts.length;a<r;a++){t=e.oWeeks[a].dayIndex;for(i=0;i<6;i++){if(t>=i*7&&t<(i+1)*7){n.push(i);break}}}return n};JCEC.prototype.BuildWeekEventHolder=function(){if(this._bBETimeOut)clearTimeout(this._bBETimeOut);var e=this;this._bBETimeOut=setTimeout(function(){var t=e.Tabs[e.activeTabId||e.startTabId];if(!t.pEventHolder)t.pEventHolder=t.pBodyCont.rows[0].cells[0].firstChild;else BX.cleanNode(t.pEventHolder);if(e.bJustRedraw)e.RelBuildEvents(t.id);else e.DisplayWeekEvents(t)},50);return;var e=this,t=this.Tabs[this.activeTabId||this.startTabId];if(!t.pEventHolder)t.pEventHolder=t.pBodyCont.rows[0].cells[0].firstChild;else BX.cleanNode(t.pEventHolder);if(this.bJustRedraw)this.RelBuildEvents(t.id);else setTimeout(function(){e.DisplayWeekEvents(t)},10)};JCEC.prototype.DisplayWeekEvents=function(e){for(var t=0,i=this.arEvents.length;t<i;t++){if(this.arEvents[t])this.HandleEventWeek({Tab:e,Event:this.arEvents[t],ind:t})}var n=this;setTimeout(function(){n.RefreshEventsInDayT(e);n.ArrangeEventsInTL(e)},50)};JCEC.prototype.RelBuildEvents=function(e){var t=this.Tabs[e],i=t.pTimelineCont,n=false,a,r,s;for(r=0;r<t.daysCount;r++){oDay=t.arDays[r];oDay.TLine={};oDay.Events={begining:[],hidden:[],all:[]};oDay.EventsCount=0}s=i.childNodes.length;r=0;while(r<s){a=i.childNodes[r];if(a.className.toString().indexOf("bxec-tl-event")==-1){r++;continue}i.removeChild(a);s=i.childNodes.length}this.DisplayWeekEvents(t)};JCEC.prototype.HandleEventWeek=function(e){var t=this.HandleEventCommon(e.Event,e.ind);if(!t)return;if(!t.oDaysT)t.oDaysT={};if(!t.oTLParts)t.oTLParts={};t.oTLParts[e.Tab.id]=[];var i=bxGetDate(t.DATE_FROM,false,true),n=bxGetDate(t.DATE_TO,false,true,true),a=i.oDate.getTime(),r=n.oDate.getTime();if(a>r||r<e.Tab.activeFirst||a>e.Tab.activeLast)return;var s={real_from:i,real_to:n,from:a,to:r,real_from_t:a,real_to_t:r};if(a<e.Tab.activeFirst&&r<=e.Tab.activeLast){s.from=e.Tab.activeFirst}else if(a>=e.Tab.activeFirst&&r>e.Tab.activeLast){s.to=e.Tab.activeLast}else if(a<e.Tab.activeFirst&&r>e.Tab.activeLast){s.from=e.Tab.activeFirst;s.to=e.Tab.activeLast}t.display=true;if(!i.bTime&&!n.bTime)this.DisplayEvent_DT(s,t,e.Tab);else this.DisplayEvent_TL(s,t,e.Tab);if(t.STATUS=="Q")this.BlinkEvent(t)};JCEC.prototype.DisplayEvent_DT=function(e,i,n){var a=this,s=false,o=i.bSuperposed||this.bReadOnly,l=this.convertDayIndex(new Date(e.from).getDay()),d=this.convertDayIndex(new Date(e.to).getDay()),f=100,v={oEvent:i,daysCount:d-l+1},h,E,u,p,b,_,C,T;for(var u=0;u<n.daysCount;u++){p=n.arDays[u];if(p.day==l){h=p;s=true;p.Events.begining.push(v)}if(!s)continue;p.Events.all.push(v);p.EventsCount++;if(p.day==d){E=p;break}}var T=bxInt(h.pWnd.offsetLeft)+2-bxGetPixel(),m=bxInt(E.pWnd.offsetLeft)+bxInt(E.pWnd.offsetWidth),y=m-T-1,I=y-40-(o?40:80)+"px";oDiv=BX.create("DIV",{props:{className:"bxec-event"},style:{left:T.toString()+"px",width:y.toString()+"px",backgroundColor:i.displayColor}}),t=oDiv.appendChild(BX.create("TABLE")),r=t.insertRow(-1);i.oDaysT[n.id]=oDiv;if(e.real_from_t<e.from){c=r.insertCell(-1);c.innerHTML='<img class="bxec-iconkit" src="/bitrix/images/1.gif">';c.className="bxec-event-ar-l"}else{var g=r.insertCell(-1);g.innerHTML='<img class="bxec-iconkit" src="/bitrix/images/1.gif">';g.className="bxec-event-dd-dot"}var D=i.HOST||i.GUESTS&&i.GUESTS.length>0,S=D&&i.STATUS=="Q",x=S?'<b title="'+EC_MESS.NotConfirmed+'" class="bxec-stat-q">?</b>':"",L=D?'<img class="bxec-iconkit bxec-enc-icon" src="/bitrix/images/1.gif" align="top">':"",w=r.insertCell(-1);w.innerHTML='<div class="bxec-event-title"><nobr>'+L+x+i.NAME+"</nobr></div>";this.BuildEventActions({cont:w,oEvent:i,evCont:oDiv});c=r.insertCell(-1);c.innerHTML='<img class="bxec-iconkit" src="/bitrix/images/1.gif">';c.className=e.real_to_t>e.to?"bxec-event-ar-r":"bxec-event-resize";oDiv.onmouseover=function(){a.HighlightEvent_DT(this)};oDiv.onmouseout=function(){a.HighlightEvent_DT(this,true)};oDiv.ondblclick=function(){a.ShowViewEventDialog(i)};n.pEventHolder.appendChild(oDiv);this.AppendHint2Event(i,w.firstChild)};JCEC.prototype.DisplayEvent_TL=function(e,t,i){var n=this,a=false,r=false,s=new Date(e.from),o=new Date(e.to),l=this.convertDayIndex(s.getDay()),d=this.convertDayIndex(o.getDay()),f=s.getHours()||0,v=s.getMinutes()||0,h=o.getHours(),c=o.getMinutes(),E=100,u={oEvent:t,daysCount:d-l+1},p,b,_,C,T,m,y,I;if(!o){h=23;c=59}for(var _=0;_<i.daysCount;_++){C=i.arDays[_];if(C.day==l){p=C;a=true}if(!a)continue;if(C.day==d){b=C;break}}this._SetTimeEvent(p,f,v,{oEvent:t,bStart:true,arInit:e});this._SetTimeEvent(b,h,c,{oEvent:t,bStart:false,arInit:e})};JCEC.prototype._SetTimeEvent=function(e,t,i,n){if(!e.TLine)e.TLine={};t=bxInt(t);i=bxInt(i);if(!e.TLine[t])e.TLine[t]={};if(!e.TLine[t][i])e.TLine[t][i]=[];e.TLine[t][i].push(n)};JCEC.prototype.BuildEventActions=function(e){var t=this,i=e.oEvent,n=1,a=BX.create("DIV",{props:{className:"bxec-event-actions"}}),r=a.appendChild(BX.create("DIV",{props:{className:e.bTimeline?"bxec-icon-cont-tl":"bxec-icon-cont"}}));var s=r.appendChild(BX.create("IMG",{props:{className:"bxec-iconkit bxec-ev-view-icon",src:"/bitrix/images/1.gif",title:EC_MESS.ViewEvent}}));s.onclick=function(){t.ShowViewEventDialog(i)};if(!this.bReadOnly&&!i.bSuperposed){var o=r.appendChild(BX.create("IMG",{props:{className:"bxec-iconkit bxec-ev-edit-icon",src:"/bitrix/images/1.gif",title:EC_MESS.EditEvent}}));o.onclick=function(){t.ShowEditEventDialog({oEvent:i})};n++;var l=r.appendChild(BX.create("IMG",{props:{className:"bxec-iconkit bxec-ev-del-icon",src:"/bitrix/images/1.gif",title:i.HOST?EC_MESS.DelEncounter:EC_MESS.DelEvent}}));l.onclick=function(){t.DeleteEvent(i)};n++}if(n<3){if(e.bTimeline){r.style.width="18px";r.style.height=18*n+"px"}else{r.style.height="18px";r.style.width=18*n+"px";r.style.left="-"+18*n+"px"}}e.cont.appendChild(a)};JCEC.prototype.HighlightEvent_DT=function(e,t){var i=t?BX.removeClass:BX.addClass;i(e,"bxec-event-over")};JCEC.prototype.RefreshEventsInDayT=function(e){var t=[],i=0,a=3,r,s,o,l,d,f,v,h,c;for(l=0;l<a;l++)t[l]=0;for(s=0;s<e.daysCount;s++){r=e.arDays[s];o=r.Events.begining;n=o.length;h=[];if(n>0){o.sort(function(e,t){return t.daysCount-e.daysCount});e:for(k=0;k<n;k++){d=o[k];if(!d)continue;if(!this.arEvents[d.oEvent.ind]){r.Events.begining=o=deleteFromArray(o,k);d=o[k];if(!d)continue}for(l=0;l<a;l++){if(t[l]-i<=0){t[l]=i+d.daysCount;c=21+l*18;d.oEvent.oDaysT[e.id].style.top=(21+l*18).toString()+"px";continue e}}h[d.oEvent.ID]=true;r.Events.hidden.push(d)}}f=r.Events.all;for(var E=0,u=f.length;E<u;E++){d=f[E];if(!d||h[d.oEvent.ID])continue;if(!this.arEvents[d.oEvent.ind]){r.Events.all=f=deleteFromArray(f,E);d=f[E];if(!d)continue}v=d.oEvent.oDaysT[e.id].style.display;if(v&&v.toLowerCase()=="none")r.Events.hidden.push(d)}this.ShowMoreEventsSelectWeek(r,e.id);i++}};JCEC.prototype.ShowMoreEventsSelectWeek=function(e,t){var i=this,n=e.Events.hidden,a=n.length,r=[],s=e.pMoreEvents.firstChild,o,l,d;if(a<=0){s.style.display="none";return}for(o=0;o<a;o++){l=n[o];d=l.oEvent.oDaysT[t];d.style.display="none";r.push({pDiv:d,oEvent:l.oEvent})}s.style.display="block";s.innerHTML=EC_MESS.MoreEvents+" ("+a+" "+EC_MESS.Item+")";s.onmousedown=function(e){if(!e)e=window.event;BX.PreventDefault(e)};s.onclick=function(t){i.ShowMoreEventsWin({Events:r,id:"day_t_"+e.day,pDay:e.pWnd,mode:"day_t"})}};JCEC.prototype.ArrangeEventsInTL=function(e){try{var t=false,i,n,a,r,s={},o=0,l=0,d,f,v,h,c,E={},u=0,p=[],b,_,C,T;for(_=0;_<e.daysCount;_++){b=e.arDays[_];f=[];if(u>0){if(!b.TLine)b.TLine={};for(_e in E){if(E[_e]&&typeof E[_e]=="object"&&E[_e].oEvent){if(!b.TLine["0"])b.TLine["0"]={0:[]};b.TLine["0"]["0"].push({oEvent:E[_e].oEvent,bStart:true,dontClose:false,arInit:E[_e].arInit})}}}if(!t&&!b.TLine)continue;c=true;if(b.TLine){for(i=0;i<=23;i++){if(!b.TLine[i]&&i!=23)continue;for(n=0;n<60;n++){C=b.TLine[i]&&b.TLine[i][n]?b.TLine[i][n]:false;if(i==23&&n==59){if(C===false)C=[];for(_e in E){if(E[_e]&&typeof E[_e]=="object"&&E[_e].oEvent)C.push({oEvent:E[_e].oEvent,bStart:false,dontClose:true,arInit:E[_e].arInit})}}if(!C)continue;for(a=0,el=C.length;a<el;a++){T=C[a];if(T.bStart){E[T.oEvent.ID]=T;u++;if(c)f.push([]);v=f[f.length-1];freeRowId=false;c=false;if(v.length>1){for(x=0,L=v.length;x<L;x++){h=v[x];if(!h.bFilled){freeRowId=x;break}}}d={bFilled:true,evId:T.oEvent.ID,h_f:i,m_f:n};if(freeRowId!==false){d.arEvents=v[freeRowId].arEvents;v[freeRowId]=d}else{v.push(d)}}else{c=true;if(!T.dontClose){E[T.oEvent.ID]=false;u--}for(x=0,L=v.length;x<L;x++){h=v[x];if(h.bFilled&&h.evId==T.oEvent.ID){h.bFilled=false;r=this.BuildEventDiv_TL({Tab:e,dayInd:_,from:{h:h.h_f,m:h.m_f},to:{h:i,m:n},oEvent:T.oEvent,arInit:T.arInit});if(!h.arEvents)h.arEvents=[r];else h.arEvents.push(r)}if(h.bFilled&&c)c=false}}}}}}var m=e.pTimelineTable.rows[0].cells[_+1],y,I,g,D,S,x,L,w,M=m.offsetWidth-15;for(I=0,g=f.length;I<g;I++){y=f[I];D=y.length;S=Math.round((M-D)/D);for(x=0;x<y.length;x++){h=y[x];if(x==0){w=S;leftDrift=bxInt(h.arEvents[0].style.left);L=false}else{leftDrift+=S+1;L=leftDrift;if(x==y.length-1)w=M-(S+1)*(y.length-1)-1;else w=S}for(a=0;a<h.arEvents.length;a++){pEv=h.arEvents[a];pEv.style.width=w+"px";if(L!==false)pEv.style.left=L+"px"}}}}}catch(a){}};JCEC.prototype.BuildEventDiv_TL=function(e){var t=this,i=e.oEvent,n=e.from.m,a=e.to.m,r=Math.floor((e.from.h+n/60)*2),s=Math.floor((e.to.h+a/60)*2),o=e.Tab.pTimelineTable.rows[r].cells[this.__ConvertCellIndex(r,e.dayInd+1,true)],l=e.Tab.pTimelineTable.rows[s].cells[this.__ConvertCellIndex(s,e.dayInd+1,true)],d=bxInt(o.offsetTop)+1+bxGetPixel(true),f=bxInt(l.offsetTop)-1-bxGetPixel(),v=bxInt(o.offsetLeft)+2-bxGetPixel(),h=BX.create("DIV",{props:{className:"bxec-tl-event"+(i.bDark?" bxec-dark":"")},style:{left:v+"px",backgroundColor:i.displayColor},events:{mouseover:function(n){t.HighlightEvent_TL(i,this,false,e.Tab.id,n||window.event)},mouseout:function(n){t.HighlightEvent_TL(i,this,true,e.Tab.id,n||window.event)},dblclick:function(){t.ShowViewEventDialog(i)}}});i._originalWidth=false;i._originalHeight=false;i._eventViewed=false;i._contentSpan=false;var c=e.arInit.real_from,E=e.arInit.real_to,u=i.HOST||i.GUESTS&&i.GUESTS.length>0,p=u&&i.STATUS=="Q",b=p?'<b title="'+EC_MESS.NotConfirmed+'" class="bxec-stat-q">?</b>':"",_=u?'<img class="bxec-iconkit bxec-enc-icon" src="/bitrix/images/1.gif" align="top">':"",C=_+b+"<u "+this.GetEventLabelStyle(i)+">"+i.NAME+"</u><br />",T=zeroInt(c.hour)+":"+zeroInt(c.min);if(isNaN(bxInt(E.hour))){E.hour=23;E.min=59}var m=zeroInt(E.hour)+":"+zeroInt(E.min);if(n!=30&&n!=0)d+=Math.round((n>30?n-30:n)*40/60)-1;if(a!=30&&a!=0)f+=Math.round((a>30?a-30:a)*40/60)+2;var y=f-d;h.style.top=d+"px";h.style.height=y+"px";if(c.year==E.year&&c.month==E.month&&c.date==E.date)C+=T+" - "+m;else C+=i.DATE_FROM+" - "+i.DATE_TO;var I=h.appendChild(BX.create("DIV",{children:[BX.create("SPAN",{props:{className:"bxec-cnt-sp"},html:C})]}));this.BuildEventActions({cont:h,oEvent:i,evCont:h,bTimeline:true});e.Tab.pTimelineCont.appendChild(h);this.AppendHint2Event(i,I);if(!i.oTLParts[e.Tab.id])i.oTLParts[e.Tab.id]=[];i.oTLParts[e.Tab.id].push(h);return h};JCEC.prototype.HighlightEvent_TL=function(e,t,i,n,a){var r=this;if(!i&&!e._eventViewed){if(this._highlightIntKeypWnd==t&&this._highlightInt)return;if(this._highlightInt)clearInterval(this._highlightInt);if(!e._originalWidth)e._originalWidth=parseInt(t.style.width);if(!e._originalHeight)e._originalHeight=parseInt(t.style.height);e._contentSpan=BX.findChild(t,{className:"bxec-cnt-sp"},true);var s=0,o=e._originalWidth,l=parseInt(e._contentSpan.offsetWidth)+20,d=e._originalHeight,f=parseInt(e._contentSpan.offsetHeight)+30;if(l<=60)l=60;if(f<=55)f=55;if(l-o>0||f-d>0){this._highlightIntKeypWnd=t;this._highlightInt=setInterval(function(){var i=l-o<=0,n=f-d<=0;if(i&&n){e._eventViewed=true;return clearInterval(r._highlightInt)}s+=12;if(!i){o+=s;if(o>l)o=l+2;t.style.width=o+"px"}if(!n){d+=s;if(d>f)d=f+2;t.style.height=d+"px"}},5)}}else{if(this.CheckMouseInCont(t,a,-2))return true;this._highlightIntKeypWnd==false;if(this._highlightInt)clearInterval(this._highlightInt);this._highlightInt=false;if(e._originalWidth){t.style.width=e._originalWidth+"px";e._eventViewed=false}if(e._originalHeight){t.style.height=e._originalHeight+"px";e._eventViewed=false}}var v=i?BX.removeClass:BX.addClass;v(t,"bxec-event-over");if(e.oTLParts&&e.oTLParts[n]){var h=e.oTLParts[n],c=h.length,E;for(E=0;E<c;E++)v(h[E],"bxec-tl-ev-hlt")}};JCEC.prototype.DeleteEvent=function(e){if(!e||!e.ID)return false;if(e.IS_MEETING){if(e.HOST&&this.arConfig.userId==e.HOST.id||!e.HOST){if(!confirm(EC_MESS.DelMeetingConfirm))return false}else{if(!confirm(EC_MESS.DelMeetingGuestConfirm))return false}}else if(!confirm(EC_MESS.DelEventConfirm))return false;var t=this.GetPostData("delete",{id:bxInt(e.ID),name:e.NAME,calendar:bxInt(e.IBLOCK_SECTION_ID)});var i=this;this.Request({postData:t,errorText:EC_MESS.DelEventError,handler:function(t){return window._bx_result?i.DeleteEventClientSide(e):false}});return true};JCEC.prototype.DeleteEventClientSide=function(e,t){if(e.PERIOD&&t!==false){var i,n,a;for(n=0,a=this.arEvents.length;n<a;n++)if(this.arEvents[n]&&this.arEvents[n].ID==e.ID&&e.ind!=n)this.DeleteEventClientSide(this.arEvents[n],false)}this.ClearBlink(e);var r,s,o=[];for(var n=0,a=e.oParts.length;n<a;n++){r=e.oWeeks[n].dayIndex;for(s=0;s<6;s++){if(r>=s*7&&r<(s+1)*7){o.push(s);break}}e.oParts[n].parentNode.removeChild(e.oParts[n])}if(e.oDaysT&&e.oDaysT[this.activeTabId])e.oDaysT[this.activeTabId].parentNode.removeChild(e.oDaysT[this.activeTabId]);if(e.oTLParts&&e.oTLParts[this.activeTabId])for(n=0,a=e.oTLParts[this.activeTabId].length;n<a;n++)if(e.oTLParts[this.activeTabId][n])e.oTLParts[this.activeTabId][n].parentNode.removeChild(e.oTLParts[this.activeTabId][n]);this.arLoadedEventsId[this.GetEventSmartId(e)]=false;if(e.HOST&&e.HOST.parentId)this.arLoadedParentId[e.HOST.parentId]=false;this.arEvents[e.ind]=null;if(t!==false){this.SetTabNeedRefresh(this.activeTabId);switch(this.activeTabId){case"month":this.RefreshEventsOnWeeks(o);break;case"week":case"day":this.RelBuildEvents(this.activeTabId);break}}};JCEC.prototype.SimpleSaveNewEvent=function(e){var t=this.oAddEventDialog;if(t.oName.value.length<=0){t.bHold=true;alert(EC_MESS.EventNameError);setTimeout(function(){t.bHold=false},100);this.bAddEventDialogOver=true;return false}var i=t.curDialogParams.from,n=t.curDialogParams.to,a={name:t.oName.value,desc:t.oDesc.value,calendar:t.oCalendSelect.value,from:bxFormatDate(i.getDate(),i.getMonth()+1,i.getFullYear())+" "+t.curDialogParams.time_f,to:bxFormatDate(n.getDate(),n.getMonth()+1,n.getFullYear())+" "+t.curDialogParams.time_t};if(this.bUser){a.private_event=this.oCalendars[a.calendar]&&this.oCalendars[a.calendar].PRIVATE_STATUS=="private";a.accessibility=t.oAccessibility.value}this.SaveEvent(a);return true};JCEC.prototype.ExtendedSaveEvent=function(e){var t=this.oEditEventDialog,i=t.currentEvent,n=this,a,r=function(e){alert(e);this.bEditEventDialogOver=true;return false};if(t.oName.value.length<=0)return r(EC_MESS.EventNameError);var s={name:t.oName.value,calendar:t.oCalendSelect.value};if(i.ID>0&&i.IBLOCK_SECTION_ID!=s.calendar&&(this.IsDavCalendar(i.IBLOCK_SECTION_ID)||this.IsDavCalendar(s.calendar))){s.bRecreate=true;s.oldCalendar=i.IBLOCK_SECTION_ID}s.desc=window.pLHEEvDesc.GetContent();var o=bxGetDate(t.oFrom.value+" "+t.oFromTime.value);if(o)s.from=bxFormatDate(o.date,o.month,o.year)+(o.bTime?" "+zeroInt(o.hour)+":"+zeroInt(o.min):"");var l=bxGetDate(t.oTo.value+" "+t.oToTime.value);if(l)s.to=bxFormatDate(l.date,l.month,l.year)+(l.bTime?" "+zeroInt(l.hour)+":"+zeroInt(l.min):"");s.guests=[];s.arGuests=[];if(this.arConfig.bSocNet&&!this.IsDavCalendar(s.calendar)){if(t.GuestsLength&&t.GuestsLength>0){for(a in t.Guests){if(t.Guests[a]&&typeof t.Guests[a]=="object"&&t.Guests[a].user){s.guests.push(bxInt(a));s.arGuests.push(t.Guests[a].user)}}}s.isMeeting=s.guests.length>0;if(!s.isMeeting&&i&&i.GUESTS){for(a in i.GUESTS)if(typeof i.GUESTS[a]=="object"){s.isMeeting=true;break}}s.meetingText=t.oMeetTextCont.style.display=="block"?t.oMeetText.value.toString():""}if(i.HOST)s.host=i.HOST;if(i.ID)s.id=i.ID;s.loc_old=t.loc_old;s.loc_new=t.loc_new;s.loc_change=t.loc_change||(s.from!=i.DATE_FROM||s.to!=i.DATE_TO);if(!s.from)return r(EC_MESS.EventDiapStartError);if(!s.to){var d=bxGetDate(s.from);if(d)s.to=bxFormatDate(d.date,d.month,d.year)}if(t.oRepeatSelect.value!="none"){s.per_type=t.oRepeatSelect.value;s.per_count=t.oRepeatCount.value;if(t.bRepSetDiapFrom)s.per_from=s.from;else s.per_from=t.oRepeatDiapFrom;s.per_to=t.oRepeatDiapTo.value==EC_MESS.NoLimits?"no_limit":t.oRepeatDiapTo.value;if(s.per_type=="weekly"){var f=[];for(a=0;a<7;a++)if(t.oRepeatWeekDaysCh[a].checked)f.push(a);if(f.length==0)s.per_type=false;else s.per_week_days=f.join(",")}}else if(!t.bNew&&i.PERIOD&&i.PERIOD.TYPE&&i.PERIOD.TYPE!="NONE"){s.per_type="none"}if(s.loc_new.length>5&&s.loc_new.substr(0,5)=="ECMR_"&&!e.bLocationChecked){var v=this.GetPostData("check_mr_vr_accessability",{id:s.id||0,from:s.from,to:s.to,location_new:s.loc_new||"",location_old:s.loc_old||"",per_type:s.per_type||"",guest:s.guests.length>0?s.guests:[0]});this.Request({postData:v,handler:function(t){if(n.section_id===false)n.UpdateSectionId();if(window._bx_result===true){e.bLocationChecked=true;n.ExtendedSaveEvent(e)}else{alert(window._bx_result=="reserved"?EC_MESS.MRNotReservedErr:EC_MESS.MRReserveErr)}return true}});return false}if(this.arConfig.bSocNet){s.remind=t.oRemCheck.checked;s.remind_count=t.oRemCount.value||"";s.remind_count=s.remind_count.replace(/,/g,".");s.remind_count=s.remind_count.replace(/[^\d|\.]/g,"");s.remind_type=t.oRemType.value}s.importance=t.oImportance.value;if(this.bUser){s.accessibility=t.oAccessibility.value;s.private_event=t.oPrivate.checked}if(!t.bNew){s.id=i.ID;if(i.STATUS)s.status=i.STATUS}s.oEvent=i;this.SaveEvent(s);if(e.callback)e.callback()};JCEC.prototype.AddEventClientSide=function(e,t){var i=t.calendar||e.IBLOCK_SECTION_ID||0;if(!i&&window._bx_def_calendar&&window._bx_def_calendar.ID)i=window._bx_def_calendar.ID;if(!i)return;if(!this.oActiveCalendars[i])return this.ShowCalendar(this.oCalendars[i],true);var n="";if(e.LOC=="bxec_error_reserved")alert(EC_MESS.MRNotReservedErr);else if(e.LOC=="bxec_error_expire")alert(EC_MESS.MRNotExpireErr);else if(e.LOC=="bxec_error")alert(EC_MESS.MRReserveErr);else n=e.LOC;var a={ID:bxInt(e.ID),IBLOCK_ID:e.iblockId||this.iblockId,IBLOCK_SECTION_ID:i,NAME:bxSpCh(t.name),DATE_FROM:t.from,DATE_TO:t.to,DETAIL_TEXT:t.desc,GUESTS:t.arGuests||[],REMIND:t.remind&&t.remind_count&&t.remind_type?t.remind_count+"_"+t.remind_type:"",IMPORTANCE:t.importance||"normal",LOCATION:n,IS_MEETING:t.isMeeting};if(t.isMeeting&&e.arGuestConfirm&&false){var r;for(var s in t.arGuests){r=t.arGuests[s];if(typeof r=="object"&&r.status&&e.arGuestConfirm[r.id])t.arGuests[s].status=e.arGuestConfirm[r.id]}}if(this.bUser){a.ACCESSIBILITY=t.accessibility||"busy";a.PRIVATE=t.private_event||false}var o=this.arEvents.length;this.arEvents.push(a);this.arLoadedEventsId[this.GetEventSmartId(e)]=true;if(a.HOST&&a.HOST.parentId)this.arLoadedParentId[a.HOST.parentId]=true;this.SetTabNeedRefresh(this.activeTabId);switch(this.activeTabId){case"month":this.HandleEventMonth(a,o);this.RefreshEventsOnWeeks(this.GetEventWeeks(a));break;case"week":case"day":this.DeSelectTime(this.activeTabId);this.RelBuildEvents(this.activeTabId);break}};JCEC.prototype.ChandeEventClientSide=function(e,t){var i="";if(e.LOC=="bxec_error_reserved")alert(EC_MESS.MRNotReservedErr);else if(e.LOC=="bxec_error_expire")alert(EC_MESS.MRNotExpireErr);else if(e.LOC=="bxec_error")alert(EC_MESS.MRReserveErr);else i=e.LOC;var n=this.oEditEventDialog.currentEvent;n.NAME=bxSpCh(t.name);n.DETAIL_TEXT=t.desc;n.IBLOCK_SECTION_ID=bxInt(t.calendar);n.DATE_FROM=e.DATE_FROM;n.DATE_TO=e.DATE_TO;n.REMIND=t.remind&&t.remind_count&&t.remind_type?t.remind_count+"_"+t.remind_type:"";n.ACCESSIBILITY=t.accessibility||"busy";n.IMPORTANCE=t.importance||"normal";n.PRIVATE=t.private_event||false;n.LOCATION=i;n.MEETING_TEXT=t.meetingText;n.GUESTS=t.arGuests||[];n.IS_MEETING=t.isMeeting;if(t.isMeeting&&e.arGuestConfirm){var a;for(var r in t.arGuests){a=t.arGuests[r];if(typeof a=="object"&&a.status&&e.arGuestConfirm[a.id])t.arGuests[r].status=e.arGuestConfirm[a.id]}}this.SetTabNeedRefresh(this.activeTabId);switch(this.activeTabId){case"month":this.DisplayEventsMonth(true);break;case"week":case"day":this.DeSelectTime(this.activeTabId);this.RelBuildEvents(this.activeTabId);break}};JCEC.prototype.SaveEvent=function(e){var t=this.GetPostData();if(e.id){t.action="edit";t.id=e.id}else{t.action="add"}t.name=e.name;t.desc=e.desc||"";t.from=e.from;t.to=e.to;t.calendar=e.calendar;t.location_old=e.loc_old||"";t.location_new=e.loc_new||"";t.location_change=e.loc_change?"Y":"N";if(e.bRecreate){t.b_recreate="Y";t.old_calendar=e.oldCalendar}if(e.per_type){t.per_type=e.per_type||"";t.per_count=e.per_count||"";t.per_from=e.per_from||"";t.per_to=e.per_to||"";if(e.per_type=="weekly")t.per_week_days=e.per_week_days}if(e.remind){t.rem="Y";t.rem_type=e.remind_type;t.rem_count=e.remind_count}if(this.arConfig.bSocNet){t.is_meeting=e.isMeeting?"1":"0";if(e.isMeeting){t.meeting_text=e.meetingText||"";if(e.guests)t.guest=e.guests.length>0?e.guests:[0];if(e.host)t.host=e.host.parentId;if(e.status)t.status=e.status}}if(e.accessibility)t.accessibility=e.accessibility;if(e.importance)t.importance=e.importance;if(e.private_event)t.private_event=e.private_event;var i=this;this.Request({postData:t,errorText:EC_MESS.EventSaveError,handler:function(t){if(i.section_id===false)i.UpdateSectionId();if(window._bx_def_calendar)i.SaveCalendarClientSide(window._bx_def_calendar);if(e.per_type)return i.ReloadEvents();if(window._bx_new_event){i.AddEventClientSide(window._bx_new_event,e);if(e.bRecreate)i.DeleteEventClientSide(e.oEvent)}else if(window._bx_existent_event)i.ChandeEventClientSide(window._bx_existent_event,e);else return false;return true}})};JCEC.prototype.ConfirmEvent=function(e){var t=this;this.Request({postData:this.GetPostData("confirm_event",{id:e.ID}),handler:function(e){t.ReloadEvents();return true}})};JCEC.prototype.BlinkEvent=function(e){if(this.bReadOnly||!e||!e.display||e._blink||!this.arConfig.Settings.blink||e.bSuperposed)return;e._blink={};var t=this,i,n,a,r=e.oParts.length;e._blink.interval=setInterval(function(){t.BlinkInterval(e)},550)};JCEC.prototype.BlinkInterval=function(e){if(!this.arConfig.Settings.blink)return this.ClearBlink(e);_x_ClassName=e._blink.bRed?BX.removeClass:BX.addClass;var t,i,n="bxec-event-blink";switch(this.activeTabId){case"month":if(e.oParts){i=e.oParts.length;for(t=0;t<i;t++)if(e.oParts[t])_x_ClassName(e.oParts[t],n)}break;case"week":case"day":if(e.oDaysT&&e.oTLParts){if(e.oDaysT[this.activeTabId])_x_ClassName(e.oDaysT[this.activeTabId],n);i=e.oTLParts[this.activeTabId].length;for(t=0;t<i;t++)if(e.oTLParts[this.activeTabId][t])_x_ClassName(e.oTLParts[this.activeTabId][t],n)}break}e._blink.bRed=!e._blink.bRed};JCEC.prototype.ClearBlink=function(e){if(e._blink&&!e._blink.bCleared){clearInterval(e._blink.interval);var t,i,n="bxec-event-blink";if(e.oParts){i=e.oParts.length;for(t=0;t<i;t++)if(e.oParts[t])BX.removeClass(e.oParts[t],n)}if(e.oDaysT){if(e.oDaysT.week)BX.removeClass(e.oDaysT.week,n);if(e.oDaysT.day)BX.removeClass(e.oDaysT.day,n)}if(e.oTLParts){if(e.oTLParts.week){len2=e.oTLParts.week.length;for(t=0;t<len2;t++)if(e.oTLParts.week[t])BX.removeClass(e.oTLParts.week[t],n)}if(e.oTLParts.day){len2=e.oTLParts.day.length;for(t=0;t<len2;t++)if(e.oTLParts.day[t])BX.removeClass(e.oTLParts.day[t],n)}}e._blink.bCleared=true}}; //# sourceMappingURL=events.map.js
/var/www/axolotl/data/www/axolotl.ru/www/bitrix/js/intranet/event_calendar/events.min.js