summaryrefslogtreecommitdiff
path: root/addons/mail/static/src
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2018-08-27 11:01:30 +0530
committerqsm-odoo <qsm@odoo.com>2018-08-27 17:12:56 +0200
commitd5786447567b05e85edd43dbefe8e82f22dc2129 (patch)
treeb5f5e45eb5aa58c42967f1ade50714dcb77aeb02 /addons/mail/static/src
parent8ba517bfa8cce4e3f6f72ea68b24e23cdc5eb095 (diff)
[FIX] web, *: use correct DOM for m2m tags
* mail, calendar - Fix traceback when clicking on a tag without color field (introduced in recent changes) - Properly allow to delete tags on firefox (a button obviously cannot contain another button) Closes https://github.com/odoo/odoo/pull/26547 Thanks to @hbh-odoo
Diffstat (limited to 'addons/mail/static/src')
-rw-r--r--addons/mail/static/src/xml/composer.xml12
1 files changed, 4 insertions, 8 deletions
diff --git a/addons/mail/static/src/xml/composer.xml b/addons/mail/static/src/xml/composer.xml
index 10dbc878ccf..7dd31393d34 100644
--- a/addons/mail/static/src/xml/composer.xml
+++ b/addons/mail/static/src/xml/composer.xml
@@ -81,15 +81,11 @@
</t>
<t t-name="FieldMany2ManyTagsEmail" t-extend="FieldMany2ManyTag">
- <t t-jquery="button[t-attf-class*=badge]" t-operation="replace">
- <t t-set="email_error" t-value="''"/>
- <t t-if="el.email.indexOf('@') &lt; 0">
- <t t-set="email_error" t-value="'o_tag_error'"/>
- </t>
- <button t-attf-class="badge dropdown o_tag_color_0 #{email_error}" t-att-data-color="color" t-att-data-index="el_index" t-att-data-id="el.id">
+ <t t-jquery="[t-attf-class*=badge]" t-operation="replace">
+ <div t-attf-class="badge badge-pill dropdown o_tag_color_0 #{el.email.indexOf('@') &lt; 0 ? 'o_tag_error' : ''}" t-att-data-color="color" t-att-data-index="el_index" t-att-data-id="el.id" t-attf-title="Tag color: #{colornames[color]}">
<span class="o_badge_text" t-att-title="el.email"><t t-esc="el.display_name"/></span>
- <span t-if="!readonly" class="fa fa-times o_delete" role="img" aria-label="Delete" title="Delete"/>
- </button>
+ <a t-if="!readonly" href="#" class="fa fa-times o_delete" title="Delete" aria-label="Delete"/>
+ </div>
</t>
</t>
</templates>