From 565dd634930f3ca2eedfff2aaaa60dee7337d1f8 Mon Sep 17 00:00:00 2001 From: "Michael Mattiello (mcm)" Date: Thu, 30 Jul 2020 12:50:32 +0000 Subject: [PATCH] [FIX] hr_holidays: fix calendar height Before this commit, calendar view's height was 89.5% of its container. It was because of hr_holidays module which reduces the calendar's height to add some elements on top of it. This commit adds a class `o_timeoff_calendar` on calendar view's controller to scope css rules only in the hr_holidays module and set the height to a fixed value. Task id: 2193921 closes odoo/odoo#54268 Related: odoo/enterprise#12183 Signed-off-by: Aaron Bohy (aab) --- addons/hr_holidays/static/src/js/time_off_calendar.js | 8 ++++++++ addons/hr_holidays/static/src/scss/time_off.scss | 6 +++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/addons/hr_holidays/static/src/js/time_off_calendar.js b/addons/hr_holidays/static/src/js/time_off_calendar.js index 795e14a1b3b..ef9f262d861 100644 --- a/addons/hr_holidays/static/src/js/time_off_calendar.js +++ b/addons/hr_holidays/static/src/js/time_off_calendar.js @@ -36,6 +36,14 @@ odoo.define('hr_holidays.dashboard.view_custo', function(require) { 'click .btn-allocation': '_onNewAllocation', }), + /** + * @override + */ + start: function () { + this.$el.addClass('o_timeoff_calendar'); + return this._super(...arguments); + }, + //-------------------------------------------------------------------------- // Public //-------------------------------------------------------------------------- diff --git a/addons/hr_holidays/static/src/scss/time_off.scss b/addons/hr_holidays/static/src/scss/time_off.scss index eb726b9d0eb..f37b89caf03 100644 --- a/addons/hr_holidays/static/src/scss/time_off.scss +++ b/addons/hr_holidays/static/src/scss/time_off.scss @@ -1,10 +1,10 @@ -.o_content { +.o_timeoff_calendar .o_content { .o_timeoff_container { - height: 10%; + height: 6rem; } .o_calendar_container { - height: 89.5%; + height: calc(100% - 6rem); } @include media-breakpoint-down(sm) {