2018-03-07 17:09:20 +01:00
|
|
|
!function(){"use strict";function a(a,d){a.state("calendars",{url:"/calendar",views:{calendars:{templateUrl:"UIxCalMainView",controller:"CalendarsController",controllerAs:"app"}},resolve:{stateCalendars:b}}).state("calendars.view",{url:"/{view:(?:day|week|month|multicolumnday)}/:day",views:{calendarView:{templateUrl:function(a){return a.view+"view?day="+a.day},controller:"CalendarController",controllerAs:"calendar"}},resolve:{stateEventsBlocks:c}}),d.when("/calendar/day",function(){var a=new Date;return"/calendar/day/"+a.getDayString()}),d.when("/calendar/multicolumnday",function(){var a=new Date;return"/calendar/multicolumnday/"+a.getDayString()}),d.when("/calendar/week",function(){var a=new Date;return"/calendar/week/"+a.getDayString()}),d.when("/calendar/month",function(){var a=new Date;return"/calendar/month/"+a.getDayString()}),d.otherwise("/calendar")}function b(a){return a.$calendars||a.$findAll(window.calendarsData)}function c(a,b,c){return b.$eventsBlocksForView(a.view,a.day.asDate()).then(function(a){return _.forEach(a,function(a){a.id&&(a.calendar=new c({id:a.id,name:a.calendarName}))}),a})}function d(a,b,c,d,e){if(a.$on("$stateChangeError",function(a,c,e,f,g,h){b.error(h),d.go("calendar")}),a.$on("$routeChangeError",function(a,c,d,e){b.error(a,c,d,e)}),0===c.url().length){var f="/calendar/",g=/(.+)view/.exec(e.settings.Calendar.View);f+=g?g[1]:"week";var h=new Date;if(e.defaults.SOGoCalendarWeekdays)for(var i=["SU","MO","TU","WE","TH","FR","SA"],j=i[h.getDay()];e.defaults.SOGoCalendarWeekdays.indexOf(j)<0;)h.addDays(1),j=i[h.getDay()];f+="/"+h.getDayString(),c.replace().url(f)}}angular.module("SOGo.SchedulerUI",["ngCookies","ui.router","angularFileUpload","ck","SOGo.Common","SOGo.PreferencesUI","SOGo.ContactsUI","SOGo.MailerUI","as.sortable"]).config(a).run(d),a.$inject=["$stateProvider","$urlRouterProvider"],b.$inject=["Calendar"],c.$inject=["$stateParams","Component","Calendar"],d.$inject=["$rootScope","$log","$location","$state","Preferences"]}();
|