From 575283c3c18b3098ec42f0c54fd58dc934c11cee Mon Sep 17 00:00:00 2001 From: Elisabeth Dickinson Date: Wed, 29 Nov 2023 15:18:57 +0100 Subject: [PATCH] [FIX] calendar, web: bring back hatched and striked styles in Year view During the revamp (https://github.com/odoo/odoo/pull/138670) the classes `.o_event_hatched` and `.o_event_striked` were moved. The `o_event_hatched` works on day, week, and month view but not in Year view of the `hr_holidays` module where the events all look like they have the same status. The `o_event_striked` was removed by mistake. To fix this issue, we move the `.o_event_hatched` where it isn't under the `.fc-event` selector (because this one doesn't exist in Year view), and we put back `o_event_striked`. task-3617333 part of task-3575827 closes odoo/odoo#144208 Signed-off-by: Romeo Fragomeli (rfr) --- addons/calendar/static/src/scss/calendar.scss | 12 ------------ .../src/views/calendar/calendar_renderer.scss | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/addons/calendar/static/src/scss/calendar.scss b/addons/calendar/static/src/scss/calendar.scss index 8293a928a09..d721173f5b5 100644 --- a/addons/calendar/static/src/scss/calendar.scss +++ b/addons/calendar/static/src/scss/calendar.scss @@ -44,18 +44,6 @@ &.o_attendee_status_declined { --o-bg-opacity: 0; } - - &.o_attendee_status_tentative, &.o_event_hatched { - .fc-bg { - background: repeating-linear-gradient( - 45deg, - RGBA(var(--o-event-bg-rgb, #{to-rgb($info)}), .3), - RGBA(var(--o-event-bg-rgb, #{to-rgb($info)}), .3) 10px, - RGBA(var(--o-event-bg-rgb, #{to-rgb($info)}), .6) 10px, - RGBA(var(--o-event-bg-rgb, #{to-rgb($info)}), .6) 20px - ) !important; - } - } } &.o_event_dot { diff --git a/addons/web/static/src/views/calendar/calendar_renderer.scss b/addons/web/static/src/views/calendar/calendar_renderer.scss index 8de6e88c7fc..60eddd370b4 100644 --- a/addons/web/static/src/views/calendar/calendar_renderer.scss +++ b/addons/web/static/src/views/calendar/calendar_renderer.scss @@ -597,6 +597,23 @@ background-color: $color-subtle; } + &.o_event_hatched:not(.o_event_dot):not(.fc-day-grid-event), &.o_event_hatched.fc-day-grid-event .fc-bg, &.o_attendee_status_tentative:not(.o_event_dot) .fc-bg { + background: repeating-linear-gradient( + 45deg, + RGBA(to-rgb($color), .3), + RGBA(to-rgb($color), .3) 10px, + RGBA(to-rgb($color), .6) 10px, + RGBA(to-rgb($color), .6) 20px + ) !important; + } + + &.o_event_striked:not(.o_event_dot) { + background: linear-gradient( + transparent 0 45%, + $color 45% 55%, + transparent 55% 100%); + } + &.fc-event:not(.o_event_dot):not(.fc-dragging) { color: color-contrast($color-subtle); border-color: tint-color($color, 50%);