Multicolumn day view

Restored multicolumn day view from v2.

Month view as also been improved.
This commit is contained in:
Francis Lachapelle
2015-09-29 14:08:05 -04:00
parent d51bef162a
commit 45bc5a5368
11 changed files with 285 additions and 227 deletions
@@ -10,15 +10,19 @@
function CalendarController($scope, $state, $stateParams, $timeout, $interval, $log, focus, Calendar, Component, stateEventsBlocks) {
var vm = this;
vm.blocks = stateEventsBlocks.blocks;
vm.allDayBlocks = stateEventsBlocks.allDayBlocks;
vm.views = stateEventsBlocks;
vm.changeView = changeView;
// Refresh current view when the list of calendars is modified
$scope.$on('calendars:list', function() {
// See stateEventsBlocks in Scheduler.app.js
Component.$eventsBlocksForView($stateParams.view, $stateParams.day.asDate()).then(function(data) {
vm.blocks = data.blocks;
vm.allDayBlocks = data.allDayBlocks;
vm.views = data;
_.forEach(vm.views, function(view) {
if (view.id) {
view.calendar = new Calendar({ id: view.id, name: view.calendarName });
}
});
});
});
@@ -28,7 +32,7 @@
$state.go('calendars.view', { view: $stateParams.view, day: date });
}
}
angular
.module('SOGo.SchedulerUI')
.controller('CalendarController', CalendarController);