summaryrefslogtreecommitdiff
path: root/addons/web/static/src/xml
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2018-07-31 12:50:37 +0200
committerqsm-odoo <qsm@odoo.com>2018-07-31 13:56:50 +0200
commite10a4303c21332f10d89b0c19661cc11ca0dc7a6 (patch)
treec52f777353a94e6b2673394bdeed9df35ddeafa9 /addons/web/static/src/xml
parent0520e0b51dcc176562509dbf0caebc8582c5eb5b (diff)
[FIX] web: BS4, review selected dropdown item style
With BS4, I had to change the dropdown structure and with it the messy way we handled "selected" items. Sub-filters items were still not adapted correctly: use the "selected" class on dropdown-item elements, not one of its parent.
Diffstat (limited to 'addons/web/static/src/xml')
-rw-r--r--addons/web/static/src/xml/base.xml8
1 files changed, 4 insertions, 4 deletions
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml
index a30ed34c264..f01f8e435fb 100644
--- a/addons/web/static/src/xml/base.xml
+++ b/addons/web/static/src/xml/base.xml
@@ -1065,9 +1065,9 @@
<t t-set="group" t-value="0"/>
<t t-foreach="widget.items" t-as="item">
<div t-if="group !== item.groupId" class="dropdown-divider" data-removable="1"/>
- <div t-attf-class="o_menu_item#{item.isActive ? ' selected ' : ''}"
+ <div class="o_menu_item"
t-att-data-id="item.itemId">
- <a href="#" class="dropdown-item">
+ <a href="#" t-attf-class="dropdown-item#{item.isActive ? ' selected ' : ''}">
<t t-esc="item.description"/>
<span t-if="item.isRemovable" t-att-data-id="item.itemId" class="o_trash_button" > <span class="fa fa-trash-o"></span> </span>
<span t-if="item.hasOptions" t-att-data-id="item.itemId" class="o_submenu_switcher">
@@ -1078,9 +1078,9 @@
<t t-set="subgroup" t-value="0"/>
<t t-foreach="_.values(item.options)" t-as="option">
<li t-if="subgroup !== option.groupId" class="dropdown-divider" data-removable="1"/>
- <li t-attf-class="o_item_option#{item.currentOptionId === option.optionId ? ' selected': ''}"
+ <li class="o_item_option"
t-att-data-item_id="item.itemId" t-att-data-option_id="option.optionId">
- <a href="#" class="dropdown-item pl-5"><t t-esc="option.description"/></a>
+ <a href="#" t-attf-class="dropdown-item#{item.currentOptionId === option.optionId ? ' selected': ''} pl-5"><t t-esc="option.description"/></a>
</li>
<t t-set="subgroup" t-value="option.groupId"/>
</t>