2017-03-02 07:27:34 +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(){return"/calendar/day/"+(new Date).getDayString()}),d.when("/calendar/multicolumnday",function(){return"/calendar/multicolumnday/"+(new Date).getDayString()}),d.when("/calendar/week",function(){return"/calendar/week/"+(new Date).getDayString()}),d.when("/calendar/month",function(){return"/calendar/month/"+(new Date).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){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&&e.ready().then(function(){var a="/calendar/",b=/(.+)view/.exec(e.settings.Calendar.View);a+=b?b[1]:"week";var d=new Date;if(e.defaults.SOGoCalendarWeekdays)for(var f=["SU","MO","TU","WE","TH","FR","SA"],g=f[d.getDay()];e.defaults.SOGoCalendarWeekdays.indexOf(g)<0;)d.addDays(1),g=f[d.getDay()];a+="/"+d.getDayString(),c.replace().url(a)})}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"]}();
|