[FIX] web: typo calendar highlight -> ok now
Adapt calendar highlight option (that "highlight" event linked to the record we come from) to current JS framework data structures. note: this changeset also fixes the original `_compute_is_highlighted` that was would trigger CacheMiss errors, and also adds back the CSS for highlighting that was lost between 12.0 and 13.0 version. opw-2131494 closes #40791 closes odoo/odoo#41077 X-original-commit: da56e3e7036ecdb3905f4152778e853e080e0163 Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
This commit is contained in:
@@ -757,6 +757,9 @@ class Meeting(models.Model):
|
||||
event.is_highlighted = True
|
||||
else:
|
||||
event.is_highlighted = False
|
||||
else:
|
||||
for event in self:
|
||||
event.is_highlighted = False
|
||||
|
||||
name = fields.Char('Meeting Subject', required=True, states={'done': [('readonly', True)]})
|
||||
state = fields.Selection([('draft', 'Unconfirmed'), ('open', 'Confirmed')], string='Status', readonly=True, tracking=True, default='draft')
|
||||
|
||||
@@ -265,6 +265,7 @@
|
||||
<field name="attendee_status"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="partner_ids" widget="many2many_tags_avatar" write_model="calendar.contacts" write_field="partner_id" avatar_field="image_128"/>
|
||||
<field name="is_highlighted" invisible="1"/>
|
||||
<field name="description"/>
|
||||
</calendar>
|
||||
</field>
|
||||
|
||||
@@ -594,6 +594,15 @@ $o-cw-filter-avatar-size: 20px;
|
||||
.fc-event.o_calendar_color_#{$i} {
|
||||
border-color: $color;
|
||||
color: darken($color, 35%);
|
||||
opacity: 0.8;
|
||||
|
||||
&.o_event_hightlight {
|
||||
opacity: 1;
|
||||
|
||||
.fc-content {
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.fc-bg {
|
||||
background: mix($color, white);
|
||||
|
||||
@@ -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 and record.is_highlighted.value ? '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="#{!event.color_index ? 'text-white' : ''} #{record.is_highlighted ? 'o_event_hightlight' : ''} #{typeof color === 'number' ? _.str.sprintf('o_calendar_color_%s', color) : ''}">
|
||||
<div class="o_event_title" t-esc="record.display_name"/>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
Reference in New Issue
Block a user