summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js/editor
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2020-09-28 15:26:49 +0000
committerqsm-odoo <qsm@odoo.com>2020-09-28 15:31:14 +0000
commit19be84634d394f47ceb882c5ddd24585f31b50ae (patch)
treefae2c9d3d51c18d2378c034b0bd8c05f7a6bf57c /addons/web_editor/static/src/js/editor
parentad20f2b97ef925a27cef4976462d3d0aa39d0433 (diff)
[FIX] web_editor: restore background and foreground color previews
Forward-port of [1] for the custom text tools for the website editor. Still has to be improved with the future text tools. [1]: https://github.com/odoo/odoo/pull/58690 Part of https://github.com/odoo/odoo/pull/58638 closes odoo/odoo#58638 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Diffstat (limited to 'addons/web_editor/static/src/js/editor')
-rw-r--r--addons/web_editor/static/src/js/editor/rte.summernote.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/addons/web_editor/static/src/js/editor/rte.summernote.js b/addons/web_editor/static/src/js/editor/rte.summernote.js
index b99c9781446..96f73267244 100644
--- a/addons/web_editor/static/src/js/editor/rte.summernote.js
+++ b/addons/web_editor/static/src/js/editor/rte.summernote.js
@@ -245,8 +245,8 @@ eventHandler.modules.popover.button.update = function ($container, oStyle) {
$(oStyle.image).addClass('o_we_selected_image');
if (dom.isImgFont(oStyle.image)) {
- $container.find('.note-fore-color-preview > button').css('border-bottom-color', $(oStyle.image).css('color'));
- $container.find('.note-back-color-preview > button').css('border-bottom-color', $(oStyle.image).css('background-color'));
+ $container.find('.note-fore-color-preview > button > .caret').css('border-bottom-color', $(oStyle.image).css('color'));
+ $container.find('.note-back-color-preview > button > .caret').css('border-bottom-color', $(oStyle.image).css('background-color'));
$container.find('.btn-group:not(.only_fa):has(button[data-event="resize"],button[data-value="img-thumbnail"])').addClass('d-none');
$container.find('.only_fa').removeClass('d-none');
@@ -287,8 +287,8 @@ eventHandler.modules.popover.button.update = function ($container, oStyle) {
$(oStyle.image).trigger('attributes_change');
} else {
- $container.find('.note-fore-color-preview > button').css('border-bottom-color', oStyle.color);
- $container.find('.note-back-color-preview > button').css('border-bottom-color', oStyle['background-color']);
+ $container.find('.note-fore-color-preview > button > .caret').css('border-bottom-color', oStyle.color);
+ $container.find('.note-back-color-preview > button > .caret').css('border-bottom-color', oStyle['background-color']);
}
};