mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-23 04:15:26 +00:00
(css,js) Btn to expand toolbar of all-day events
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user