summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/xml/composer.xml
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2018-03-14 16:21:14 +0100
committerqsm-odoo <qsm@odoo.com>2018-07-27 12:36:54 +0200
commit1c1c0897e8eca607c7f1b96b68a06c026c543e6a (patch)
tree1f667224be28146cbcbe602892094046052ea93b /addons/mail/static/src/xml/composer.xml
parent220e49f9d66f2e2ea875143c2da0c20919ec0b3e (diff)
[REF] *: BS4, adapt dropdowns and carets
- The dropdown structure was simplified, allowing to get rid of the 3-levels structure induced by <ul/> elements and dropdowns can now contain anything. The class 'dropdown-item' is now mandatory for each dropdown clickable element. The class 'dropdown-item-text' can be used to add same padding and style but without making the element have a clickable look. - Dividers now use the class 'dropdown-divider' - The way dropdowns are opened and hidden also changed (before the 'open' class was added on the `.dropdown-menu` parent, now the 'show' class is added on both the `.dropdown-menu` parent and the `.dropdown-menu` itself). - JS-wise, no click event handlers can be put on `.dropdown-toggle` elements anymore (instead, use handlers for dropdown events). - Carets are automatically put on `.dropdown-toggle` elements, so this commit replaces the `.caret` elements with this. This feature was possible to disable but would prevent us from adding a caret with scss. Also, this simplifies the DOM. The 'o-no-caret' class was also introduced to allow using the 'dropdown-toggle' class on non-caret elements. - Also adapt the scss to use $caret-width instead of $caret-width-base
Diffstat (limited to 'addons/mail/static/src/xml/composer.xml')
-rw-r--r--addons/mail/static/src/xml/composer.xml18
1 files changed, 8 insertions, 10 deletions
diff --git a/addons/mail/static/src/xml/composer.xml b/addons/mail/static/src/xml/composer.xml
index 9a373dad533..8ecf3f8a7c6 100644
--- a/addons/mail/static/src/xml/composer.xml
+++ b/addons/mail/static/src/xml/composer.xml
@@ -47,17 +47,15 @@
@param {boolean} [suggestions.divider=false]
-->
<t t-name="mail.MentionSuggestions">
- <ul class="dropdown-menu" role="menu">
+ <div class="dropdown-menu" role="menu">
<t t-foreach="suggestions" t-as="suggestion">
- <li role="separator" t-if="suggestion.divider" class="divider"/>
- <li t-if="!suggestion.divider" class="o_mention_proposition" t-att-data-id="suggestion.id">
- <a role="menuitem" href="#"/>
- </li>
+ <div role="separator" t-if="suggestion.divider" class="dropdown-divider"/>
+ <a t-else="" href="#" class="dropdown-item o_mention_proposition" t-att-data-id="suggestion.id" role="menuitem"/>
</t>
- </ul>
+ </div>
</t>
<t t-name="mail.MentionSuggestions.Partner" t-extend="mail.MentionSuggestions">
- <t t-jquery=".o_mention_proposition a" t-operation="append">
+ <t t-jquery=".o_mention_proposition" t-operation="append">
<span class="o_mention_name"><t t-esc="suggestion.name"/></span>
<t t-if="suggestion.email">
<span class="o_mention_info">(<t t-esc="suggestion.email"/>)</span>
@@ -65,18 +63,18 @@
</t>
</t>
<t t-name="mail.MentionSuggestions.Channel" t-extend="mail.MentionSuggestions">
- <t t-jquery=".o_mention_proposition a" t-operation="append">
+ <t t-jquery=".o_mention_proposition" t-operation="append">
<span class="o_mention_name"><t t-esc="suggestion.name"/></span>
</t>
</t>
<t t-name="mail.MentionSuggestions.CannedResponse" t-extend="mail.MentionSuggestions">
- <t t-jquery=".o_mention_proposition a" t-operation="append">
+ <t t-jquery=".o_mention_proposition" t-operation="append">
<span class="o_mention_name"><t t-esc="suggestion.source"/></span>
<span class="o_mention_info"><t t-esc="suggestion.substitution"/></span>
</t>
</t>
<t t-name="mail.MentionSuggestions.Command" t-extend="mail.MentionSuggestions">
- <t t-jquery=".o_mention_proposition a" t-operation="append">
+ <t t-jquery=".o_mention_proposition" t-operation="append">
<span class="o_mention_name">/<t t-esc="suggestion.name"/></span>
<span class="o_mention_info"><t t-esc="suggestion.help"/></span>
</t>