(css,js) Btn to expand toolbar of all-day events

This commit is contained in:
Francis Lachapelle
2016-03-30 11:10:09 -04:00
parent 0cce8f6053
commit fd388e2373
5 changed files with 117 additions and 73 deletions
@@ -10,6 +10,12 @@
function CalendarController($scope, $rootScope, $state, $stateParams, Calendar, Component, stateEventsBlocks) {
var vm = this, deregisterCalendarsList;
// Make the toolbar state of all-day events persistent
if (angular.isUndefined(CalendarController.expandedAllDays))
CalendarController.expandedAllDays = false;
vm.expandedAllDays = CalendarController.expandedAllDays;
vm.toggleAllDays = toggleAllDays;
vm.views = stateEventsBlocks;
vm.changeDate = changeDate;
vm.changeView = changeView;
@@ -19,6 +25,12 @@
$scope.$on('$destroy', deregisterCalendarsList);
// Expand or collapse all-day events
function toggleAllDays() {
CalendarController.expandedAllDays = !CalendarController.expandedAllDays;
vm.expandedAllDays = CalendarController.expandedAllDays;
}
function updateView() {
// See stateEventsBlocks in Scheduler.app.js
Component.$eventsBlocksForView($stateParams.view, $stateParams.day.asDate()).then(function(data) {