[FIX] web: calendar: hide event span when not used
Due to commit odoo/odoo@8e48ba3eb5 a span was added to show the time before the title on a event in month view. DOM of event +---------------+ | SPAN FOR TIME | +---------------+ | TITLE | | | | | +---------------+ This commit, hide the empty span when is not needed, to avoid empty blank space. Steps to reproduce: * Go in calendar app * Go in view week (BUG) closes odoo/odoo#51859 X-original-commit: 8456be44b1bc6746563cbca5366257a1da8b4a53 Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com> Signed-off-by: rfr-odoo <rfr-odoo@users.noreply.github.com>
This commit is contained in:
@@ -354,6 +354,7 @@ return AbstractRenderer.extend({
|
||||
event: event,
|
||||
record: event.extendedProps.record,
|
||||
color: this.getColor(event.extendedProps.color_index),
|
||||
showTime: !self.hideTime && event.extendedProps.showTime,
|
||||
};
|
||||
this.qweb_context = qweb_context;
|
||||
if (_.isEmpty(qweb_context.record)) {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
<t t-name="calendar-box">
|
||||
<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'}">
|
||||
<span class="fc-time"/>
|
||||
<span t-if="showTime" class="fc-time"/>
|
||||
<div class="o_event_title" t-esc="record.display_name"/>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
Reference in New Issue
Block a user