diff options
| author | Nicolas Lempereur <nle@odoo.com> | 2021-02-12 14:00:23 +0000 |
|---|---|---|
| committer | Nicolas Lempereur <nle@odoo.com> | 2021-02-15 16:28:34 +0000 |
| commit | c8b3dc91dc394ddec2e7e56b2959db026384a3fc (patch) | |
| tree | 95e4f1baa4ca9e25aefd270887d242c5938faaee | |
| parent | 8b8eac4cbbead9330b068d5febf72595c4486fd5 (diff) | |
[FIX] web: show more text of short calendar event
In a4d170ad9 there were some improvment to not show event totally empty
on the day calendar view because of different style (font + padding).
The lower part of the text was still a little cut, this commit try to
improve this for week and day view mode by removing 5 additional pixels.
opw-2422700
note:
Also fix the fc-short for fullcalendar Odoo, we had this 2019 change:
https://github.com/fullcalendar/fullcalendar/commit/e879c430013ed
that made it not working without title (odoo use case), in 2020 it was
reverted when refactoring for 5.0:
https://github.com/fullcalendar/fullcalendar/commit/7c7ce1e8f94b
closes odoo/odoo#66091
X-original-commit: b856d312be19b0fdf636600a76c4d9b427eedb7c
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
| -rw-r--r-- | addons/web/static/lib/fullcalendar/timegrid/main.js | 4 | ||||
| -rw-r--r-- | addons/web/static/src/scss/web_calendar.scss | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/addons/web/static/lib/fullcalendar/timegrid/main.js b/addons/web/static/lib/fullcalendar/timegrid/main.js index 086625fac52..0ffebd672ac 100644 --- a/addons/web/static/lib/fullcalendar/timegrid/main.js +++ b/addons/web/static/lib/fullcalendar/timegrid/main.js @@ -267,7 +267,9 @@ Docs & License: https://fullcalendar.io/ } // if the event is short that the title will be cut off, // attach a className that condenses the title into the time area. - if (seg.eventRange.def.title && seg.bottom - seg.top < 30) { + //if (seg.eventRange.def.title && seg.bottom - seg.top < 30) { + // ODOO FIX: fc-short without title as done in 3.0 and 5.0 + if (seg.bottom - seg.top < 30) { seg.el.classList.add('fc-short'); // TODO: "condensed" is a better name } } diff --git a/addons/web/static/src/scss/web_calendar.scss b/addons/web/static/src/scss/web_calendar.scss index e256e575812..f7e40fbe4e4 100644 --- a/addons/web/static/src/scss/web_calendar.scss +++ b/addons/web/static/src/scss/web_calendar.scss @@ -51,6 +51,11 @@ $o-cw-filter-avatar-size: 20px; font-weight: 500; } + // Try to show one full lien for short event + &.fc-short .fc-content { + margin-top: 1px; + } + &.o_cw_custom_highlight { z-index: 10!important; @@ -208,6 +213,7 @@ $o-cw-filter-avatar-size: 20px; // Try to avoid showing no title for short event &.fc-short { padding-top: 0; + padding-bottom: 0; } } |
