[FIX] website_sale_product_library: revert JS hover and center iframe on product image
This commit is contained in:
parent
b072f3b73f
commit
b9af48239e
3 changed files with 17 additions and 19 deletions
|
|
@ -21,7 +21,6 @@ Modifica la tienda online con los campos de product_library.
|
||||||
"data": ["views/website_sale_views.xml"],
|
"data": ["views/website_sale_views.xml"],
|
||||||
"assets": {
|
"assets": {
|
||||||
"web.assets_frontend": [
|
"web.assets_frontend": [
|
||||||
"website_sale_product_library/static/src/js/multimedia_hover_player.js",
|
|
||||||
"website_sale_product_library/static/src/scss/custom.scss",
|
"website_sale_product_library/static/src/scss/custom.scss",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -8,33 +8,32 @@
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
// El player se inserta al final de o_wsale_product_information, en el flujo normal del flex
|
// Player centrado sobre la imagen de producto (sin ocultado por hover)
|
||||||
.o_multimedia_hover_player {
|
.o_wsale_product_img_link {
|
||||||
overflow: hidden;
|
position: relative;
|
||||||
max-height: 0;
|
|
||||||
opacity: 0;
|
|
||||||
pointer-events: none;
|
|
||||||
transition: max-height 0.25s ease-in-out, opacity 0.2s ease-in-out;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.oe_product_cart:hover .o_multimedia_hover_player,
|
.o_multimedia_image_player {
|
||||||
.o_multimedia_hover_player:hover,
|
position: absolute;
|
||||||
.oe_product_cart.o_multimedia_player_active .o_multimedia_hover_player,
|
left: 50%;
|
||||||
.o_multimedia_hover_player:focus-within {
|
top: 50%;
|
||||||
max-height: 60px;
|
transform: translate(-50%, -50%);
|
||||||
opacity: 1;
|
width: min(86%, 320px);
|
||||||
|
z-index: 4;
|
||||||
pointer-events: auto;
|
pointer-events: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.o_multimedia_hover_player iframe,
|
.o_multimedia_image_player iframe,
|
||||||
.o_multimedia_product_player iframe {
|
.o_multimedia_product_player iframe {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
display: block;
|
display: block;
|
||||||
|
border-radius: 8px;
|
||||||
|
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 991.98px) {
|
@media (max-width: 991.98px) {
|
||||||
.o_multimedia_hover_player {
|
.o_multimedia_image_player {
|
||||||
display: none !important;
|
width: min(92%, 300px);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,8 @@
|
||||||
<span t-if="product.autor"><b><t t-out="product.autor" /></b></span>
|
<span t-if="product.autor"><b><t t-out="product.autor" /></b></span>
|
||||||
</a>
|
</a>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//div[hasclass('o_wsale_product_sub')]" position="after">
|
<xpath expr="//a[hasclass('o_wsale_product_img_link')]" position="inside">
|
||||||
<div t-if="product.multimedia_embed_url" class="o_multimedia_hover_player">
|
<div t-if="product.multimedia_embed_url" class="o_multimedia_image_player">
|
||||||
<iframe
|
<iframe
|
||||||
loading="lazy"
|
loading="lazy"
|
||||||
t-att-src="product.multimedia_embed_url"
|
t-att-src="product.multimedia_embed_url"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue