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/rospirotorg.ru/bitrix/js/calendar/new/ |
Upload File : |
(function(e){function t(e){this.calendar=e;this.util=e.util;this.WEEK_TOP_MIN_HEIGHT=21;this.defaultBg={r:255,g:255,b:255};this.currentBg={r:250,g:250,b:250}}t.prototype={transit:function(e){var t=e.currentView,i=e.newView,n=e.currentView.getName(),o=e.newView.getName();this.currentViewDate=e.currentViewDate;this.newViewDate=e.newViewDate;if(n=="month"&&o=="week"){this.fromMonthToWeek(t,i)}else if(n=="month"&&o=="day"){this.fromMonthToDay(t,i)}else if(n=="month"&&o=="list"){this.fromMonthToList(t,i)}else if(n=="week"&&o=="month"){this.fromWeekToMonth(t,i)}else if(n=="week"&&o=="day"){this.fromWeekToDay(t,i)}else if(n=="week"&&o=="list"){this.fromWeekToList(t,i)}else if(n=="day"&&o=="week"){this.fromDayToWeek(t,i)}else if(n=="day"&&o=="month"){this.fromDayToMonth(t,i)}else if(n=="day"&&o=="list"){this.fromDayToList(t,i)}else if(n=="list"&&o=="month"){this.fromListToMonth(t,i)}else if(n=="list"&&o=="week"){this.fromListToWeek(t,i)}else if(n=="list"&&o=="day"){this.fromListToDay(t,i)}this.calendar.currentViewName=i.getName();if(i.switchNode){BX.addClass(i.switchNode,"--active")}if(t.switchNode){BX.removeClass(t.switchNode,"--active")}},fromMonthToWeek:function(e,t){var i=this,n=255,o=255,a=255,s=234,d=249,l=254,r=100,h=310,y=100;t.viewCont.style.opacity=0;t.show();BX.removeClass(t.grid,"calendar-events-holder-show");BX.removeClass(t.fullDayEventsCont,"calendar-events-holder-show");BX.removeClass(e.gridMonthContainer,"calendar-events-holder-show");var f=parseInt(t.fullDayEventsCont.style.height)||this.WEEK_TOP_MIN_HEIGHT,w=BX.pos(t.viewCont),c=e.monthRows.length,g=this.util.getDayCode(this.newViewDate),C=Math.ceil((e.dayIndex[g]+1)/e.dayCount)-1;if(!e.monthRows[C]){C=0}var v=e.monthRows[C].querySelectorAll(".calendar-grid-cell-inner");t.viewCont.style.display="block";t.viewCont.style.position="absolute";t.viewCont.style.top=0;t.viewCont.style.left=0;t.viewCont.style.width=w.width+"px";t.viewCont.style.height=w.height+"px";t.viewCont.style.zIndex=100;t.outerGrid.style.paddingLeft=0;t.fullDayEventsCont.style.height=0;t.titleCont.style.paddingLeft=0;e.gridWrap.style.overflow="hidden";e.gridWrap.style.height=BX.pos(t.gridWrap).height+"px";BX.addClass(e.viewCont,"calendar-animate-mod");this.firstStage=new BX.easing({duration:r,start:{red:n,green:o,blue:a},finish:{red:s,green:d,blue:l},step:function(t){e.monthRows[C].style.background="rgb("+t.red+","+t.green+","+t.blue+")";for(var i=0;i<v.length;i++){v[i].style.background="rgb("+t.red+","+t.green+","+t.blue+")"}},complete:function(){setTimeout((function(){BX.addClass(e.viewCont,"calendar-change-animate-month-to-week");BX.removeClass(e.gridMonthContainer,"calendar-events-holder-show");for(var n=0;n<c;n++){if(n!=C){e.monthRows[n].style.height=0;if(n+1<C){e.monthRows[n].style.borderBottom="none"}}else{e.monthRows[n].style.height=BX.pos(t.outerGrid).height+"px"}}setTimeout((function(){i.secontStage.animate()}),50)}),100)}});this.secontStage=new BX.easing({duration:h,start:{fadeShow:0,fadeHide:100},finish:{fadeShow:100,fadeHide:0},step:function(i){e.viewCont.style.opacity=i.fadeHide/100;t.viewCont.style.opacity=i.fadeShow/100},complete:BX.delegate((function(){this.thirdStage.animate();BX.addClass(t.grid,"calendar-events-holder-show");BX.addClass(t.fullDayEventsCont,"calendar-events-holder-show")}),this)});this.thirdStage=new BX.easing({duration:y,start:{paddingLeft:0,topHolderHeight:0},finish:{paddingLeft:43,topHolderHeight:f},step:function(e){t.outerGrid.style.paddingLeft=e.paddingLeft+"px";t.titleCont.style.paddingLeft=e.paddingLeft+"px"},complete:BX.delegate((function(){t.titleCont.style.paddingLeft="";e.gridMonthContainer.style.paddingLeft="";e.monthRows[C].style.background="";BX.removeClass(e.viewCont,"calendar-change-animate-month-to-week");this.adjustViewAnimate(e,t)}),this)});this.firstStage.animate()},fromMonthToDay:function(e,t){e.viewCont.style.width=e.viewCont.offsetWidth+"px";t.viewCont.style.opacity=0;t.viewCont.style.zIndex=110;t.show();this.calendar.viewsCont.style.height=t.viewCont.offsetHeight+"px";e.viewCont.style.position="absolute";e.viewCont.style.top=0;e.viewCont.style.left=0;var i=this.util.getDayCode(this.newViewDate);if(e.dayIndex[i]!==undefined&&e.days[e.dayIndex[i]]){var n=e.days[e.dayIndex[i]];var o=255,a=255,s=255,d=234,l=249,r=254,h=300,y=200,f=BX.pos(n.node),w=BX.pos(e.gridWrap),c=document.body.appendChild(BX.create("DIV",{props:{className:"calendar-animate-casper-day"},style:{top:f.top+"px",right:f.right+"px",bottom:f.bottom+"px",left:f.left+"px",height:f.height+"px",width:f.width+"px"}}));this.firstStage=new BX.easing({duration:h,start:{top:f.top,right:f.right,bottom:f.bottom,left:f.left,height:f.height,width:f.width,dayRed:o,dayGreen:a,dayBlue:s},finish:{top:w.top,right:w.right,bottom:w.bottom,left:w.left,height:w.height,width:w.width,dayRed:d,dayGreen:l,dayBlue:r},step:function(e){c.style.top=e.top+"px";c.style.right=e.right+"px";c.style.bottom=e.bottom+"px";c.style.left=e.left+"px";c.style.height=e.height+"px";c.style.width=e.width+"px";c.style.background="rgb("+e.dayRed+","+e.dayGreen+","+e.dayBlue+")"},complete:BX.delegate((function(){this.secondStage.animate();e.viewCont.style.opacity=0}),this)});this.secondStage=new BX.easing({duration:y,start:{hide:100,show:0},finish:{hide:0,show:100},step:function(e){t.viewCont.style.opacity=e.show/100;c.style.opacity=e.hide/100},complete:BX.delegate((function(){BX.addClass(this.calendar.mainCont,"calendar-main-container-small-calendar");BX.remove(c);this.adjustViewAnimate(e,t)}),this)});this.firstStage.animate()}},fromMonthToList:function(e,t){BX.addClass(this.calendar.mainCont,"calendar-main-container-small-calendar");t.show();this.adjustViewAnimate(e,t)},fromWeekToMonth:function(e,t){var i,n=this,o=255,a=255,s=255,d=234,l=249,r=254,h=100,y=75,f=75;t.viewCont.style.opacity=0;t.show();BX.removeClass(e.grid,"calendar-events-holder-show");BX.removeClass(e.fullDayEventsCont,"calendar-events-holder-show");BX.removeClass(t.gridMonthContainer,"calendar-events-holder-show");t.viewCont.style.display="block";var w=BX.pos(t.viewCont);t.viewCont.style.position="absolute";t.viewCont.style.top=0;t.viewCont.style.left=0;t.viewCont.style.width=w.width+"px";t.viewCont.style.height=w.height+"px";t.viewCont.style.zIndex=100;var c=this.util.getDayCode(this.currentViewDate),g=Math.ceil((t.dayIndex[c]+1)/t.dayCount)-1,C=e.outerGrid.querySelectorAll(".calendar-grid-cell-inner"),v=t.monthRows.length;if(!t.monthRows[g])g=0;var p=t.monthRows[g].querySelectorAll(".calendar-grid-cell-inner");BX.addClass(e.viewCont,"calendar-change-animate-week-to-month");for(i=0;i<p.length;i++){p[i].style.background="rgb("+d+","+l+","+r+")"}for(i=0;i<v;i++){t.monthRows[i].style.height=i!=g?0:BX.pos(e.outerGrid).height+"px"}BX.addClass(e.viewCont,"calendar-animate-mod");BX.addClass(t.viewCont,"calendar-animate-mod");this.calendar.viewsCont.style.height=t.viewCont.offsetHeight+"px";this.firstStage=new BX.easing({duration:h,start:{topHolderHeight:parseInt(e.fullDayEventsCont.style.height)||0,paddingLeft:43,fadeHide:100,red:o,green:a,blue:s},finish:{topHolderHeight:0,paddingLeft:0,fadeHide:0,red:d,green:l,blue:r},step:function(t){for(i=0;i<C.length;i++){C[i].style.background="rgb("+t.red+","+t.green+","+t.blue+")"}e.timeLinesCont.style.opacity=t.fadeHide/100;e.outerGrid.style.paddingLeft=t.paddingLeft+"px";e.titleCont.style.paddingLeft=t.paddingLeft+"px";e.fullDayEventsCont.style.height=t.topHolderHeight+"px"},complete:function(){setTimeout((function(){t.viewCont.style.opacity=1;e.viewCont.style.opacity=0;n.secondStage.animate()}),100)}});this.secondStage=new BX.easing({duration:y,start:{fadeHide:100},finish:{fadeHide:0},step:function(t){e.viewCont.style.opacity=t.fadeHide/100},complete:function(){for(i=0;i<v;i++){t.monthRows[i].style.height=t.rowHeight+"px"}setTimeout((function(){BX.addClass(t.gridMonthContainer,"calendar-events-holder-show");n.thirdStage.animate()}),410)}});this.thirdStage=new BX.easing({duration:f,start:{red:d,green:l,blue:r},finish:{red:o,green:a,blue:s},step:function(e){for(i=0;i<p.length;i++){p[i].style.background="rgb("+e.red+","+e.green+","+e.blue+")"}},complete:BX.delegate((function(){e.outerGrid.style.paddingLeft="";e.titleCont.style.paddingLeft="";e.fullDayEventsCont.style.height="";e.viewCont.style.opacity=0;for(i=0;i<C.length;i++){C[i].style.background=""}for(i=0;i<p.length;i++){p[i].style.background=""}BX.removeClass(e.viewCont,"calendar-change-animate-week-to-month");this.adjustViewAnimate(e,t)}),this)});this.firstStage.animate()},fromWeekToDay:function(e,t){t.viewCont.style.opacity=0;t.show();t.viewCont.style.display="block";var i=BX.pos(t.viewCont);t.viewCont.style.position="absolute";t.viewCont.style.top="0px";t.viewCont.style.left="0px";t.viewCont.style.width=i.width+"px";t.viewCont.style.height=i.height+"px";this.calendar.viewsCont.style.height=t.viewCont.offsetHeight+"px";t.viewCont.style.zIndex="100";BX.removeClass(e.grid,"calendar-events-holder-show");BX.removeClass(e.fullDayEventsCont,"calendar-events-holder-show");BX.removeClass(t.grid,"calendar-events-holder-show");BX.removeClass(t.fullDayEventsCont,"calendar-events-holder-show");var n=255,o=255,a=255,s=234,d=249,l=254,r=this.util.getDayCode(this.newViewDate),h=e.days[e.dayIndex[r]],y=75,f=310,w=e.titleCont.children.length;if(!h){h=e.days[this.util.getWeekDayOffset(this.util.getWeekDayByInd(this.newViewDate.getDay()))]}BX.addClass(e.viewCont,"calendar-animate-mod");var c=new BX.easing({duration:y,start:{topHolderHeight:parseInt(e.fullDayEventsCont.style.height)||this.WEEK_TOP_MIN_HEIGHT,red:n,green:o,blue:a},finish:{topHolderHeight:this.WEEK_TOP_MIN_HEIGHT,red:s,green:d,blue:l},step:function(t){h.node.style.background="rgb("+t.red+","+t.green+","+t.blue+")";e.fullDayEventsCont.style.height=t.topHolderHeight+"px";if(e.titleCont.children[h.dayOffset]){e.titleCont.children[h.dayOffset].style.background="rgb("+t.red+","+t.green+","+t.blue+")"}},complete:function(){setTimeout((function(){BX.addClass(e.viewCont,"calendar-change-animate-week-to-day");BX.removeClass(e.gridMonthContainer,"calendar-events-holder-show");for(var i=0;i<w;i++){if(i!=h.dayOffset){e.gridRow.children[i].style.flex=0;e.titleCont.children[i].style.flex=0}}setTimeout((function(){g.animate();BX.addClass(t.grid,"calendar-events-holder-show");BX.addClass(t.fullDayEventsCont,"calendar-events-holder-show")}),210)}),150)}});var g=new BX.easing({duration:f,start:{fadeShow:0,fadeHide:100},finish:{fadeShow:100,fadeHide:0},step:function(i){e.viewCont.style.opacity=i.fadeHide/100;t.viewCont.style.opacity=i.fadeShow/100},complete:BX.delegate((function(){h.node.style.background="";if(e.titleCont.children[h.dayOffset]){e.titleCont.children[h.dayOffset].style.background=""}BX.addClass(this.calendar.mainCont,"calendar-main-container-small-calendar");this.adjustViewAnimate(e,t)}),this)});c.animate()},fromWeekToList:function(e,t){BX.addClass(this.calendar.mainCont,"calendar-main-container-small-calendar");t.show();this.adjustViewAnimate(e,t)},fromDayToMonth:function(e,t){BX.removeClass(this.calendar.mainCont,"calendar-main-container-small-calendar");var i=e.days[0].dayCode,n=255,o=255,a=255,s=234,d=249,l=254,r,h=250,y=300;this.firstStage=BX.delegate((function(){t.viewCont.style.opacity=0;t.viewCont.style.zIndex=110;t.show();t.viewCont.style.width=e.viewCont.offsetWidth+"px";t.viewCont.style.position="absolute";t.viewCont.style.top=0;t.viewCont.style.left=0;this.calendar.viewsCont.style.height=t.viewCont.offsetHeight+"px";var r=t.days[t.dayIndex[i]],f=BX.pos(r.node),w=BX.pos(t.gridWrap),c=document.body.appendChild(BX.create("DIV",{props:{className:"calendar-animate-casper-day"},style:{opacity:0,top:w.top+"px",right:w.right+"px",bottom:w.bottom+"px",left:w.left+"px",height:w.height+"px",width:w.width+"px",background:"#000"}}));this.secondStage=new BX.easing({duration:h,start:{hide:100,show:0,dayRed:n,dayGreen:o,dayBlue:a},finish:{hide:0,show:100,dayRed:s,dayGreen:d,dayBlue:l},step:function(t){e.viewCont.style.opacity=t.hide/100;c.style.opacity=t.show/100;c.style.background="rgb("+t.dayRed+","+t.dayGreen+","+t.dayBlue+")"},complete:BX.delegate((function(){t.viewCont.style.opacity=1;this.thirdStage.animate()}),this)});this.thirdStage=new BX.easing({duration:y,start:{top:w.top,right:w.right,bottom:w.bottom,left:w.left,height:w.height,width:w.width,dayRed:s,dayGreen:d,dayBlue:l},finish:{top:f.top,right:f.right,bottom:f.bottom,left:f.left,height:f.height,width:f.width,dayRed:n,dayGreen:o,dayBlue:a},step:function(e){c.style.show=e.top+"px";c.style.top=e.top+"px";c.style.right=e.right+"px";c.style.bottom=e.bottom+"px";c.style.left=e.left+"px";c.style.height=e.height+"px";c.style.width=e.width+"px";c.style.background="rgb("+e.dayRed+","+e.dayGreen+","+e.dayBlue+")"},complete:BX.delegate((function(){BX.remove(c);this.adjustViewAnimate(e,t)}),this)});this.secondStage.animate()}),this);setTimeout(BX.delegate(this.firstStage,this),300)},fromDayToWeek:function(e,t){BX.removeClass(this.calendar.mainCont,"calendar-main-container-small-calendar");var i=255,n=255,o=255,a=234,s=249,d=254,l=100,r=310,h=100;setTimeout(BX.delegate((function(){t.viewCont.style.opacity=0;t.show();var y=parseInt(t.fullDayEventsCont.style.height)||this.WEEK_TOP_MIN_HEIGHT,f=BX.pos(t.viewCont);t.viewCont.style.display="block";t.viewCont.style.position="absolute";t.viewCont.style.top=0;t.viewCont.style.left=0;t.viewCont.style.width=f.width+"px";t.viewCont.style.height=f.height+"px";t.viewCont.style.zIndex=100;t.fullDayEventsCont.style.height=0;this.calendar.viewsCont.style.height=t.viewCont.offsetHeight+"px";BX.removeClass(t.grid,"calendar-events-holder-show");BX.removeClass(t.fullDayEventsCont,"calendar-events-holder-show");BX.removeClass(e.grid,"calendar-events-holder-show");BX.removeClass(e.fullDayEventsCont,"calendar-events-holder-show");var w=this.util.getDayCode(this.currentViewDate),c=t.days[t.dayIndex[w]],g=t.titleCont.children.length;if(!c){w=this.util.getDayCode(this.newViewDate);c=t.days[t.dayIndex[w]]}c.node.style.background="rgb("+a+","+s+","+d+")";if(t.titleCont.children[c.dayOffset]){t.titleCont.children[c.dayOffset].style.background="rgb("+a+","+s+","+d+")"}for(var C=0;C<g;C++){if(C!=c.dayOffset){t.gridRow.children[C].style.flex=0;t.titleCont.children[C].style.flex=0}}var v=new BX.easing({duration:l,start:{topHolderHeight:parseInt(e.fullDayEventsCont.style.height)||this.WEEK_TOP_MIN_HEIGHT,topPadding:10,red:i,green:n,blue:o},finish:{topHolderHeight:this.WEEK_TOP_MIN_HEIGHT,topPadding:0,red:a,green:s,blue:d},step:function(t){e.fullDayEventsCont.style.height=t.topHolderHeight+"px";e.outerGrid.children[0].style.background="rgb("+t.red+","+t.green+","+t.blue+")";e.viewCont.style.paddingTop=t.topPadding+"px"},complete:BX.delegate((function(){setTimeout((function(){BX.addClass(e.viewCont,"calendar-change-animate-day-to-week");BX.removeClass(e.viewCont,"calendar-animate-mod");e.outerGrid.children[0].style.background="";t.viewCont.style.opacity=1;BX.addClass(t.viewCont,"calendar-animate-mod");for(var i=0;i<g;i++){t.gridRow.children[i].style.flex=1;t.titleCont.children[i].style.flex=1}setTimeout((function(){p.animate()}),50)}),100)}),this)});var p=new BX.easing({duration:r,start:{fadeHide:100},finish:{fadeHide:0},step:function(t){e.viewCont.style.opacity=t.fadeHide/100},complete:BX.delegate((function(){u.animate();BX.addClass(t.grid,"calendar-events-holder-show");BX.addClass(t.fullDayEventsCont,"calendar-events-holder-show")}),this)});var u=new BX.easing({duration:h,start:{topHolderHeight:this.WEEK_TOP_MIN_HEIGHT,red:a,green:s,blue:d},finish:{topHolderHeight:y,red:i,green:n,blue:o},step:function(e){c.node.style.background="rgb("+e.red+","+e.green+","+e.blue+")";if(t.titleCont.children[c.dayOffset]){t.titleCont.children[c.dayOffset].style.background="rgb("+e.red+","+e.green+","+e.blue+")"}},complete:BX.delegate((function(){e.outerGrid.children[0].style.background="";if(t.titleCont.children[c.dayOffset]){t.titleCont.children[c.dayOffset].style.background=""}c.node.style.background="";BX.removeClass(e.viewCont,"calendar-change-animate-day-to-week");this.adjustViewAnimate(e,t)}),this)});v.animate()}),this),200)},fromDayToList:function(e,t){t.show();this.adjustViewAnimate(e,t)},fromListToMonth:function(e,t){var i=300,n=350;BX.removeClass(t.gridMonthContainer,"calendar-events-holder-show");BX.removeClass(this.calendar.mainCont,"calendar-main-container-small-calendar");setTimeout(BX.delegate((function(){t.viewCont.style.opacity=0;t.show();var e=BX.pos(t.viewCont);t.viewCont.style.display="block";t.viewCont.style.overflow="hidden";t.viewCont.style.position="absolute";t.viewCont.style.top=0;t.viewCont.style.left=0;t.viewCont.style.width=e.width+"px";t.viewCont.style.height=e.height+"px";this.calendar.viewsCont.style.height=t.viewCont.offsetHeight+"px";t.viewCont.style.zIndex=100;this.calendar.viewsCont.style.overflow="hidden";this.firstStage.animate()}),this),i);this.firstStage=new BX.easing({duration:n,start:{fadeShow:0,fadeHide:100},finish:{fadeShow:100,fadeHide:0},step:function(i){e.viewCont.style.opacity=i.fadeHide/100;t.viewCont.style.opacity=i.fadeShow/100},complete:BX.delegate((function(){this.adjustViewAnimate(e,t)}),this)})},fromListToWeek:function(e,t){var i=300,n=350;BX.removeClass(t.gridMonthContainer,"calendar-events-holder-show");BX.removeClass(this.calendar.mainCont,"calendar-main-container-small-calendar");setTimeout(BX.delegate((function(){t.viewCont.style.opacity=0;t.show();var e=BX.pos(t.viewCont);t.viewCont.style.display="block";t.viewCont.style.overflow="hidden";t.viewCont.style.position="absolute";t.viewCont.style.top=0;t.viewCont.style.left=0;t.viewCont.style.width=e.width+"px";t.viewCont.style.height=e.height+"px";this.calendar.viewsCont.style.height=t.viewCont.offsetHeight+"px";t.viewCont.style.zIndex=100;this.calendar.viewsCont.style.overflow="hidden";this.firstStage.animate()}),this),i);this.firstStage=new BX.easing({duration:n,start:{fadeShow:0,fadeHide:100},finish:{fadeShow:100,fadeHide:0},step:function(i){e.viewCont.style.opacity=i.fadeHide/100;t.viewCont.style.opacity=i.fadeShow/100},complete:BX.delegate((function(){this.adjustViewAnimate(e,t)}),this)})},fromListToDay:function(e,t){t.show();this.calendar.viewsCont.style.height=t.viewCont.offsetHeight+"px";this.adjustViewAnimate(e,t)},adjustViewAnimate:function(e,t){t.viewCont.style.cssText="";e.viewCont.style.cssText="";BX.removeClass(e.viewCont,"calendar-animate-mod");BX.removeClass(t.viewCont,"calendar-animate-mod");e.viewCont.style.display="none";BX.addClass(t.gridMonthContainer,"calendar-events-holder-show");this.calendar.viewsCont.style.height=t.viewCont.offsetHeight+"px";if(t.getName()!==this.calendar.currentViewName){e.hide()}}};if(e.BXEventCalendar){e.BXEventCalendar.ViewTransition=t}else{BX.addCustomEvent(e,"onBXEventCalendarInit",(function(){e.BXEventCalendar.ViewTransition=t}))}})(window); //# sourceMappingURL=calendar-view-transition.map.js