The embed code snippet (introduced at [1]) comes with a default
"half-screen" min-height. Since [2] (patched with [3]), the min-height
option is not shown anymore for snippets which are dropped in other
snippets ("inline" snippets)... and [4] actually made the embed code
snippet an "inline" one later on. The problem is that once dropped as
an "inline" one, the embed code snippet had thus a "half-screen"
min-height which was impossible to remove.
This commit patches the snippet so that it does not use a default
"half-screen" min-height but default paddings which work both as
"main" and "inline" snippets. The user can still use the min-height
option by himself if he wants to.
[1]: https://github.com/odoo/odoo/commit/2cc481d1a62202ade4c1ca8f846c962f9f2cc34d
[2]: https://github.com/odoo/odoo/commit/58503a248e7ab6b66d61d00869cdae6719e5a068
[3]: https://github.com/odoo/odoo/commit/bebb45e6d5e8224f2d534d5644b9af45fea903b1
[4]: https://github.com/odoo/odoo/commit/6336d1ba35f36733958cab48c1d90b6e3c0505d2
opw-2870772
closes odoo/odoo#93515
X-original-commit: 16da89de212cf82b465658afb05739d59a08d364
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
37 lines
1.5 KiB
XML
37 lines
1.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
|
|
<template name="Embed Code" id="s_embed_code">
|
|
<section class="s_embed_code text-center pt64 pb64">
|
|
<div class="s_embed_code_embedded container o_not_editable">
|
|
<div class="text-monospace pt8 bg-light"> Replace this with your own HTML code </div>
|
|
</div>
|
|
</section>
|
|
</template>
|
|
|
|
<!-- Snippet's Options -->
|
|
<template id="s_embed_code_options" inherit_id="website.snippet_options">
|
|
<xpath expr="//div[@data-js='Box']" position="before">
|
|
<div data-js="EmbedCode" data-selector=".s_embed_code">
|
|
<we-row string="Code">
|
|
<we-button data-edit-code="" data-no-preview="true"
|
|
class="o_we_edit_code o_we_no_toggle o_we_bg_success active"
|
|
title="Edit embedded code">Edit</we-button>
|
|
</we-row>
|
|
<we-button-group string="Alignment">
|
|
<we-button class="fa fa-fw fa-align-left" title="Left" data-select-class="text-left"/>
|
|
<we-button class="fa fa-fw fa-align-center" title="Center" data-select-class="text-center"/>
|
|
<we-button class="fa fa-fw fa-align-right" title="Right" data-select-class="text-right"/>
|
|
</we-button-group>
|
|
</div>
|
|
</xpath>
|
|
</template>
|
|
|
|
<record id="website.s_embed_code_000_scss" model="ir.asset">
|
|
<field name="name">Embed Code 000 SCSS</field>
|
|
<field name="bundle">web.assets_frontend</field>
|
|
<field name="path">website/static/src/snippets/s_embed_code/000.scss</field>
|
|
</record>
|
|
|
|
</odoo>
|