From c721d06995f139da05e9b8a479aef1e3098be7d1 Mon Sep 17 00:00:00 2001 From: Nicolas Bayet Date: Mon, 21 Mar 2022 11:53:29 +0000 Subject: [PATCH] [FIX] web_editor: load odooEditor base style Before this commit The style for `li.oe-nested` was loaded only when the editor loaded. The problem is that the style needs to be visible even when the editor has never been loaded. After this commit The style for `li.oe-nested` is always loaded in the backend and in the frontend. Task-2793528 closes odoo/odoo#86817 X-original-commit: 6c26e24c3d52410c0a3a06ee9a9d0aad6858a438 Signed-off-by: David Monjoie (dmo) --- addons/web_editor/__manifest__.py | 1 + addons/web_editor/static/lib/odoo-editor/demo/index.html | 2 ++ addons/web_editor/static/lib/odoo-editor/src/base_style.css | 3 +++ addons/web_editor/static/lib/odoo-editor/src/style.css | 3 --- addons/web_editor/static/lib/odoo-editor/test/editor-test.html | 1 + 5 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 addons/web_editor/static/lib/odoo-editor/src/base_style.css diff --git a/addons/web_editor/__manifest__.py b/addons/web_editor/__manifest__.py index ff3d12d8e4f..43c53789ebb 100644 --- a/addons/web_editor/__manifest__.py +++ b/addons/web_editor/__manifest__.py @@ -86,6 +86,7 @@ Odoo Web Editor widget. 'web_editor/static/src/js/wysiwyg/wysiwyg_iframe.js', ], 'web.assets_common': [ + 'web_editor/static/lib/odoo-editor/src/base_style.css', 'web_editor/static/lib/vkbeautify/**/*', 'web_editor/static/src/js/common/**/*', 'web_editor/static/lib/odoo-editor/src/utils/utils.js', diff --git a/addons/web_editor/static/lib/odoo-editor/demo/index.html b/addons/web_editor/static/lib/odoo-editor/demo/index.html index 45e7dca3d26..5a2e5a61199 100644 --- a/addons/web_editor/static/lib/odoo-editor/demo/index.html +++ b/addons/web_editor/static/lib/odoo-editor/demo/index.html @@ -14,6 +14,8 @@ + + diff --git a/addons/web_editor/static/lib/odoo-editor/src/base_style.css b/addons/web_editor/static/lib/odoo-editor/src/base_style.css new file mode 100644 index 00000000000..04cfa68c98e --- /dev/null +++ b/addons/web_editor/static/lib/odoo-editor/src/base_style.css @@ -0,0 +1,3 @@ +li.oe-nested { + display: block; +} diff --git a/addons/web_editor/static/lib/odoo-editor/src/style.css b/addons/web_editor/static/lib/odoo-editor/src/style.css index 1ea8483abc4..b2bd6234ff9 100644 --- a/addons/web_editor/static/lib/odoo-editor/src/style.css +++ b/addons/web_editor/static/lib/odoo-editor/src/style.css @@ -194,9 +194,6 @@ } /* Content styling */ -li.oe-nested { - display: block; -} .oe-commandbar-wrapper { position: absolute; z-index: 1051; diff --git a/addons/web_editor/static/lib/odoo-editor/test/editor-test.html b/addons/web_editor/static/lib/odoo-editor/test/editor-test.html index 1a63b04f083..2ee7f1b8e28 100644 --- a/addons/web_editor/static/lib/odoo-editor/test/editor-test.html +++ b/addons/web_editor/static/lib/odoo-editor/test/editor-test.html @@ -7,6 +7,7 @@ Odoo Editor tests +