[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: fullcalendar/fullcalendar@e879c43 that made it not working without title (odoo use case), in 2020 it was reverted when refactoring for 5.0: fullcalendar/fullcalendar@7c7ce1e closes odoo/odoo#66109 X-original-commit: b856d312be19b0fdf636600a76c4d9b427eedb7c Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user