summaryrefslogtreecommitdiff
path: root/addons/web
diff options
context:
space:
mode:
authorKaushalya Mandaliya <kma@odoo.com>2020-02-13 14:06:41 +0000
committerKaushalya Mandaliya <kma@odoo.com>2020-03-04 09:50:58 +0000
commite1b257bd8aa3f54f0f1a4612b291bb80301d611e (patch)
treed59096fc81cdb4fd107b28c79cda029ed360035d /addons/web
parentd47f039fd24d062001c77171db0f1da0447e0a97 (diff)
[IMP] web: prevent tooltip duplication on a responsible in the calendar
Before this commit, Hovering on a responsible on the right column of the calendar will: - show a classic yellow tooltip - show a custom tooltip with a bigger image After this commit, Hovering on a responsible on the right column of the calendar will: - show a custom tooltip with a bigger image if image exist else, show classic tooltip PR odoo/odoo#45353 Task-2194828 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Diffstat (limited to 'addons/web')
-rw-r--r--addons/web/static/src/js/views/calendar/calendar_renderer.js10
-rw-r--r--addons/web/static/src/xml/web_calendar.xml2
2 files changed, 6 insertions, 6 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 471ccfbb0c3..7f281e474c9 100644
--- a/addons/web/static/src/js/views/calendar/calendar_renderer.js
+++ b/addons/web/static/src/js/views/calendar/calendar_renderer.js
@@ -639,14 +639,14 @@ return AbstractRenderer.extend({
var self = this;
options.getColor = this.getColor.bind(this);
options.fields = this.state.fields;
- var filter = new SidebarFilter(self, options);
- prom = filter.appendTo(this.$sidebar).then(function () {
+ var sidebarFilter = new SidebarFilter(self, options);
+ prom = sidebarFilter.appendTo(this.$sidebar).then(function () {
// Show filter popover
if (options.avatar_field) {
_.each(options.filters, function (filter) {
- if (filter.value !== 'all') {
+ if (!['all', false].includes(filter.value)) {
var selector = _.str.sprintf('.o_calendar_filter_item[data-value=%s]', filter.value);
- self.$sidebar.find(selector).popover({
+ sidebarFilter.$el.find(selector).popover({
animation: false,
trigger: 'hover',
html: true,
@@ -665,7 +665,7 @@ return AbstractRenderer.extend({
}
return self._renderFiltersOneByOne(filterIndex + 1);
});
- this.filters.push(filter);
+ this.filters.push(sidebarFilter);
}
return Promise.resolve(prom);
},
diff --git a/addons/web/static/src/xml/web_calendar.xml b/addons/web/static/src/xml/web_calendar.xml
index 41020c9939a..1ab1d935896 100644
--- a/addons/web/static/src/xml/web_calendar.xml
+++ b/addons/web/static/src/xml/web_calendar.xml
@@ -77,7 +77,7 @@
</span>
<i t-if="filter.value == 'all'" class="o_cw_filter_avatar fa fa-users fa-fw flex-shrink-0 mr-1" role="img" aria-label="Avatar" title="Avatar"/>
<img t-elif="widget.avatar_field and filter.value" t-attf-src="/web/image/#{widget.avatar_model}/#{filter.value}/#{widget.avatar_field}" class="o_cw_filter_avatar flex-shrink-0 mr-1" alt="Avatar"/>
- <span class="o_cw_filter_title text-truncate flex-grow" t-esc="filter.label" t-att-title="filter.label"/>
+ <span class="o_cw_filter_title text-truncate flex-grow" t-esc="filter.label" t-attf-title="#{ ['all', false].includes(filter.value) or !widget.avatar_field ? filter.label : '' }"/>
</label>
<button t-if="filter.id" class="o_remove btn bg-white text-700 py-0 px-2" title="Remove this favorite from the list" role="img" aria-label="Remove this favorite from the list">