[FIX] website: allow height control over inline embed code snippets

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>
This commit is contained in:
qsm-odoo
2022-06-14 18:26:35 +02:00
parent d4bd8e7cc6
commit 6a7064ed0b
2 changed files with 3 additions and 3 deletions
@@ -212,7 +212,7 @@ weSnippetEditor.SnippetsMenu.include({
/**
* Activates the button to animate text if the selection is in an
* animated text element or deactivates the button if not.
*
*
* @private
*/
_toggleAnimatedTextButton() {
@@ -226,7 +226,7 @@ weSnippetEditor.SnippetsMenu.include({
/**
* Displays the button that allows to highlight the animated text if there
* is animated text in the page.
*
*
* @private
*/
_toggleHighlightAnimatedTextButton() {
@@ -2,7 +2,7 @@
<odoo>
<template name="Embed Code" id="s_embed_code">
<section class="s_embed_code o_half_screen_height text-center">
<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">&#10; Replace this with your own HTML code&#10;</div>
</div>