[IMP] account,web: SearchPanel: improve folding behaviour

1) Clicks on a section value are now bound to the entire header, meaning
that the sole purpose of the carets is purely esthetic.
2) Search panel categories will now only be folded if they are being
clicked on while already selected.

Classes that were no longer useful have been removed and tests have been
updated accordingly.

Task 2264700

closes odoo/odoo#51555

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit is contained in:
Julien Mougenot
2020-05-26 13:09:00 +00:00
parent 22167aac57
commit 709d2e8a7a
5 changed files with 34 additions and 37 deletions
+3 -3
View File
@@ -226,7 +226,7 @@
<li class="o_search_panel_category_value border-0 list-group-item" t-att-data-category-id="category.id">
<header t-att-class="'list-group-item-action' + (!category.activeValueId ? ' active' : '')">
<label class="o_search_panel_label mb0">
<div class="o_toggle_fold_container"/>
<div class="o_toggle_fold"/>
<span class="o_search_panel_label_title"><b>All</b></span>
</label>
</header>
@@ -247,8 +247,8 @@
<li class="o_search_panel_category_value border-0 list-group-item" t-att-data-id="value.id" t-att-data-category-id="category.id">
<header t-att-class="'list-group-item-action' + (value.id === category.activeValueId ? ' active' : '')">
<label t-attf-class="o_search_panel_label mb0{{ category.disableCounters ? '' : ' o_with_counters' }}">
<div class="o_toggle_fold_container">
<i t-if="value.childrenIds.length" t-attf-class="o_toggle_fold fa fa-caret-{{ value.folded ? 'right' : 'down' }}"/>
<div class="o_toggle_fold">
<i t-if="value.childrenIds.length" t-attf-class="fa fa-caret-{{ value.folded ? 'right' : 'down' }}"/>
</div>
<span class="o_search_panel_label_title"><t t-esc="value.display_name"/></span>
</label>