Your IP : 3.137.184.32


Current Path : /var/www/axolotl/data/www/yar.axolotls.ru/bitrix/js/calendar/new/
Upload File :
Current File : /var/www/axolotl/data/www/yar.axolotls.ru/bitrix/js/calendar/new/calendar-view-list.min.js

(function(e){var t=e.BXEventCalendarView;function s(){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.loadDaysBefore=30;this.animateAmount=5;this.loadLimitPrevious=5;this.loadLimit=15;this.loadDaysAfter=60;this.SCROLL_DELTA_HEIGHT=200;this.todayCode=this.calendar.util.getDayCode(new Date);this.DOM={};this.preBuild()}s.prototype=Object.create(t.prototype);s.prototype.constructor=s;s.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()}},this))};s.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"},events:{scroll:BX.proxy(this.scrollHandle,this)}}));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-block"}}));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-block"}}));this.centerLoaderWrap=this.streamScrollWrap.appendChild(BX.create("DIV",{props:{className:"calendar-center-loader-block"}}));this.filterLoaderWrap=this.streamScrollWrap.appendChild(BX.create("DIV",{props:{className:"calendar-search-main"},style:{height:this.util.getViewHeight()+"px",display:"none"}}));this.filterLoaderWrap.appendChild(BX.create("DIV",{props:{className:"calendar-search-empty"},html:'<div class="calendar-search-empty-name">'+BX.message("EC_NO_EVENTS")+"</div>"}))};s.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#"])};s.prototype.show=function(e){if(!e)e={};t.prototype.show.apply(this,arguments);this.showNavigationCalendar();BX.remove(this.calendar.additionalInfoOuter);var s=parseInt(this.calendar.util.config.init_year),i=parseInt(this.calendar.util.config.init_month);this.displayedRange={start:new Date(s,i-2,1),end:new Date(s,i+2,1)};this.calendar.setDisplayedViewRange(this.displayedRange);if(e.displayEntries!==false){this.displayEntries()}this.nothingToLoadNext=false;this.nothingToLoadPrevious=false};s.prototype.displayEntries=function(e){e=e||{};this.entries=this.entryController.getList({startDate:this.displayedRange.start,finishDate:this.displayedRange.end,viewRange:this.displayedRange,finishCallback:function(){if(this.entiesRequested===true){this.displayEntries(e)}this.entiesRequested=false}.bind(this)});this.entiesRequested=true;BX.cleanNode(this.listWrap);this.dateGroupIndex={};this.groups=[];this.groupsDayCodes=[];this.groupsIndex={};this.entryListIndex={};if(this.entries===false||!this.entries||!this.entries.length){return this.showEmptyBlock()}else if(this.noEntriesWrap){this.noEntriesWrap.style.display="none"}this.streamContentWrap.style.display="";this.entryParts=[];this.centerLoaderWrap.appendChild(BX.adjust(this.calendar.util.getLoader(),{style:{height:"180px"}}));this.attachEntries(this.entries,!!e.animation,function(){this.focusOnDate(e.focusDate||null)}.bind(this),e.focusDate)};s.prototype.displayResult=function(e){this.streamContentWrap.style.display="";if(this.filterLoaderWrap){this.filterLoaderWrap.style.display="none"}BX.addClass(this.streamContentWrap,"calendar-timeline-stream-search-result");BX.cleanNode(this.listWrap);this.dateGroupIndex={};this.entiesRequested=null;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){return this.showEmptyBlock()}else if(this.noEntriesWrap){this.noEntriesWrap.style.display="none"}this.streamContentWrap.style.display="";this.entryParts=[];this.attachEntries(e,"next")};s.prototype.attachEntries=function(e,t,s,i){if(!e&&!e.length)return;var a=this.entries.length-e.length,r=a,n,o,d,l;e.forEach(function(e){e.globalIndex=r++;d=this.calendar.util.getDayCode(e.from);l=this.calendar.util.getDayCode(e.to);o=0;this.entryParts.push({index:o,dayCode:d,from:e.from,entry:e});if(d!==l){n=new Date(e.from.getTime()+this.calendar.util.dayLength);while(n.getTime()<e.to.getTime()){this.entryParts.push({index:++o,dayCode:this.calendar.util.getDayCode(n),from:n,entry:e});n=new Date(n.getTime()+this.calendar.util.dayLength)}e.lastPartIndex=o}},this);var h=false;this.entryParts.sort(function(e,t){if(e.dayCode===t.dayCode){if(e.entry.isTask()!==t.entry.isTask()){if(e.entry.isTask())return 1;if(t.entry.isTask())return-1}if(e.entry.isFullDay()!==t.entry.isFullDay()){if(e.entry.isFullDay())return-1;if(t.entry.isFullDay())return 1}}if(e.index>0||t.index>0){return!h?e.index-t.index:t.index-e.index}return!h?e.entry.from.getTime()-t.entry.from.getTime():t.entry.from.getTime()-e.entry.from.getTime()});this.focusDate=i||new Date;this.today=new Date;this.animationMode=t;this.currentDisplayedEntry=0;this.actuallyAnimatedEntryCount=0;this.displayEntry(this.entryParts[this.currentDisplayedEntry],t,s)};s.prototype.displayEntry=function(e,t,s){t=false;var i;var a=this.calendar.util.getDayCode(this.focusDate);if(e.from.getTime()>this.focusDate.getTime()&&!this.groups[this.groupsIndex[a]]&&!this.filterMode){this.createEntryGroupForDate(this.focusDate,t)}i=this.groups[this.groupsIndex[e.dayCode]];if(!i){this.createEntryGroupForDate(e.from,t);i=this.groups[this.groupsIndex[e.dayCode]]}if(i.emptyWarning){BX.remove(i.emptyWarning)}var r=this.getUniqueId(e);if(this.actuallyAnimatedEntryCount>this.animateAmount){t=false;this.animationMode=false}var n=!this.entryListIndex[r];if(n){this.entryListIndex[r]=true;var o,d,l,h=e.entry;this.entriesIndex[h.uid]=h.globalIndex;if(h.isFullDay()){o=BX.message("EC_ALL_DAY")}else if(h.isLongWithTime()){if(e.index===0)o=this.calendar.util.formatTime(h.from);else if(e.index===h.lastPartIndex)o=BX.message("EC_TILL_TIME").replace("#TIME#",this.calendar.util.formatTime(h.to));else o=BX.message("EC_ALL_DAY")}else{o=this.calendar.util.formatTime(h.from.getHours(),h.from.getMinutes())+" &ndash; "+this.calendar.util.formatTime(h.to.getHours(),h.to.getMinutes())}d=i.content.appendChild(BX.create("DIV",{attrs:{"data-bx-calendar-entry":h.uid},props:{className:"calendar-timeline-stream-content-event"+(t?" calendar-timeline-stream-section-event-animate-"+t:"")}}));d.appendChild(BX.create("DIV",{props:{className:"calendar-timeline-stream-content-event-time"},html:'<span class="calendar-timeline-stream-content-event-time-link">'+o+"</span>"}));var p=this.calendar.util.getTextLocation(h.location)||"";if(p){p='<span class="calendar-timeline-stream-content-event-location">('+BX.util.htmlspecialchars(p)+")</span>"}d.appendChild(BX.create("DIV",{props:{className:"calendar-timeline-stream-content-event-name"},html:'<span class="calendar-timeline-stream-content-event-color" style="background-color: '+h.color+'"></span><span class="calendar-timeline-stream-content-event-name-link">'+BX.util.htmlspecialchars(h.name)+"</span>"+p}));l=d.appendChild(BX.create("DIV",{props:{className:"calendar-timeline-stream-content-event-members"}}));if(h.isMeeting()&&h.getAttendees().length>0){this.showAttendees(l,h.getAttendees().filter(function(e){return e.STATUS==="Y"||e.STATUS==="H"}),h.getAttendees().length)}else if(h.isPersonal()){l.innerHTML=BX.message("EC_EVENT_IS_MINE")}e.DOM={};if(e.dayCode===a&&BX.type.isFunction(s)){s()}}if(this.currentDisplayedEntry<this.entryParts.length-1){this.currentDisplayedEntry++;if(t&&n){this.actuallyAnimatedEntryCount++;setTimeout(BX.delegate(function(){this.displayEntry(this.entryParts[this.currentDisplayedEntry],t,s)},this),300)}else{if(this.currentDisplayedEntry%30==0){setTimeout(BX.delegate(function(){this.displayEntry(this.entryParts[this.currentDisplayedEntry],t,s)},this),1e3)}else{this.displayEntry(this.entryParts[this.currentDisplayedEntry],t,s)}}}else if(this.currentDisplayedEntry==this.entryParts.length-1&&!this.filterMode){this.animationMode=false;if(!this.groups[this.groupsIndex[this.todayCode]]){this.createEntryGroupForDate(this.today,t)}this.groupsDayCodes.sort();if(BX.type.isFunction(s)){s()}}};s.prototype.showAttendees=function(e,t,s){var i,a,r=5,n=t.length,o=7;if(n>0){if(n>o){n=r}for(i=0;i<n;i++){a=t[i]||{};e.appendChild(BX.create("IMG",{attrs:{id:"simple_view_popup_"+a.USER_ID,src:a.AVATAR||""},props:{title:a.DISPLAY_NAME,className:"calendar-member"}}));(function(e){setTimeout(function(){BX.tooltip(e,"simple_view_popup_"+e)},100)})(a.USER_ID)}if(n<t.length){var d=e.appendChild(BX.create("SPAN",{props:{className:"calendar-member-more-count"},text:" "+BX.message("EC_ATTENDEES_MORE").replace("#COUNT#",t.length-n),events:{click:BX.delegate(function(){this.showUserListPopup(d,t)},this)}}))}}};s.prototype.showUserListPopup=function(e,t){if(this.userListPopup)this.userListPopup.close();if(this.popup){this.popup.setAutoHide(false)}if(!t||!t.length)return;this.DOM.userListPopupWrap=BX.create("DIV",{props:{className:"calendar-user-list-popup-block"}});t.forEach(function(e){var t=this.DOM.userListPopupWrap.appendChild(BX.create("DIV",{props:{className:"calendar-slider-sidebar-user-container calendar-slider-sidebar-user-card"}}));t.appendChild(BX.create("DIV",{props:{className:"calendar-slider-sidebar-user-block-avatar"}})).appendChild(BX.create("DIV",{props:{className:"calendar-slider-sidebar-user-block-item"}})).appendChild(BX.create("IMG",{props:{width:34,height:34,src:e.AVATAR}}));t.appendChild(BX.create("DIV",{props:{className:"calendar-slider-sidebar-user-info"}})).appendChild(BX.create("A",{props:{href:e.URL?e.URL:"#",className:"calendar-slider-sidebar-user-info-name"},text:e.DISPLAY_NAME}))},this);this.userListPopup=new BX.PopupWindow(this.calendar.id+"-view-user-list-popup",e,{autoHide:true,closeByEsc:true,offsetTop:0,offsetLeft:0,width:220,resizable:false,lightShadow:true,content:this.DOM.userListPopupWrap,className:"calendar-user-list-popup",zIndex:4e3});this.userListPopup.setAngle({offset:36});this.userListPopup.show();BX.addCustomEvent(this.userListPopup,"onPopupClose",BX.delegate(function(){this.popup.setAutoHide(true);this.userListPopup.destroy()},this))};s.prototype.appendDateGroup=function(e,t,s){var i,a,r,n,o,d,l=t.getDate(),h=t.getMonth()+1,p=t.getFullYear();if(!this.dateGroupIndex[p]){n=Infinity;o=p;for(i in this.dateGroupIndex){if(this.dateGroupIndex.hasOwnProperty(i)){if(Math.abs(p-i)<n){n=Math.abs(p-i);o=i}if(n==1){break}}}this.dateGroupIndex[p]={node:BX.create("DIV",{attrs:{"data-bx-calendar-list-year":p}}),monthIndex:{}};if(o==p){this.listWrap.appendChild(this.dateGroupIndex[p].node)}else{if(p-o>0){if(this.dateGroupIndex[o].node.nextSibling){BX.insertAfter(this.dateGroupIndex[p].node,this.dateGroupIndex[o].node)}else{this.listWrap.appendChild(this.dateGroupIndex[p].node)}}else{this.listWrap.insertBefore(this.dateGroupIndex[p].node,this.dateGroupIndex[o].node)}}}if(!this.dateGroupIndex[p].monthIndex[h]){n=Infinity;o=h;for(a in this.dateGroupIndex[p].monthIndex){if(this.dateGroupIndex[p].monthIndex.hasOwnProperty(a)){if(Math.abs(h-a)<n){n=Math.abs(h-a);o=a}if(n==1){break}}}this.dateGroupIndex[p].monthIndex[h]={node:BX.create("DIV",{attrs:{"data-bx-calendar-list-month":h}}),dayIndex:{}};if(o==h){this.dateGroupIndex[p].node.appendChild(this.dateGroupIndex[p].monthIndex[h].node)}else{if(h-o>0){if(this.dateGroupIndex[p].monthIndex[o].node.nextSibling){BX.insertAfter(this.dateGroupIndex[p].monthIndex[h].node,this.dateGroupIndex[p].monthIndex[o].node)}else{this.dateGroupIndex[p].node.appendChild(this.dateGroupIndex[p].monthIndex[h].node)}}else{this.dateGroupIndex[p].monthIndex[o].node.parentNode.insertBefore(this.dateGroupIndex[p].monthIndex[h].node,this.dateGroupIndex[p].monthIndex[o].node)}}}if(!this.dateGroupIndex[p].monthIndex[h].dayIndex[l]){n=Infinity;o=l;d=this.dateGroupIndex[p].monthIndex;for(r in d[h].dayIndex){if(d[h].dayIndex.hasOwnProperty(r)){if(Math.abs(l-r)<n){n=Math.abs(l-r);o=r}if(n==1){break}}}d[h].dayIndex[l]={node:BX.create("DIV",{props:{className:"calendar-timeline-stream-day"},attrs:{"data-bx-calendar-list-day":l}})};if(o==l){d[h].node.appendChild(d[h].dayIndex[l].node)}else{if(l-o>0){if(d[h].dayIndex[o].node.nextSibling){BX.insertAfter(d[h].dayIndex[l].node,d[h].dayIndex[o].node)}else{d[h].node.appendChild(d[h].dayIndex[l].node)}}else{d[h].node.insertBefore(d[h].dayIndex[l].node,d[h].dayIndex[o].node)}}}if(d[h].dayIndex[l].node){d[h].dayIndex[l].node.appendChild(e)}else{}setTimeout(function(){e.style.opacity="1"},0)};s.prototype.hide=function(){t.prototype.hide.apply(this,arguments)};s.prototype.getAdjustedDate=function(e,t){if(!e){e=new Date}var s=this.calendar.getViewRangeDate(),i=false;if(e&&e.getTime){i=new Date(e.getTime())}return i};s.prototype.adjustViewRangeToDate=function(e,t){if(this.viewCont.style.display==="none"){var s=false;if(e&&e.getTime){s=new Date(e.getTime());s.setHours(0,0,0,0);this.currentDate=s;this.calendar.setViewRangeDate(s)}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 i=this.calendar.util.getDayCode(e);var a=BX.util.array_search(i,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[i]]){this.createEntryGroupForDate(e,false)}this.groupsDayCodes.sort();this.focusOnDate(e,true)}else{this.displayedRange={start:new Date(e.getTime()-BX.Calendar.Util.getDayLength()*10),end:new Date(e.getTime()+BX.Calendar.Util.getDayLength()*60)};this.calendar.setDisplayedViewRange(this.displayedRange);this.animationMode=false;this.displayEntries({animation:false,focusDate:e});this.nothingToLoadNext=false;this.nothingToLoadPrevious=false}}}return s};s.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)}};s.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)}};s.prototype.createEntryGroupForDate=function(e,t){var s=this.calendar.util.getDayCode(e),i=Math.round(e.getTime()/1e3)*1e3,a={dayCode:s,wrap:BX.create("DIV",{props:{className:"calendar-timeline-stream-section-wrap"}})};a.titleNode=a.wrap.appendChild(BX.create("DIV",{props:{className:"calendar-timeline-stream-section calendar-timeline-section-date-label"},html:'<div data-bx-calendar-date="'+i+'" class="calendar-timeline-stream-section-content"><div class="'+(s==this.todayCode?"calendar-timeline-stream-today-label":"calendar-timeline-stream-label")+'">'+this.calendar.util.formatDateUsable(e)+"</div></div>"}));a.groupNode=a.wrap.appendChild(BX.create("DIV",{props:{className:"calendar-timeline-stream-section"}}));a.content=a.groupNode.appendChild(BX.create("DIV",{props:{className:"calendar-timeline-stream-section-content"}}));a.emptyWarning=a.content.appendChild(BX.create("DIV",{props:{className:"calendar-timeline-empty-section"},text:BX.message("EC_NO_EVENTS")}));this.groups.push(a);this.groupsIndex[s]=this.groups.length-1;this.groupsDayCodes.push(s);this.appendDateGroup(this.groups[this.groups.length-1].wrap,e,t)};s.prototype.focusOnDate=function(e,t){var s=false;if(BX.type.isDate(e))s=this.calendar.util.getDayCode(e);else if(BX.type.isString(e))s=e;else s=this.todayCode;BX.cleanNode(this.centerLoaderWrap);this.focusedDayCode=s;if(this.groupsIndex&&this.groups[this.groupsIndex[s]]){this.bottomLoaderBlock.style.height=this.SCROLL_DELTA_HEIGHT+Math.max(0,this.util.getViewHeight()+this.groups[this.groupsIndex[s]].wrap.offsetTop-this.bottomLoaderBlock.offsetTop)+"px";if(t&&this.streamScrollWrap){new BX.easing({duration:300,start:{scrollTop:this.streamScrollWrap.scrollTop},finish:{scrollTop:this.groups[this.groupsIndex[s]].wrap.offsetTop},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[s]].wrap.offsetTop},this)}).animate()}else{setTimeout(BX.delegate(function(){if(this.streamScrollWrap&&this.groupsIndex[s]!==undefined&&this.groups[this.groupsIndex[s]]){this.streamScrollWrap.scrollTop=this.groups[this.groupsIndex[s]].wrap.offsetTop}},this),200);setTimeout(BX.delegate(function(){if(this.streamScrollWrap&&this.groupsIndex[s]!==undefined&&this.groups[this.groupsIndex[s]]){this.streamScrollWrap.scrollTop=this.groups[this.groupsIndex[s]].wrap.offsetTop}},this),500);setTimeout(BX.delegate(function(){if(this.streamScrollWrap&&this.groupsIndex[s]!==undefined&&this.groups[this.groupsIndex[s]]){this.streamScrollWrap.scrollTop=this.groups[this.groupsIndex[s]].wrap.offsetTop}},this),1e3)}}};s.prototype.scrollHandle=function(){if(!this.filterMode){if(this.streamScrollWrap.scrollHeight-this.util.getViewHeight()-this.streamScrollWrap.scrollTop<this.SCROLL_DELTA_HEIGHT&&!this.nothingToLoadNext){this.loadMoreEntries({mode:"next"})}else if(this.streamScrollWrap.scrollTop<this.SCROLL_DELTA_HEIGHT&&!this.nothingToLoadPrevious){this.loadMoreEntries({mode:"previous"})}}};s.prototype.loadMoreEntries=function(e){if(this.currentLoadMode||this.filterMode){return}this.currentLoadMode=e.mode;if(e.mode=="next"){this.loader=this.bottomLoaderBlock.appendChild(BX.adjust(this.calendar.util.getLoader(),{style:{height:"180px"}}));this.entryController.getList({loadNext:true,loadLimit:this.loadLimit,startDate:new Date(this.displayedRange.end.getFullYear(),this.displayedRange.end.getMonth(),this.displayedRange.end.getDate()+1),finishCallback:BX.proxy(this.loadMoreCallback,this)})}else{this.loader=this.topLoaderBlock.appendChild(BX.adjust(this.calendar.util.getLoader(),{style:{height:"180px"}}));this.entryController.getList({loadPrevious:true,loadLimit:this.loadLimitPrevious,finishDate:new Date(this.displayedRange.start.getFullYear(),this.displayedRange.start.getMonth(),this.displayedRange.start.getDate()-1),finishCallback:BX.proxy(this.loadMoreCallback,this)})}};s.prototype.loadMoreCallback=function(e){BX.remove(this.loader);this.displayedRange=this.calendar.entryController.getLoadedEntiesLimits();var t=this.entryController.getList({startDate:this.displayedRange.start,finishDate:this.displayedRange.end,finishCallback:BX.proxy(this.loadMoreCallback,this)});if(this.currentLoadMode=="next"&&e.finish)this.nothingToLoadNext=true;if(this.currentLoadMode=="previous"&&e.finish)this.nothingToLoadPrevious=true;if(!this.entries)this.entries=[];if(t&&t.length){this.entries=this.entries.concat(t);this.attachEntries(t,this.currentLoadMode=="next"?"next":false)}this.currentLoadMode=false};s.prototype.getUniqueId=function(e){return e.entry.uid+"|"+e.dayCode};s.prototype.handleClick=function(e){if(this.isActive()){if(!e)e={};var t,s;if(e.specialTarget&&(s=e.specialTarget.getAttribute("data-bx-calendar-entry"))){this.handleEntryClick({uid:s,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.showSimplePopupForNewEntry({entry:this.buildTopNewEntryWrap({dayFrom:this.days[this.dayIndex[t]],holder:this.topEntryHolder})})}}};s.prototype.showEmptyBlock=function(e){if(BX.Type.isDomNode(this.noEntriesWrap)){BX.Dom.remove(this.noEntriesWrap)}this.noEntriesWrap=this.streamScrollWrap.appendChild(BX.create("DIV",{props:{className:"calendar-search-main"},style:{height:this.util.getViewHeight()+"px"}}));var t=this.noEntriesWrap.appendChild(BX.create("DIV",{props:{className:"calendar-search-empty"},html:'<div class="calendar-search-empty-name">'+BX.message("EC_NO_EVENTS")+"</div>"}));if(!this.calendar.util.readOnlyMode()){this.addButton=t.appendChild(BX.create("SPAN",{props:{className:"calendar-search-empty-link"},text:BX.message("EC_CREATE_EVENT"),events:{click:function(){BX.Calendar.EntryManager.openEditSlider({type:this.calendar.util.type,ownerId:this.calendar.util.ownerId,userId:parseInt(this.calendar.currentUser.id)})}.bind(this)}}))}this.streamContentWrap.style.display="none"};s.prototype.applyFilterMode=function(){this.filterMode=true;this.calendar.viewTitleContainer.style.display="none";this.calendar.navigationWrap.style.display="none";if(this.searchHead){BX.remove(this.searchHead)}this.searchHead=this.calendar.topBlock.appendChild(BX.create("DIV",{props:{className:"calendar-search-head"},html:'<div class="calendar-search-name">'+BX.message("EC_SEARCH_RESULT")+"</div>"}));if(this.resettFilterWrap){BX.remove(this.resettFilterWrap)}this.resettFilterWrap=this.searchHead.appendChild(BX.create("DIV",{props:{className:"calendar-search-cancel"},html:BX.message("EC_SEARCH_RESET_RESULT"),events:{click:BX.proxy(this.resetFilterMode,this)}}));if(this.streamScrollWrap){this.streamContentWrap.style.display="none";this.filterLoaderWrap.style.display=""}};s.prototype.resetFilterMode=function(e){this.filterMode=false;this.resultEntries=[];this.calendar.viewTitleContainer.style.display="";this.calendar.navigationWrap.style.display="";this.setTitle();if(this.searchHead){BX.remove(this.searchHead)}if(this.resettFilterWrap){BX.remove(this.resettFilterWrap)}this.streamContentWrap.style.display="";if(this.filterLoaderWrap){this.filterLoaderWrap.style.display="none"}if(!e||e.resetSearchFilter!==false){this.calendar.search.resetFilter()}if(this.isActive()){this.displayEntries()}};s.prototype.handleEntryClick=function(e){if(this.filterMode&&this.resultEntriesIndex[e.uid]!==undefined){e.entry=this.resultEntries[this.resultEntriesIndex[e.uid]]}t.prototype.handleEntryClick.apply(this,arguments)};if(e.BXEventCalendar){e.BXEventCalendar.CalendarListView=s}else{BX.addCustomEvent(e,"onBXEventCalendarInit",function(){e.BXEventCalendar.CalendarListView=s})}})(window);
//# sourceMappingURL=calendar-view-list.map.js