bbd1a48083a934c36b046b1da46b394a28f8e4f1
Since the edited website pages are inside an iframe, the options panel cannot base its display on the CSS rules of the page. When changing the theme colors, only the edited page's CSS is reloaded, not the option one. Because of this, the background shapes are displayed using an obsolete color palette inside the options panel. This causes colors to be forced on background shapes within the iframe because their default colors do not match the ones inside the options panel when different theme colors are set. Once forced, the colors of the background shapes within the content do not follow the theme palette changes anymore. This commit forces the background shapes displayed in the options panel to use the current palette. This is done by recovering the current edited page's shape background images from the CSS rules. This approach was chosen as opposed to adding a `d-none` version of the shape `div` to the edited page and getting the background image from its computed style. This fixes the color comparison between the background shapes of the content and the ones of the options panel, thus not forcing colors if the theme colors are used. Steps to reproduce: - Edit a website page. - Drop a "Banner" block. - Enable background shapes. - Go to the theme tab. - Select a different theme color palette. - Select the "Banner" block. - Open the "Shape" option's menu. => The shapes were displayed with the old color palette and if selected were applied with the old color palette. Additionally, to avoid a race condition when leaving a theme color picker by either clicking on the BLOCKS tab or re-selecting the snippet with a shape, a re-rendering of the existing snippet editors is requested and the shape cache is invalidated if the palette has changed in the meantime. task-3370939 closes odoo/odoo#127951 X-original-commit: c511e100cad2febc0ebb9ce61b5eb52232e60f7d Signed-off-by: Soukéina Bojabza (sobo) <sobo@odoo.com>
…
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%