summaryrefslogtreecommitdiff
path: root/addons/web/static/src/xml/base.xml
diff options
context:
space:
mode:
authorSébastien Theys <seb@odoo.com>2020-05-13 13:18:05 +0000
committerSébastien Theys <seb@odoo.com>2020-05-15 14:05:55 +0000
commit499bbfd5c3d473fed4acd8dd46c043f06d41a09d (patch)
treea0109f6d7b7d0952a313d000ad3900574f105de1 /addons/web/static/src/xml/base.xml
parent5549fb82022ca05c52f588315fb69d2b82dd9d65 (diff)
[IMP] web: various Popover improvements
Close can now be requested by children (slot content) with the event `o-popover-close`. This feature is necessary if we want a "close" button inside the popover itself, which is the case for mail.activity "Mark Done". Clicking on the popover target now acts as a toggle, which is also a feature that was expected from the previous popover implementation. Add a specific class (`o_is_open`) when the popover is displayed to be able to style its target depending on whether it is displayed or not. Ensure computed position is whole number of pixels to prevent flicker issue on Firefox. Remove forced width to let the component grow with its content. Add appropriate z-index to prevent overlap issue with the rest of our interface. closes odoo/odoo#50850 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Diffstat (limited to 'addons/web/static/src/xml/base.xml')
-rw-r--r--addons/web/static/src/xml/base.xml2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml
index aabc2b9f528..999e12ebccd 100644
--- a/addons/web/static/src/xml/base.xml
+++ b/addons/web/static/src/xml/base.xml
@@ -508,7 +508,7 @@
</t>
<t t-name="Popover" owl="1">
- <div t-on-click="openPopover" data-popover="1">
+ <div t-att-class="{ 'o_is_open': state.displayed }" t-on-click="_onClick" t-on-o-popover-close="_onPopoverClose">
<t t-slot="default"/>
<Portal t-if="state.displayed" target="'body'">
<div role="tooltip" class="o_popover" t-ref="popover">