403Webshell
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 :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/js/calendar/new/calendar-view-list.min.js
(function(e){var t=e.BXEventCalendarView;function i(){t.apply(this,arguments);this.name="list";this.filterMode=false;this.title=BX.message("EC_VIEW_LIST");this.hotkey="A";this.contClassName="calendar-list-view";this.SCROLL_DELTA_HEIGHT=180;this.todayCode=this.calendar.util.getDayCode(new Date);this.focusDate=new Date;this.removeLoadingOnScroll=false;this.isBoundaryOfPastReached=false;this.isBoundaryOfFutureReached=false;this.DOM={};this.loadMoreEntriesDebounce=BX.Runtime.debounce(this.loadMoreEntries,300,this);BX.Event.EventEmitter.unsubscribe("BX.Calendar:onEntryListReload",this.handleOnEntryListReload.bind(this));BX.Event.EventEmitter.subscribe("BX.Calendar:onEntryListReload",this.handleOnEntryListReload.bind(this));this.preBuild()}i.prototype=Object.create(t.prototype);i.prototype.constructor=i;i.prototype.preBuild=function(){this.viewCont=BX.create("DIV",{props:{className:this.contClassName},style:{display:"none"}});BX.addCustomEvent(this.calendar,"afterSetView",BX.delegate((function(e){if(e.viewName!==this.name&&this.filterMode){this.resetFilterMode(e)}}),this))};i.prototype.build=function(){this.titleCont=this.viewCont.appendChild(BX.create("DIV",{props:{className:"calendar-grid-month-row-days-week"}}));this.streamScrollWrap=this.viewCont.appendChild(BX.create("DIV",{props:{className:"calendar-timeline-stream-container calendar-custom-scroll"},style:{height:this.util.getViewHeight()+"px"}}));this.streamScrollWrap.addEventListener("scroll",this.scrollHandle.bind(this));this.streamScrollWrap.addEventListener("wheel",this.mouseWheelHandle.bind(this),{passive:true});this.streamContentWrap=this.streamScrollWrap.appendChild(BX.create("DIV",{props:{className:"calendar-timeline-stream-container-content"}}));this.topLoaderBlock=this.streamContentWrap.appendChild(BX.create("DIV",{props:{className:"calendar-timeline-loader --top"}}));this.listWrap=this.streamContentWrap.appendChild(BX.create("DIV",{props:{className:"calendar-timeline-stream-container-list"}}));this.bottomLoaderBlock=this.streamContentWrap.appendChild(BX.create("DIV",{props:{className:"calendar-timeline-loader --bottom"}}));this.topLoaderBlock.innerHTML=`\n\t\t\t<div class="calendar-timeline-loader_icon"></div>\n\t\t\t<div class="calendar-timeline-loader_text">${BX.message("EC_CALENDAR_NO_MORE_EVENTS_PAST")}</div>\n\t\t`;this.bottomLoaderBlock.innerHTML=`\n\t\t\t<div class="calendar-timeline-loader_icon"></div>\n\t\t\t<div class="calendar-timeline-loader_text">${BX.message("EC_CALENDAR_NO_MORE_EVENTS_FUTURE")}</div>\n\t\t`;this.topLoaderBlock.style.display="none";this.bottomLoaderBlock.style.display="none";this.centerLoaderWrap=this.streamScrollWrap.appendChild(BX.create("DIV",{props:{className:"calendar-center-loader-block"}}))};i.prototype.setTitle=function(){var e=this.calendar.getViewRangeDate();t.prototype.setTitle.apply(this,[BX.date.format("f",e.getTime()/1e3)+", #GRAY_START#"+e.getFullYear()+"#GRAY_END#"])};i.prototype.show=function(e){e=e||{};if(!this.loaderCircle){this.loaderCircle=new BX.Loader({target:this.viewCont});this.loaderCircle.show()}t.prototype.show.apply(this,arguments);this.showNavigationCalendar();BX.remove(this.calendar.additionalInfoOuter);if(!this.displayedRange){const e=parseInt(this.calendar.util.config.init_year);const t=parseInt(this.calendar.util.config.init_month);this.displayedRange={start:new Date(e,t-2,1),end:new Date(e,t+2,1)}}if(this.calendar.viewsCont.style.height===""){this.calendar.viewsCont.style.height=this.util.getViewHeight()+"px"}BX.removeClass(this.streamContentWrap,"calendar-timeline-stream-search-result");this.calendar.setDisplayedViewRange(this.displayedRange);if(e.displayEntries!==false){this.loadEntries({direction:"both"}).then((e=>{this.entries=e;this.displayEntries({focusDate:this.focusDate})}))}};i.prototype.loadEntries=function(e={}){return new Promise((t=>{this.entryController.getList({startDate:this.displayedRange.start,finishDate:this.displayedRange.end,viewRange:{start:new Date(this.displayedRange.start),end:new Date(this.displayedRange.end)},...e}).then((e=>{this.displayedRange=this.calendar.entryController.getLoadedEntiesLimits();t(e)}))}))};i.prototype.redraw=function(){if(this.filterMode){if(!this.calendar.search.isFilterEmpty()){this.calendar.search.applyFilter()}}else{this.displayEntries({dontFocus:true})}};i.prototype.reload=function(){this.loadEntries({direction:"both"}).then((e=>{this.entries=e;this.redraw()}))};i.prototype.displayEntries=function(e={}){if(this.filterMode){return}BX.cleanNode(this.listWrap);this.dateGroupIndex={};this.groups=[];this.groupsDayCodes=[];this.groupsIndex={};this.entryListIndex={};if(this.entries===false||!this.entries||!this.entries.length){this.loaderCircle.hide();return this.showEmptyBlock()}else if(this.noEntriesWrap){this.noEntriesWrap.style.display="none"}this.streamContentWrap.style.display="";this.entryParts=[];BX.cleanNode(this.centerLoaderWrap);this.centerLoaderWrap.appendChild(BX.adjust(this.calendar.util.getLoader(),{style:{height:"180px"}}));this.attachEntries(this.entries,!!e.animation,(()=>{if(e.dontFocus){return}this.focusOnDate(e.focusDate??this.getCurrentViewDate())}),e.focusDate);this.loaderCircle.hide()};i.prototype.displayResult=function(e){this.streamContentWrap.style.display="";BX.cleanNode(this.listWrap);this.dateGroupIndex={};this.groups=[];this.groupsDayCodes=[];this.groupsIndex={};this.entryListIndex={};this.resultEntries=e;this.resultEntriesIndex={};e.forEach((function(e,t){this.resultEntriesIndex[e.uid]=t}),this);if(e===false||!e||!e.length){if(this.loaderCircle){this.loaderCircle.hide()}return this.showEmptyBlock()}else if(this.noEntriesWrap){this.noEntriesWrap.style.display="none"}this.streamContentWrap.style.display="";this.entryParts=[];this.attachEntries(e,"next");if(this.loaderCircle){this.loaderCircle.hide()}};i.prototype.attachEntries=function(e,t,i){if(!e&&!e.length){if(BX.type.isFunction(i)){i()}return}var s=this.entries.length-e.length,a=s,n,r,o,l,d;e.forEach((function(e){e.globalIndex=a++;l=this.calendar.util.getDayCode(e.from);d=this.calendar.util.getDayCode(e.to);const t=l;this.entryParts.push({dayCode:t,from:e.from,fromCode:l,toCode:d,entry:e,allDay:e.isFullDay()||t!==l&&t!==d,isUntil:t!==l&&t===d});if(l!==d){r=new Date(e.from.getFullYear(),e.from.getMonth(),e.from.getDate()).getTime();n=new Date(e.from.getTime());o=new Date(e.to.getFullYear(),e.to.getMonth(),e.to.getDate()).getTime();while(r<=o){const t=this.calendar.util.getDayCode(n);this.entryParts.push({dayCode:t,from:n,fromCode:l,toCode:d,entry:e,allDay:e.isFullDay()||t!==l&&t!==d,isUntil:t!==l&&t===d});r+=this.calendar.util.dayLength;n=new Date(n.getTime()+this.calendar.util.dayLength)}}}),this);this.entryParts=this.sortParts(this.entryParts);this.today=new Date;for(let e=0;e<this.entryParts.length;e++){this.displayEntry(this.entryParts[e])}if(!this.filterMode){if(!this.groups[this.groupsIndex[this.todayCode]]){this.createEntryGroupForDate(this.today)}this.groupsDayCodes.sort();if(BX.type.isFunction(i)){i()}}setTimeout((()=>{this.streamScrollWrap.style.height=Math.min(this.streamContentWrap.offsetHeight,this.util.getViewHeight())+"px";if(this.viewCont.offsetHeight>0){this.calendar.viewsCont.style.height=this.viewCont.offsetHeight+"px"}this.streamScrollWrap.style.height=this.util.getViewHeight()+"px"}),300)};i.prototype.sortParts=function(e){e.sort(((e,t)=>{if(e.entry.isTask()!==t.entry.isTask()){if(e.entry.isTask()){return 1}if(t.entry.isTask()){return-1}}if(e.allDay!==t.allDay){if(e.allDay){return 1}if(t.allDay){return-1}}if(e.allDay&&t.allDay){if(e.from.getTime()===t.from.getTime()){if(e.entry.from.getTime()===t.entry.from.getTime()){return parseInt(e.entry.id)-parseInt(t.entry.id)}return e.entry.from.getTime()-t.entry.from.getTime()}return e.from.getTime()-t.from.getTime()}if(e.isUntil!==t.isUntil){if(e.isUntil){return 1}if(t.isUntil){return-1}}if(e.isUntil&&t.isUntil){return e.entry.to.getTime()-t.entry.to.getTime()}if(e.from.getTime()===t.from.getTime()){if(e.entry.to.getTime()===t.entry.to.getTime()){return parseInt(e.entry.id)-parseInt(t.entry.id)}return e.entry.to.getTime()-t.entry.to.getTime()}return e.from.getTime()-t.from.getTime()}));return e};i.prototype.displayEntry=function(e){var t;var i=this.calendar.util.getDayCode(this.focusDate);if(e.from.getTime()>this.focusDate.getTime()&&!this.groups[this.groupsIndex[i]]&&!this.filterMode){this.createEntryGroupForDate(this.focusDate)}t=this.groups[this.groupsIndex[e.dayCode]];if(!t){this.createEntryGroupForDate(e.from);t=this.groups[this.groupsIndex[e.dayCode]]}if(t.emptyWarning){BX.remove(t.emptyWarning)}BX.cleanNode(this.centerLoaderWrap);var s=this.getUniqueId(e);var a=!this.entryListIndex[s];if(a){this.entryListIndex[s]=true;var n,r,o,l=e.entry;this.entriesIndex[l.uid]=l.globalIndex;if(l.isFullDay()){n=BX.message("EC_ALL_DAY")}else if(l.isLongWithTime()){if(e.dayCode===e.fromCode){n=this.calendar.util.formatTime(l.from)}else if(e.dayCode===e.toCode){n=BX.message("EC_TILL_TIME").replace("#TIME#",this.calendar.util.formatTime(l.to))}else{n=BX.message("EC_ALL_DAY")}}else{n=this.calendar.util.formatTime(l.from.getHours(),l.from.getMinutes())+" &ndash; "+this.calendar.util.formatTime(l.to.getHours(),l.to.getMinutes())}let i="";if(this.shouldEntryLookLikeSharing(l)){i="calendar-timeline-stream-content-event-sharing"}else if(this.shouldEntryLookLikeCollab(l)){i="calendar-timeline-stream-content-event-collab"}r=t.content.appendChild(BX.create("DIV",{attrs:{"data-bx-calendar-entry":l.uid},props:{className:["calendar-timeline-stream-content-event",i].filter((e=>e)).join(" ")}}));r.appendChild(BX.create("DIV",{props:{className:"calendar-timeline-stream-content-event-time"},html:'<span class="calendar-timeline-stream-content-event-time-link">'+n+"</span>"+(l.isRecursive()?'<span class="calendar-timeline-stream-content-event-recursive" title="'+(l.data["~RRULE_DESCRIPTION"]||"")+'">'+BX.message("EC_CALENDAR_REC_EVENT")+"</span>":"")}));var d=this.calendar.util.getTextLocation(l.location)||"";if(d){d='<span class="calendar-timeline-stream-content-event-location">('+BX.util.htmlspecialchars(d)+")</span>"}const a=BX.create("DIV",{props:{className:"calendar-timeline-stream-content-event-title-wrap"},html:'<div class="calendar-timeline-stream-content-event-name-link"><span>'+BX.util.htmlspecialchars(l.name)+"</span></div>"+d});if(l.isInvited()){r.className+=" calendar-timeline-stream-content-event-invited";if(this.isFirstVisibleRecursiveEntry(l)){a.prepend(BX.create("SPAN",{props:{className:"calendar-event-invite-counter"},text:"1"}))}else{a.prepend(BX.create("SPAN",{props:{className:"calendar-event-invite-counter-dot"}}))}}else{a.prepend(BX.create("SPAN",{props:{className:"calendar-timeline-stream-content-event-color"},style:{backgroundColor:l.color}}))}const h=BX.create("DIV",{props:{className:"calendar-timeline-stream-content-event-name"}});h.append(a);if(this.shouldEntryLookLikeCollab(l)&&l.getCollabId()){const e=this.calendar.collabManager.getById(l.getCollabId());const t=this.calendar.util.config.type==="group"&&this.calendar.util.config.ownerId===e.getId();if(e&&!t){const t=BX.Loc.getMessage("EC_VIEW_COLLAB_PREFIXED_NAME",{"#TITLE#":e.getName(),"[collab_prefix]":'<span class="collab-prefix">',"[/collab_prefix]":"</span>"});const i=BX.Tag.render`
						<div class="calendar-timeline-stream-content-collab-block">
							<span class="calendar-timeline-stream-content-collab-name">
								${t}
							</span>
						</div>
					`;h.append(i)}}r.append(h);if(parseInt(this.calendar.util.userId)!==parseInt(l.data.MEETING_HOST)&&parseInt(this.calendar.util.userId)===parseInt(l.data.CREATED_BY)&&l.data.MEETING_STATUS==="Q"){r.appendChild(BX.create("DIV",{props:{className:"calendar-timeline-stream-content-event-control"},children:[this.getDecisionButton("Y").getContainer(),this.getDecisionButton("N").getContainer()]}))}o=r.appendChild(BX.create("DIV",{props:{className:"calendar-timeline-stream-content-event-members"}}));if(l.isMeeting()&&l.getAttendees().length>0){this.showAttendees(o,l.getAttendees())}else if(l.isPersonal()){o.innerHTML=BX.message("EC_EVENT_IS_MINE")}e.DOM={}}};i.prototype.showAttendees=function(e,t){var i,s,a=3,n=t.length,r=5,o=0;if(n>0){if(n>r){n=a}for(i=0;i<t.length;i++){s=t[i]||{};if(s.STATUS==="Y"||s.STATUS==="H"){o++;if(s.COLLAB_USER){const t=new BX.UI.AvatarRoundGuest({size:22,userName:s.DISPLAY_NAME,userpicPath:s.AVATAR&&s.AVATAR!=="/bitrix/images/1.gif"?s.AVATAR:null,baseColor:"#19cc45"}).getContainer();e.appendChild(t)}else if(s.AVATAR!=="/bitrix/images/1.gif"){e.appendChild(BX.create("IMG",{attrs:{id:"simple_view_popup_"+s.ID,src:encodeURI(s.AVATAR)||"","bx-tooltip-user-id":s.ID},props:{className:"calendar-member"}}))}else{if(s.SHARING_USER){e.appendChild(BX.create("DIV",{attrs:{id:"simple_view_popup_"+s.ID,"bx-tooltip-user-id":s.ID},props:{className:"calendar-event-block-icon-sharing calendar-event-block-icon-sharing-view-list"}}))}else{var l=s.EMAIL_USER?"ui-icon-common-user-mail":"ui-icon-common-user";e.appendChild(BX.create("DIV",{props:{title:s.DISPLAY_NAME,className:"ui-icon "+l},html:"<i></i>"}))}}}if(o>=n){break}}if(n<t.length){var d=e.appendChild(BX.create("SPAN",{attrs:{"data-bx-calendar-entry-attendees-control":t.length},props:{className:"calendar-member-more-count"},text:" "+BX.message("EC_ATTENDEES_ALL_COUNT").replace("#COUNT#",t.length),events:{click:BX.delegate((function(){this.showUserListPopup(d,t)}),this)}}))}}};i.prototype.showUserListPopup=function(e,t){new BX.Calendar.Controls.AttendeesList(e,BX.Calendar.Controls.AttendeesList.sortAttendees(t)).showPopup()};i.prototype.appendDateGroup=function(e,t){var i,s,a,n,r,o,l=t.getDate(),d=t.getMonth()+1,h=t.getFullYear();if(!this.dateGroupIndex[h]){n=Infinity;r=h;for(i in this.dateGroupIndex){if(this.dateGroupIndex.hasOwnProperty(i)){if(Math.abs(h-i)<n){n=Math.abs(h-i);r=i}if(n==1){break}}}this.dateGroupIndex[h]={node:BX.create("DIV",{attrs:{"data-bx-calendar-list-year":h}}),monthIndex:{}};if(r==h){this.listWrap.appendChild(this.dateGroupIndex[h].node)}else{if(h-r>0){if(this.dateGroupIndex[r].node.nextSibling){BX.insertAfter(this.dateGroupIndex[h].node,this.dateGroupIndex[r].node)}else{this.listWrap.appendChild(this.dateGroupIndex[h].node)}}else{this.listWrap.insertBefore(this.dateGroupIndex[h].node,this.dateGroupIndex[r].node)}}}if(!this.dateGroupIndex[h].monthIndex[d]){n=Infinity;r=d;for(s in this.dateGroupIndex[h].monthIndex){if(this.dateGroupIndex[h].monthIndex.hasOwnProperty(s)){if(Math.abs(d-s)<n){n=Math.abs(d-s);r=s}if(n==1){break}}}this.dateGroupIndex[h].monthIndex[d]={node:BX.create("DIV",{attrs:{"data-bx-calendar-list-month":d}}),dayIndex:{}};if(r==d){this.dateGroupIndex[h].node.appendChild(this.dateGroupIndex[h].monthIndex[d].node)}else{if(d-r>0){if(this.dateGroupIndex[h].monthIndex[r].node.nextSibling){BX.insertAfter(this.dateGroupIndex[h].monthIndex[d].node,this.dateGroupIndex[h].monthIndex[r].node)}else{this.dateGroupIndex[h].node.appendChild(this.dateGroupIndex[h].monthIndex[d].node)}}else{this.dateGroupIndex[h].monthIndex[r].node.parentNode.insertBefore(this.dateGroupIndex[h].monthIndex[d].node,this.dateGroupIndex[h].monthIndex[r].node)}}}if(!this.dateGroupIndex[h].monthIndex[d].dayIndex[l]){n=Infinity;r=l;o=this.dateGroupIndex[h].monthIndex;for(a in o[d].dayIndex){if(o[d].dayIndex.hasOwnProperty(a)){if(Math.abs(l-a)<n){n=Math.abs(l-a);r=a}if(n==1){break}}}o[d].dayIndex[l]={node:BX.create("DIV",{props:{className:"calendar-timeline-stream-day"},attrs:{"data-bx-calendar-list-day":l}})};if(r==l){o[d].node.appendChild(o[d].dayIndex[l].node)}else{if(l-r>0){if(o[d].dayIndex[r].node.nextSibling){BX.insertAfter(o[d].dayIndex[l].node,o[d].dayIndex[r].node)}else{o[d].node.appendChild(o[d].dayIndex[l].node)}}else{o[d].node.insertBefore(o[d].dayIndex[l].node,o[d].dayIndex[r].node)}}}if(o[d].dayIndex[l].node){o[d].dayIndex[l].node.appendChild(e)}e.style.opacity="1"};i.prototype.hide=function(){t.prototype.hide.apply(this,arguments)};i.prototype.getAdjustedDate=function(e,t){if(!e){e=new Date}var i=this.calendar.getViewRangeDate(),s=false;if(e&&e.getTime){s=new Date(e.getTime())}return s};i.prototype.adjustViewRangeToDate=function(e,t){t=false;if(this.viewCont.style.display==="none"){var i=false;if(e&&e.getTime){i=new Date(e.getTime());i.setHours(0,0,0,0);this.currentDate=i;this.calendar.setViewRangeDate(i)}if(t!==false){this.fadeAnimation(this.getContainer(),100,BX.delegate((function(){this.show();this.getContainer().style.opacity=0;this.showAnimation(this.getContainer(),300)}),this))}else{this.show()}}else{var s=this.calendar.util.getDayCode(e);var a=BX.util.array_search(s,this.groupsDayCodes);if(a>=0&&this.groupsDayCodes[a]){this.focusOnDate(this.groupsDayCodes[a],true)}else{if(e.getTime()>=this.displayedRange.start.getTime()&&e.getTime()<=this.displayedRange.end.getTime()){if(!this.groups[this.groupsIndex[s]]){this.createEntryGroupForDate(e)}this.groupsDayCodes.sort();this.focusOnDate(e,true)}else{const t=new Date(e.getTime()-BX.Calendar.Util.getDayLength()*10);const i=new Date(e.getTime()+BX.Calendar.Util.getDayLength()*60);if(t.getTime()<this.displayedRange.start.getTime()){this.displayedRange.start=t}if(i.getTime()>this.displayedRange.end.getTime()){this.displayedRange.end=i}this.calendar.setDisplayedViewRange(this.displayedRange);this.loadEntries().then((t=>{this.entries=t;this.displayEntries({animation:false,focusDate:e})}))}}}return i};i.prototype.increaseViewRangeDate=function(){var e=BX.util.array_search(this.focusedDayCode,this.groupsDayCodes);if(e>=0&&this.groupsDayCodes[e+1]){this.focusOnDate(this.groupsDayCodes[e+1],true)}};i.prototype.decreaseViewRangeDate=function(){var e=BX.util.array_search(this.focusedDayCode,this.groupsDayCodes);if(e>0&&this.groupsDayCodes[e-1]){this.focusOnDate(this.groupsDayCodes[e-1],true)}};i.prototype.createEntryGroupForDate=function(e){var t=this.calendar.util.getDayCode(e),i=Math.round(e.getTime()/1e3)*1e3,s={dayCode:t,wrap:BX.create("DIV",{props:{className:"calendar-timeline-stream-section-wrap"}})};const a=t===this.todayCode?"calendar-timeline-stream-today-label":"calendar-timeline-stream-label";s.titleNode=s.wrap.appendChild(BX.create("DIV",{props:{className:"calendar-timeline-stream-section calendar-timeline-section-date-label"},html:`\n\t\t\t\t<div class="calendar-timeline-stream-section-content">\n\t\t\t\t\t<div data-bx-calendar-date="${i}" class="${a}">\n\t\t\t\t\t\t${this.calendar.util.formatDateUsable(e)}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t`}));s.groupNode=s.wrap.appendChild(BX.create("DIV",{props:{className:"calendar-timeline-stream-section"}}));s.content=s.groupNode.appendChild(BX.create("DIV",{props:{className:"calendar-timeline-stream-section-content"}}));s.emptyWarning=s.content.appendChild(BX.create("DIV",{props:{className:"calendar-timeline-empty-section"},text:BX.message("EC_NO_EVENTS")}));this.groups.push(s);this.groupsIndex[t]=this.groups.length-1;this.groupsDayCodes.push(t);this.appendDateGroup(this.groups[this.groups.length-1].wrap,e)};i.prototype.focusOnDate=function(e,t){let i=false;if(BX.type.isDate(e)){i=this.calendar.util.getDayCode(e)}else if(BX.type.isString(e)){i=e}else{i=this.todayCode}BX.cleanNode(this.centerLoaderWrap);this.focusedDayCode=i;if(this.groupsIndex&&this.groups[this.groupsIndex[i]]){if(t&&this.streamScrollWrap){new BX.easing({duration:300,start:{scrollTop:this.streamScrollWrap.scrollTop},finish:{scrollTop:this.groups[this.groupsIndex[i]].wrap.offsetTop-10},transition:BX.easing.makeEaseOut(BX.easing.transitions.quad),step:BX.delegate((function(e){this.streamScrollWrap.scrollTop=e.scrollTop}),this),complete:BX.delegate((function(){this.streamScrollWrap.scrollTop=this.groups[this.groupsIndex[i]].wrap.offsetTop}),this)}).animate()}else{if(this.streamScrollWrap&&!BX.Type.isUndefined(this.groupsIndex[i])&&this.groups[this.groupsIndex[i]]){this.streamScrollWrap.scrollTop=this.groups[this.groupsIndex[i]].wrap.offsetTop-10}}}};i.prototype.getCurrentViewDate=function(){var e=document.querySelector(".calendar-timeline-stream-container");if(e){var t=e.scrollTop;var i=Infinity;var s;var a;for(var n=0;n<this.groups.length;n++){s=Math.abs(this.groups[n].wrap.offsetTop-t);if(i>s){i=s;a=this.groups[n]}}if(a){return a.dayCode}return null}};i.prototype.scrollHandle=function(){if(!this.filterMode){const e=this.topLoaderBlock.style.display===""?this.SCROLL_DELTA_HEIGHT:0;const t=this.bottomLoaderBlock.style.display===""?this.SCROLL_DELTA_HEIGHT:0;if(this.isScrollingDown&&!this.isBoundaryOfFutureReached&&!this.removeLoadingOnScroll&&this.streamScrollWrap.scrollHeight-this.util.getViewHeight()-this.streamScrollWrap.scrollTop<t){this.loadMoreEntriesDebounce({mode:"next"})}else if(this.isScrollingUp&&!this.isBoundaryOfPastReached&&!this.removeLoadingOnScroll&&this.streamScrollWrap.scrollTop<e){this.loadMoreEntriesDebounce({mode:"previous"})}this.focusDate=this.getFirstVisibleDate()}};i.prototype.mouseWheelHandle=function(e){this.isScrollingUp=e.deltaY<0;this.isScrollingDown=e.deltaY>0;const t=this.isScrollingUp&&!this.isBoundaryOfPastReached&&this.streamScrollWrap.scrollTop===0&&this.topLoaderBlock.style.display!=="";const i=this.isScrollingDown&&!this.isBoundaryOfFutureReached&&Math.abs(this.streamScrollWrap.scrollTop-(this.streamScrollWrap.scrollHeight-this.streamScrollWrap.offsetHeight))<1&&this.bottomLoaderBlock.style.display!=="";const s=!t&&!i;if(s){return}if(t&&!this.isBoundaryOfPastReached){this.topLoaderBlock.style.display="";this.streamScrollWrap.style.height=this.calendar.viewsCont.style.height;this.streamScrollWrap.scrollTop+=this.topLoaderBlock.offsetHeight;this.loadMoreEntriesDebounce({mode:"previous"})}if(i&&!this.isBoundaryOfFutureReached){this.bottomLoaderBlock.style.display="";this.streamScrollWrap.style.height=this.calendar.viewsCont.style.height;this.loadMoreEntriesDebounce({mode:"next"})}};i.prototype.getFirstVisibleDate=function(){const e=this.streamScrollWrap.scrollTop;const t=e+this.streamScrollWrap.offsetHeight;for(const i of this.listWrap.childNodes){const s=i.offsetTop;const a=s+i.offsetHeight;if(a<e||s>t){continue}for(const s of i.childNodes){const a=s.offsetTop;const n=a+s.offsetHeight;if(n<e||a>t){continue}for(const t of s.childNodes){const a=t.offsetTop;if(a>=e){const e=parseInt(i.getAttribute("data-bx-calendar-list-year"));const a=parseInt(s.getAttribute("data-bx-calendar-list-month"))-1;const n=parseInt(t.getAttribute("data-bx-calendar-list-day"));return new Date(e,a,n)}}}}return new Date};i.prototype.loadMoreEntries=function(e){if(this.filterMode||this.entryController.isAwaitingAnyResponses()){return}const t=e.mode;const i=this.streamScrollWrap.scrollHeight;let s;if(t==="next"){s=new BX.Loader({target:this.bottomLoaderBlock});s.show();this.displayedRange.end=new Date(this.displayedRange.end.getFullYear(),this.displayedRange.end.getMonth()+1,this.displayedRange.end.getDate())}if(t==="previous"){s=new BX.Loader({target:this.topLoaderBlock});s.show();this.displayedRange.start=new Date(this.displayedRange.start.getFullYear(),this.displayedRange.start.getMonth()-1,this.displayedRange.start.getDate())}this.calendar.setDisplayedViewRange(this.displayedRange);this.loadEntries({direction:t}).then((e=>{if(s){s.destroy()}this.entries=e;this.attachEntries(e,t==="next"?"next":false);if(t==="previous"){this.streamScrollWrap.scrollTop+=this.streamScrollWrap.scrollHeight-i}this.updateBoundaryOfPastReached();this.updateBoundaryOfFutureReached()}))};i.prototype.handleOnEntryListReload=function(e){if(e.getData().isBoundaryOfPastReached===true){this.isBoundaryOfPastReached=true}if(e.getData().isBoundaryOfFutureReached===true){this.isBoundaryOfFutureReached=true}};i.prototype.updateBoundaryOfPastReached=function(){if(this.isBoundaryOfPastReached){if(!BX.hasClass(this.topLoaderBlock,"calendar-timeline-loader-no-more-events")){BX.addClass(this.topLoaderBlock,"calendar-timeline-loader-no-more-events");if(this.streamScrollWrap.scrollTop<300){this.scrollToTheMostTop()}}}else{BX.removeClass(this.topLoaderBlock,"calendar-timeline-loader-no-more-events")}};i.prototype.updateBoundaryOfFutureReached=function(){if(this.isBoundaryOfFutureReached){if(!BX.hasClass(this.bottomLoaderBlock,"calendar-timeline-loader-no-more-events")){BX.addClass(this.bottomLoaderBlock,"calendar-timeline-loader-no-more-events");const e=this.streamScrollWrap.scrollHeight-this.streamScrollWrap.offsetHeight;if(e-this.streamScrollWrap.scrollTop<300){this.scrollToTheMostBottom()}}}else{BX.removeClass(this.bottomLoaderBlock,"calendar-timeline-loader-no-more-events")}};i.prototype.scrollToTheMostTop=function(){new BX.easing({duration:300,start:{scrollTop:this.streamScrollWrap.scrollTop},finish:{scrollTop:0},transition:BX.easing.makeEaseOut(BX.easing.transitions.quad),step:e=>{this.streamScrollWrap.scrollTop=e.scrollTop},complete:()=>{}}).animate()};i.prototype.scrollToTheMostBottom=function(){const e=this.streamScrollWrap.scrollHeight-this.streamScrollWrap.offsetHeight;new BX.easing({duration:300,start:{scrollTop:this.streamScrollWrap.scrollTop},finish:{scrollTop:e},transition:BX.easing.makeEaseOut(BX.easing.transitions.quad),step:t=>{const i=this.streamScrollWrap.scrollHeight-this.streamScrollWrap.offsetHeight;this.streamScrollWrap.scrollTop=t.scrollTop*i/e},complete:()=>{}}).animate()};i.prototype.getUniqueId=function(e){return e.entry.uid+"|"+e.dayCode};i.prototype.handleClick=function(e){if(this.isActive()){if(!e)e={};var t,i,s,a;const n=e.e.target.closest("[data-bx-decision-button]");if(e.target&&e.target.getAttribute("data-bx-calendar-entry-attendees-control")){e.e.preventDefault()}else if(e.specialTarget&&e.e&&(i=e.specialTarget.getAttribute("data-bx-calendar-entry"))&&n&&(s=n.getAttribute("data-bx-decision-button"))){if(this.resultEntriesIndex&&!BX.Type.isUndefined(this.resultEntriesIndex[i])&&!BX.Type.isUndefined(this.resultEntries[this.resultEntriesIndex[i]])){a=this.resultEntries[this.resultEntriesIndex[i]]}else{a=this.getEntryById(i)}if(a&&["Y","N"].includes(s)){BX.Calendar.EntryManager.setMeetingStatus(a,s)}}else if(e.specialTarget&&(i=e.specialTarget.getAttribute("data-bx-calendar-entry"))){this.handleEntryClick({uid:i,specialTarget:e.specialTarget,target:e.target,e:e.e})}else if(e.specialTarget&&(t=e.specialTarget.getAttribute("data-bx-calendar-show-all-events"))){}else if(!this.calendar.util.readOnlyMode()&&this.entryController.canDo(true,"add_event")&&(t=e.specialTarget&&e.specialTarget.getAttribute("data-bx-calendar-week-day"))){this.deselectEntry();this.showCompactEditFormForNewEntry({entry:this.buildTopNewEntryWrap({dayFrom:this.days[this.dayIndex[t]],holder:this.topEntryHolder})})}}};i.prototype.showEmptyBlock=function(){if(BX.Type.isDomNode(this.noEntriesWrap)){BX.Dom.remove(this.noEntriesWrap)}const e=500;this.noEntriesWrap=this.streamScrollWrap.appendChild(BX.create("DIV",{props:{className:"calendar-search-main"},style:{height:e+"px"},html:this.getEmptyStateContent()}));const t=this.noEntriesWrap.firstElementChild;t.appendChild(this.getEmptyStateButton());this.streamContentWrap.style.display="none";this.calendar.viewsCont.style.height=e+"px";this.streamScrollWrap.style.height=this.util.getViewHeight()+"px"};i.prototype.getEmptyStateContent=function(){if(this.calendar.search&&this.calendar.search.isInvitationPresetEnabled()){return`<div class="calendar-list-view-empty">\n\t\t\t\t<div class="calendar-list-view-empty-no-invitations-icon"></div>\n\t\t\t\t<div class="calendar-list-view-empty-title">${BX.message("EC_CALENDAR_NO_INVITATIONS_TITLE")}</div>\n\t\t\t</div>`}if(this.calendar.util.config.type!=="user"||this.calendar.isCollabUser){return`<div class="calendar-list-view-empty">\n\t\t\t\t<div class="calendar-list-view-empty-icon"></div>\n\t\t\t\t<div class="calendar-list-view-empty-title">${BX.message("EC_CALENDAR_NO_EVENTS_TITLE")}</div>\n\t\t\t</div>`}return`<div class="calendar-list-view-empty">\n\t\t\t<div class="calendar-list-view-empty-icon"></div>\n\t\t\t<div class="calendar-list-view-empty-title">${BX.message("EC_CALENDAR_NO_EVENTS_TITLE")}</div>\n\t\t\t<div class="calendar-list-view-empty-text">${BX.message("EC_CALENDAR_NO_EVENTS_TEXT")}</div>\n\t\t\t<div class="calendar-list-view-empty-list">\n\t\t\t\t<div class="calendar-list-view-empty-item">\n\t\t\t\t\t<span class="calendar-list-view-empty-list-icon --google"></span>\n\t\t\t\t\t<span class="calendar-list-view-empty-list-text">${BX.message("EC_CALENDAR_GOOGLE_CALENDAR")}</span>\n\t\t\t\t</div>\n\t\t\t\t<div class="calendar-list-view-empty-item">\n\t\t\t\t\t<span class="calendar-list-view-empty-list-icon --apple"></span>\n\t\t\t\t\t<span class="calendar-list-view-empty-list-text">${BX.message("EC_CALENDAR_APPLE_CALENDAR")}</span>\n\t\t\t\t</div>\n\t\t\t\t<div class="calendar-list-view-empty-item">\n\t\t\t\t\t<span class="calendar-list-view-empty-list-icon --office"></span>\n\t\t\t\t\t<span class="calendar-list-view-empty-list-text">${BX.message("EC_CALENDAR_OFFICE365_CALENDAR")}</span>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>`};i.prototype.getEmptyStateButton=function(){if(this.calendar.util.readOnlyMode()){return document.createElement("emptyNode")}if(this.calendar.search&&this.calendar.search.isInvitationPresetEnabled()){return document.createElement("emptyNode")}if(this.calendar.syncInterface){return new BX.UI.Button({text:BX.message("STATUS_BUTTON_SYNC_CALENDAR_NEW"),round:true,color:BX.UI.Button.Color.LIGHT_BORDER,events:{click:()=>{this.calendar.syncInterface.syncButton.handleClick()}}}).getContainer()}return document.createElement("emptyNode")};i.prototype.applyFilterMode=function(){this.filterMode=true;BX.addClass(this.streamContentWrap,"calendar-timeline-stream-search-result");this.showSearchHeader();if(this.loaderCircle){this.loaderCircle.show()}};i.prototype.resetFilterMode=function(e){if(!this.filterMode){return}this.filterMode=false;this.resultEntries=[];this.showCalendarHeader();this.streamContentWrap.style.display="";if(!e||e.resetSearchFilter!==false){this.calendar.search.resetFilter()}if(BX.Type.isUndefined(e.viewName)&&this.calendar.viewNameBeforeFilter!==this.name){this.calendar.setView(this.calendar.viewNameBeforeFilter,{animation:true,date:this.calendar.dateBeforeFilter});return}if(BX.Type.isUndefined(e.viewName)||e.viewName===this.name){BX.removeClass(this.streamContentWrap,"calendar-timeline-stream-search-result")}if(this.isActive()){this.displayEntries({focusDate:this.focusDate})}};i.prototype.showSearchHeader=function(){this.calendar.viewTitleContainer.style.display="none";this.calendar.navigationWrap.style.display="none";if(this.searchHeader){BX.remove(this.searchHeader)}this.searchHeader=this.calendar.topBlock.appendChild(BX.create("DIV",{props:{className:"calendar-search-head"},html:`<div class="calendar-search-name">${this.getSearchHeaderTitle()}</div>`}));this.calendar.viewSelector.hide()};i.prototype.showCalendarHeader=function(){this.calendar.viewTitleContainer.style.display="";this.calendar.navigationWrap.style.display="";if(this.searchHeader){BX.remove(this.searchHeader)}this.calendar.viewSelector.show();this.setTitle()};i.prototype.getSearchHeaderTitle=function(){if(this.calendar.search&&this.calendar.search.isInvitationPresetEnabled()){return BX.message("EC_COUNTER_INVITATION")}const e=this.calendar.search?.getSearchQuery();if(BX.Type.isStringFilled(e)){return BX.message("EC_SEARCH_RESULT_BY_QUERY").replace("#QUERY#",e)}return BX.message("EC_SEARCH_RESULT")};i.prototype.handleEntryClick=function(e){if(this.filterMode&&!BX.Type.isUndefined(this.resultEntriesIndex[e.uid])){e.entry=this.resultEntries[this.resultEntriesIndex[e.uid]]}t.prototype.handleEntryClick.apply(this,arguments)};i.prototype.getDecisionButton=function(e){return new BX.UI.Button({text:BX.message("EC_DESIDE_BUT_"+e),round:true,size:BX.UI.Button.Size.EXTRA_SMALL,color:e==="Y"?BX.UI.Button.Color.PRIMARY:BX.UI.Button.Color.LIGHT,props:{"data-bx-decision-button":e}})};if(e.BXEventCalendar){e.BXEventCalendar.CalendarListView=i}else{BX.addCustomEvent(e,"onBXEventCalendarInit",(function(){e.BXEventCalendar.CalendarListView=i}))}})(window);
//# sourceMappingURL=calendar-view-list.map.js

Youez - 2016 - github.com/yon3zu
LinuXploit