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