From da76344983d4f4536465f64778e77e5715f612eb Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Tue, 19 Mar 2019 11:30:28 -0400 Subject: [PATCH] (js) Keep center list visible on xs screen For Calendar module. --- NEWS | 1 + UI/Templates/SchedulerUI/UIxCalMainView.wox | 2 +- .../js/Scheduler/CalendarsController.js | 11 +++++++++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 36f34718b..e43144094 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,7 @@ Bug fixes - [web] fixed wrong colors assigned to default calendar categories - [web] lowered size of headings on small screens - [web] fixed scrolling in calendars list on Android + - [web] keep center list of Calendar module visible on small screens - [core] allow super users to modify any event (#4216) - [core] correctly handle the full cert chain in S/MIME - [core] handle multidays events in freebusy data diff --git a/UI/Templates/SchedulerUI/UIxCalMainView.wox b/UI/Templates/SchedulerUI/UIxCalMainView.wox index a3bb31a27..e035e6ae3 100644 --- a/UI/Templates/SchedulerUI/UIxCalMainView.wox +++ b/UI/Templates/SchedulerUI/UIxCalMainView.wox @@ -149,7 +149,7 @@
diff --git a/UI/WebServerResources/js/Scheduler/CalendarsController.js b/UI/WebServerResources/js/Scheduler/CalendarsController.js index 86a548acf..3dbef430e 100644 --- a/UI/WebServerResources/js/Scheduler/CalendarsController.js +++ b/UI/WebServerResources/js/Scheduler/CalendarsController.js @@ -6,8 +6,8 @@ /** * @ngInject */ - CalendarsController.$inject = ['$rootScope', '$scope', '$window', '$mdDialog', '$log', '$mdToast', 'Dialog', 'sgSettings', 'Preferences', 'Calendar']; - function CalendarsController($rootScope, $scope, $window, $mdDialog, $log, $mdToast, Dialog, Settings, Preferences, Calendar) { + CalendarsController.$inject = ['$rootScope', '$scope', '$window', '$mdDialog', '$mdMedia', '$log', '$mdToast', 'sgConstant', 'Dialog', 'sgSettings', 'Preferences', 'Calendar']; + function CalendarsController($rootScope, $scope, $window, $mdDialog, $mdMedia, $log, $mdToast, sgConstant, Dialog, Settings, Preferences, Calendar) { var vm = this; vm.activeUser = Settings.activeUser; @@ -69,6 +69,13 @@ ); }; + /** + * The center is always displayed on small screens. + */ + this.centerIsClose = function (closed) { + return closed && $mdMedia(sgConstant['gt-xs']); + }; + /** * Only allow to sort items within the same list. */