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-section.min.js
(function(window){function SectionController(t,e,i){if(!e.sections)e.sections=[];this.calendar=t;this.sections=[];this.sectionIndex={};this.hiddenSections=i.hiddenSections||[];this.prepareData({sections:e.sections});if(this.calendar.showTasks){var s=new TaskSection(this.calendar,i.sectionCustomization["tasks"+this.calendar.util.ownerId]);this.sections.push(s);this.sectionIndex[s.id]=this.sections.length-1}BX.addCustomEvent("BXCalendar:onSectionDelete",BX.proxy(this.unsetSectionHandler,this));this.sortSections()}SectionController.prototype={prepareData:function(t){var e,i;for(e=0;e<t.sections.length;e++){i=new Section(this.calendar,t.sections[e]);this.sections.push(i);this.sectionIndex[i.id]=this.sections.length-1}},sortSections:function(){var t;this.sectionIndex={};this.sections=this.sections.sort((function(t,e){if(BX.type.isFunction(t.isPseudo)&&t.isPseudo()){return 1}else if(BX.type.isFunction(e.isPseudo)&&e.isPseudo()){return-1}return t.name.localeCompare(e.name)}));for(t=0;t<this.sections.length;t++){this.sectionIndex[this.sections[t].id]=t}},getCurrentSection:function(){var t=false,e,i=this.calendar.util.getUserOption("lastUsedSection");if(i){t=this.getSection(i);if(!t||!t.name||!t.canDo("add")||t.isPseudo()||!t.isActive()){t=false}}if(!t){for(e=0;e<this.sections.length;e++){if(this.sections[e].canDo("add")&&this.sections[e].belongsToView()&&!this.sections[e].isPseudo()&&this.sections[e].isActive()){t=this.sections[e];break}}}if(!t&&this.calendar.isExternalMode()&&this.sections.length>0){t=this.sections[0]}return t},getSectionList:function(){var t,e=[];for(t=0;t<this.sections.length;t++){this.sections[t].id=parseInt(this.sections[t].id);if(this.sections[t].canDo("view_event")&&this.sections[t].isActive()){e.push(this.sections[t])}}return e},getSuperposedSectionList:function(){var t,e=[];for(t=0;t<this.sections.length;t++){if(this.sections[t].canDo("view_event")&&this.sections[t].isSuperposed()&&this.sections[t].isActive()){e.push(this.sections[t])}}return e},getSectionListForEdit:function(){var t,e=[];for(t=0;t<this.sections.length;t++){if(this.sections[t].canDo("add")&&!this.sections[t].isPseudo()&&this.sections[t].isActive()){e.push(this.sections[t])}}return e},getSectionGroupList:function(){if(!this.sectionGroups){this.sectionGroups=[];var t;if(this.calendar.util.type==="user"){t=BX.message("EC_SEC_SLIDER_MY_CALENDARS_LIST")}else if(this.calendar.util.type==="group"){const e=Util.getCalendarContext().isCollabUser?"EC_SEC_SLIDER_COLLAB_CALENDARS_LIST":"EC_SEC_SLIDER_GROUP_CALENDARS_LIST";t=BX.message(e)}else if(this.calendar.util.type==="location"){t=BX.message("EC_SEC_SLIDER_TYPE_LOCATION_LIST")}else if(this.calendar.util.type==="resource"){t=BX.message("EC_SEC_SLIDER_TYPE_RESOURCE_LIST")}else{t=BX.message("EC_SEC_SLIDER_TITLE_COMP_CAL")}this.sectionGroups.push({title:t,type:this.calendar.util.type,belongsToView:true});this.sectionGroups.push({title:BX.message("EC_SEC_SLIDER_TITLE_COMP_CAL"),type:"company"});this.calendar.util.getSuperposedTrackedUsers().forEach((function(t){this.sectionGroups.push({title:BX.util.htmlspecialchars(t.FORMATTED_NAME),type:"user",ownerId:parseInt(t.ID)})}),this);this.sectionGroups.push({title:BX.message("EC_SEC_SLIDER_POPUP_MENU_ADD_GROUP"),type:"group"});this.sectionGroups.push({title:BX.message("EC_SEC_SLIDER_POPUP_MENU_ADD_COLLAB"),type:"collab"});this.sectionGroups.push({title:BX.message("EC_SEC_SLIDER_TITLE_RESOURCE_CAL"),type:"resource"});this.sectionGroups.push({title:BX.message("EC_SEC_SLIDER_TITLE_LOCATION_CAL"),type:"location"})}return this.sectionGroups},getSection:function(t){return this.sections[this.sectionIndex[t]]||{}},getDefaultSectionName:function(){return BX.message("EC_DEFAULT_SECTION_NAME")},getDefaultSectionColor:function(){var t=this.getSectionListForEdit(),e={},i,s,n=this.calendar.util.getDefaultColors();for(i=0;i<t.length;i++){e[t[i].color]=true}for(i=0;i<n.length;i++){s=n[i];if(!e[s]){return s}}return n[this.calendar.util.randomInt(0,n.length)]},getDefaultSectionAccess:function(){return this.calendar.util.config.new_section_access||{}},saveSection:function(t,e,i,s){var n=new BX.Promise;t=BX.util.trim(t)||BX.message("EC_SEC_SLIDER_NEW_SECTION");if(s.section.id){BX.onCustomEvent(this.calendar,"BXCalendar:onSectionChange",[s.section.id,{name:t,color:e}])}else{BX.onCustomEvent(this.calendar,"BXCalendar:onSectionAddBefore",[{name:t,color:e}])}var o=s.section.id&&s.section.isPseudo();BX.ajax.runAction("calendar.api.calendarajax.editCalendarSection",{data:{analyticsLabel:{action:s.section.id?"editSection":"newSection",type:s.section.type||this.calendar.util.type},id:s.section.id||0,name:t,type:s.section.type||this.calendar.util.type,ownerId:s.section.ownerId||this.calendar.util.ownerId,color:e,access:i||null,userId:this.calendar.util.userId,customization:o?"Y":"N"}}).then(BX.delegate((function(i){if(s.section.id&&s.section.color.toLowerCase()!==e.toLowerCase()){this.calendar.reload()}if(o){this.sections[this.sectionIndex[s.section.id]].updateData({NAME:t,COLOR:e})}else{var a=i.data.section;if(a){if(s.section.id){this.sections[this.sectionIndex[s.section.id]].updateData(a)}else{this.prepareData({sections:[a]})}this.sortSections()}}BX.onCustomEvent(this.calendar,"BXCalendar:onSectionAdd",[{name:t,color:e}]);n.fulfill(i.data)}),this),BX.delegate((function(t){this.calendar.displayError(t.errors);n.fulfill(t.errors)}),this));return n},sectionIsShown:function(t){return!BX.util.in_array(t,this.hiddenSections)},getSectionsInfo:function(){var t,e=[],i=[],s=[],n=[];for(t=0;t<this.sections.length;t++){if(this.sections[t].canDo("view_time")&&(this.sections[t].belongsToView()||this.sections[t].isSuperposed()||this.sections[t].isPseudo())){if(this.sections[t].isShown()){if(this.sections[t].isSuperposed()){i.push(this.sections[t].id)}else{s.push(this.sections[t].id)}e.push(this.sections[t].id)}else{n.push(this.sections[t].id)}}}return{superposed:i,active:s,hidden:n,allActive:e}},unsetSectionHandler:function(t){if(this.sectionIndex[t]!==undefined){this.sections=BX.util.deleteFromArray(this.sections,this.sectionIndex[t]);for(var e=0;e<this.sections.length;e++){this.sectionIndex[this.sections[e].id]=e}}}};function Section(t,e){this.calendar=t;this.updateData(e)}Section.prototype={updateData:function(t){if(!this.data){this.data=t||{};this.type=t.CAL_TYPE||"";this.ownerId=parseInt(t.OWNER_ID)||0;Object.defineProperties(this,{id:{value:t.ID,writable:false},color:{value:t.COLOR,writable:true,enumerable:true}})}this.color=this.data.COLOR=t.COLOR;this.name=this.data.NAME=t.NAME},isShown:function(){return this.calendar.sectionController.sectionIsShown(this.id)},remove:function(){if(confirm(BX.message("EC_SEC_DELETE_CONFIRM"))){BX.onCustomEvent(this.calendar,"BXCalendar:onSectionDelete",[this.id]);BX.ajax.runAction("calendar.api.calendarajax.deleteCalendarSection",{data:{id:this.id}}).then(function(t){var e=true;var i;for(var s=0;s<this.calendar.sectionController.sections.length;s++){i=this.calendar.sectionController.sections[s];if(i.belongsToView()){e=false;break}}if(e){BX.reload()}else{BX.Calendar.SectionManager.setNewEntrySectionId(this.calendar.sectionController.getCurrentSection().id);this.calendar.reload()}}.bind(this),function(t){this.calendar.displayError(t.errors)}.bind(this))}},hideGoogle:function(){if(confirm(BX.message("EC_CAL_GOOGLE_HIDE_CONFIRM"))){this.hide();BX.onCustomEvent(this.calendar,"BXCalendar:onSectionDelete",[this.id]);BX.ajax.runAction("calendar.api.calendarajax.hideExternalCalendarSection",{data:{id:this.id}}).then(BX.delegate((function(t){this.calendar.reload()}),this),BX.delegate((function(t){this.calendar.displayError(t.errors)}),this))}},getLink:function(){return this.data&&this.data.LINK?this.data.LINK:""},canBeConnectedToOutlook:function(){return!this.isPseudo()&&this.data.OUTLOOK_JS&&!(this.data.CAL_DAV_CAL&&this.data.CAL_DAV_CON)&&!BX.browser.IsMac()},connectToOutlook:function(){if(!window.jsOutlookUtils){BX.loadScript("/bitrix/js/calendar/outlook.js",BX.delegate((function(){try{eval(this.data.OUTLOOK_JS)}catch(t){}}),this))}else{try{eval(this.data.OUTLOOK_JS)}catch(t){}}},canDo:function(t){if(BX.util.in_array(t,["access","add","edit"])&&this.isVirtual()){return false}if(t==="view_event"){t="view_time"}return this.data.PERM&&this.data.PERM[t]},isSuperposed:function(){return!this.isPseudo()&&!!this.data.SUPERPOSED},isPseudo:function(){return false},isVirtual:function(){return this.data.CAL_DAV_CAL&&this.data.CAL_DAV_CAL.indexOf("@virtual/events/")!==-1||this.data.GAPI_CALENDAR_ID&&this.data.GAPI_CALENDAR_ID.indexOf("@group.v.calendar.google.com")!==-1||this.data.EXTERNAL_TYPE==="google_readonly"||this.data.EXTERNAL_TYPE==="google_freebusy"},isGoogle:function(){return this.data.GAPI_CALENDAR_ID},isCalDav:function(){return!this.isPseudo()&&this.data.CAL_DAV_CAL&&this.data.CAL_DAV_CON},isCompanyCalendar:function(){return!this.isPseudo()&&this.type!=="user"&&this.type!=="group"&&!parseInt(this.data.OWNER_ID)},belongsToView:function(){return this.type===this.calendar.util.type&&parseInt(this.data.OWNER_ID)===parseInt(this.calendar.util.ownerId)},belongsToOwner:function(){return this.belongsToUser(this.calendar.util.userId)},belongsToUser:function(t){return this.data.CAL_TYPE==="user"&&parseInt(this.data.OWNER_ID)===parseInt(t)&&this.data.ACTIVE!=="N"},isActive:function(){return this.data.ACTIVE!=="N"}};function TaskSection(t,e){this.calendar=t;var i="#ff5b55",s;if(!e)e={};if(this.calendar.util.userIsOwner()){s=BX.message("EC_SEC_MY_TASK_DEFAULT")}else if(this.calendar.util.isUserCalendar()){s=BX.message("EC_SEC_USER_TASK_DEFAULT")}else if(this.calendar.util.isGroupCalendar()){s=BX.message("EC_SEC_GROUP_TASK_DEFAULT")}var n={ID:"tasks",NAME:e.name||s,COLOR:e.color||i,PERM:{edit_section:true,view_full:true,view_time:true,view_title:true}};Section.apply(this,[t,n])}TaskSection.prototype=Object.create(Section.prototype);TaskSection.prototype.constructor=TaskSection;TaskSection.prototype.isPseudo=function(){return true};TaskSection.prototype.updateData=function(t){if(!this.data){this.data=t||{};this.type=t.CAL_TYPE||"";Object.defineProperties(this,{id:{value:t.ID,writable:false},color:{value:t.COLOR,writable:true,enumerable:true}})}this.color=this.data.COLOR=t.COLOR;this.name=this.data.NAME=t.NAME};if(window.BXEventCalendar){window.BXEventCalendar.SectionController=SectionController;window.BXEventCalendar.Section=Section}else{BX.addCustomEvent(window,"onBXEventCalendarInit",(function(){window.BXEventCalendar.SectionController=SectionController;window.BXEventCalendar.Section=Section}))}})(window);
//# sourceMappingURL=calendar-section.map.js

Youez - 2016 - github.com/yon3zu
LinuXploit