From 6a7064ed0bc78a8d51b04b5bda55846df79f686f Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Mon, 13 Jun 2022 08:28:09 +0000 Subject: [PATCH] [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) Signed-off-by: Quentin Smetz (qsm) --- addons/website/static/src/js/editor/snippets.editor.js | 4 ++-- addons/website/views/snippets/s_embed_code.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/website/static/src/js/editor/snippets.editor.js b/addons/website/static/src/js/editor/snippets.editor.js index c4180825a84..ab0e3b83791 100644 --- a/addons/website/static/src/js/editor/snippets.editor.js +++ b/addons/website/static/src/js/editor/snippets.editor.js @@ -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() { diff --git a/addons/website/views/snippets/s_embed_code.xml b/addons/website/views/snippets/s_embed_code.xml index 6e53cf218cb..9126e27425e 100644 --- a/addons/website/views/snippets/s_embed_code.xml +++ b/addons/website/views/snippets/s_embed_code.xml @@ -2,7 +2,7 @@