From 8c32bfb45d6bb0e5c5b0f01b073f694f95b2692e Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Thu, 12 Jul 2018 12:28:24 +0200 Subject: [REF] web_editor: make our Summernote/BS3 work with BS4 The big plan is to remove our current editor and its customization and replace it with an updated summernote. Meanwhile, we have to patch our current lib directly so that it works with BS4. --- addons/web_editor/static/lib/summernote/src/js/module/Button.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'addons/web_editor/static/lib/summernote/src/js/module') diff --git a/addons/web_editor/static/lib/summernote/src/js/module/Button.js b/addons/web_editor/static/lib/summernote/src/js/module/Button.js index 59e3fa19f63..c6d28494cd0 100644 --- a/addons/web_editor/static/lib/summernote/src/js/module/Button.js +++ b/addons/web_editor/static/lib/summernote/src/js/module/Button.js @@ -21,10 +21,10 @@ define([ * @param {Number} value */ var checkDropdownMenu = function ($btn, value) { - $btn.find('.dropdown-menu li a').each(function () { + $btn.find('.dropdown-menu .dropdown-item').each(function () { // always compare string to avoid creating another func. var isChecked = ($(this).data('value') + '') === (value + ''); - this.className = isChecked ? 'checked' : ''; + this.className = 'dropdown-item' + (isChecked ? ' checked' : ''); }); }; -- cgit v1.2.3