diff options
| author | Xavier Morel <xmo@openerp.com> | 2013-03-21 16:51:23 +0100 |
|---|---|---|
| committer | Xavier Morel <xmo@openerp.com> | 2013-03-21 16:51:23 +0100 |
| commit | 3c5d38918b3ddca8361f96e452402e1154fa8876 (patch) | |
| tree | 6e935c98e477ea3d5198ce05933f0741b081833b /addons/web/static/src/xml | |
| parent | 3b2e26af1810b38f4d86fe1743ed222ef232509f (diff) | |
[FIX] filter preceded by an invisible filter in the same group
On click on a filter in the drawer, FilterGroup would just match the
offset of the filter in the group's DOM with an index in the internal
#filters array.
This worked until invisible fields, and then again only for filters
*preceded* by an invisible sibling in the same group: invisible
filters are not rendered in the DOM, so the indexes would get out of
sync.
Fix by using explicit indexes stored in a filter's @data-index and
using that to get the filter object/node.
An alternative fix (but hackier I think): instead of not rendering
invisible filters, render them with display: none. Remains an option
in the future if needed...
lp bug: https://launchpad.net/bugs/1157125 fixed
bzr revid: xmo@openerp.com-20130321155123-211iht7c6zme712e
Diffstat (limited to 'addons/web/static/src/xml')
| -rw-r--r-- | addons/web/static/src/xml/base.xml | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 1387da6f5fc..c9adc91a6ad 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -1521,7 +1521,8 @@ </button> <ul t-name="SearchView.filters"> <li t-foreach="widget.filters" t-as="filter" t-if="!filter.visible || filter.visible()" - t-att-title="filter.attrs.string ? filter.attrs.help : undefined"> + t-att-title="filter.attrs.string ? filter.attrs.help : undefined" + t-att-data-index="filter_index"> <t t-esc="filter.attrs.string or filter.attrs.help or filter.attrs.name or 'Ω'"/> </li> </ul> |
