mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-05 16:35:10 +00:00
Multicolumn day view
Restored multicolumn day view from v2. Month view as also been improved.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user