diff options
| author | Romeo Fragomeli <rfr@odoo.com> | 2020-05-22 15:34:56 +0000 |
|---|---|---|
| committer | Romeo Fragomeli <rfr@odoo.com> | 2020-05-26 08:57:40 +0000 |
| commit | 3e29babc3ecb1d160039e3786734acd8e6baa130 (patch) | |
| tree | 5c908698533ce8c346854d55e9fa52aa76c4b274 /addons/web/static/src | |
| parent | 2ef534a6d529a3c27a938f44ddf903a40ffc10fa (diff) | |
[FIX] web: calendar: hide event span when not used
Due to commit odoo/odoo@8e48ba3eb59939cb5f8bdb715afa5e520b532a00
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>
Diffstat (limited to 'addons/web/static/src')
| -rw-r--r-- | addons/web/static/src/js/views/calendar/calendar_renderer.js | 1 | ||||
| -rw-r--r-- | addons/web/static/src/xml/web_calendar.xml | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/addons/web/static/src/js/views/calendar/calendar_renderer.js b/addons/web/static/src/js/views/calendar/calendar_renderer.js index 4f492585ef1..be96cf25068 100644 --- a/addons/web/static/src/js/views/calendar/calendar_renderer.js +++ b/addons/web/static/src/js/views/calendar/calendar_renderer.js @@ -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)) { diff --git a/addons/web/static/src/xml/web_calendar.xml b/addons/web/static/src/xml/web_calendar.xml index 17b08464e6b..dbe7bb2834d 100644 --- a/addons/web/static/src/xml/web_calendar.xml +++ b/addons/web/static/src/xml/web_calendar.xml @@ -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> |
