[FIX] website: hide link popover on social share

To reproduce the issue:

- Website > Edit mode > Add "Share" block.
- Cannot edit the link by clicking a social share item ("Edit link"
on link popover doesn't work).

Since 15.x, "Share" snippet items are not meant to be user links but
buttons to share the page on the related social media. It is also
useless to update those links after the update on [1], since they will
be replaced by the right values "on social item click" (the shared URL
may be updated during the page use as on product pages).

The goal of this commit is to fix this behavior and prevent the link
popover from appearing on items (by setting the `o_no_link_popover`
class right after the snippet is dropped into a drop zone).

[1]: https://github.com/odoo/odoo/commit/ddb2c06be4196c86ff6a2fd74874487d75b31c94

opw-3084367

closes odoo/odoo#108724

X-original-commit: f4a602ca4d423056fa3f760fc8a3fc222e2a5e51
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
This commit is contained in:
xO-Tx
2022-12-27 16:49:57 +01:00
committed by qsm-odoo
co-authored by qsm-odoo
parent 5e1074340f
commit fb6d300a6e
+1 -1
View File
@@ -2,7 +2,7 @@
<odoo>
<template id="s_share" name="Share">
<div t-attf-class="s_share text-start #{_classes}">
<div t-attf-class="s_share text-start o_no_link_popover #{_classes}">
<h4 t-if="not _no_title" class="s_share_title d-none">Share</h4>
<a t-if="not _exclude_share_links or not 'facebook' in _exclude_share_links" href="https://www.facebook.com/sharer/sharer.php?u={url}" t-attf-class="s_share_facebook #{_link_classes}" target="_blank">
<i t-attf-class="fa fa-facebook #{not _link_classes and 'rounded shadow-sm'}"/>