[FIX] web: color for calendar views without color attribute
The `color` attribute allows specifying a field by which the calendar view will color the event entries in the view. In views where this attribute is not defined, the event was instead given the `text-white` class, which rendered the event invisible in the calendar, save for a slight left-border. This commit just use the 1st color class by default in such cases, ensuring all events are visible. opw-2145652 closes odoo/odoo#42200 X-original-commit: 375b34be6ef198753f52a650159edee4d1883006 Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
</div>
|
||||
|
||||
<t t-name="calendar-box">
|
||||
<div t-att-style="typeof color === 'string' ? ('background-color:' + color) + ';' : ''" t-attf-class="#{!event.color_index ? 'text-white' : ''} #{record.is_highlighted ? 'o_event_hightlight' : ''} #{typeof color === 'number' ? _.str.sprintf('o_calendar_color_%s', color) : ''}">
|
||||
<div t-att-style="typeof color === 'string' ? ('background-color:' + color) + ';' : ''" t-attf-class="#{record.is_highlighted ? 'o_event_hightlight' : ''} #{typeof color === 'number' ? _.str.sprintf('o_calendar_color_%s', color) : 'o_calendar_color_1'}">
|
||||
<div class="o_event_title" t-esc="record.display_name"/>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
Reference in New Issue
Block a user