-
- Downloads
[FIX] web_editor: fix icons losing classes when modifying them
Previously, when double clicking and image, video, icon, or document in the web-editor and replacing it with a different media type, it would lose its custom classes. This means among other things, that it would lose margins and paddings from bootstrap classes, or in the case of the three columns snippet, that the new media would not be properly rounded in its top corner, or not show up at all in the case of the video. The only exception was when changing any media type to an icon, but in that case it would also keep some of the media-specific classes that are supposed to be removed (eg img-fluid or media_iframe_video). This commit fixes that as well as some _clear behaviour that didn't remove all classes that had to be removed, eg some fa-classes would linger depending on their order, and the o_image class from documents would always remain Part of https://github.com/odoo/odoo/pull/64234 task-2282542 closes odoo/odoo#64234 X-original-commit: 99531f5d Signed-off-by:Quentin Smetz (qsm) <qsm@odoo.com>
Showing
- addons/web/static/src/scss/mimetypes.scss 2 additions, 0 deletionsaddons/web/static/src/scss/mimetypes.scss
- addons/web_editor/static/src/js/wysiwyg/widgets/media.js 13 additions, 16 deletionsaddons/web_editor/static/src/js/wysiwyg/widgets/media.js
- addons/web_editor/static/src/js/wysiwyg/widgets/media_dialog.js 12 additions, 1 deletion.../web_editor/static/src/js/wysiwyg/widgets/media_dialog.js
Loading
Please register or sign in to comment