var almanachCalendar=angular.module("silverpeas.almanachcalendar",["silverpeas.services","silverpeas.components","silverpeas.controllers"]);almanachCalendar.controller("mainController",["$controller","CalendarService","$scope",function(a,c,b){a("silverpeasCalendarController",{$scope:b});b.getCalendarService=function(){return c}}]);almanachCalendar.controller("calendarController",["$controller","$scope","context",function(a,b,c){a("mainController",{$scope:b});b.participationIds=b.participation.getParticipants()||[];b.viewMyCalendar=function(){if(b.participationIds.indexOfElement(c.currentUserId)){b.participationIds.addElement(c.currentUserId)}};b.$watchCollection("participationIds",function(d){b.participationIds=angular.copy(d);b.participation.setParticipants(d)})}]);almanachCalendar.controller("editController",["$controller","$scope",function(a,b){a("mainController",{$scope:b});b.loadOccurrenceFromContext(true)}]);almanachCalendar.controller("viewController",["$controller","$scope",function(a,b){a("mainController",{$scope:b});b.reloadOccurrenceFromContext()}]);almanachCalendar.controller("portletController",["$controller","CalendarService","$scope",function(a,c,b){a("silverpeasCalendarController",{$scope:b});c.getNextOccurrences().then(function(d){b.occurrences=d})}]);