From 24a4c7f897d4db6bdf0f3cbfc91a3ce7351241a2 Mon Sep 17 00:00:00 2001 From: Elisabeth Dickinson Date: Mon, 25 Jul 2022 11:52:39 +0000 Subject: [PATCH] [IMP] mass_mailing, web_editor: add basic img shapes, remove img Style The `Styles` option contains styles which are unsupported in emails. The few that are supported can be replaced by other options. - Shadows: unsupported; - Rounded rectangle: (unsupported in Outlook) is replaced by the `Border` options which allows to customize the border's radius more than the current option. - Thumbnail: can be done with a combination of `Border` and `Padding` - Circle: can be done with a shape (which has been added along with other new shapes) This option could be found on images and icons and has now been removed. CSS styles in the `theme_default` file have also been removed since they are no longer needed. Three basic shapes (circle, triangle, "slanted" rectangle) have been added to the `web_editor`'s `Basics` shapes page. A condition was previously set on the page to avoid showing an empty page. The condition is moved to each of its buttons instead, so that new shapes added via xpath from `mass_mailing` to this page are now visible. task-2836942 Part-of: odoo/odoo#95974 --- .../static/image_shapes/basic/circle.svg | 12 +++++ .../static/image_shapes/basic/slanted.svg | 3 ++ .../static/image_shapes/basic/triangle.svg | 3 ++ .../static/src/scss/themes/theme_default.scss | 24 ---------- addons/mass_mailing/views/snippets_themes.xml | 44 ++++++++++++++++++- addons/web_editor/views/snippets.xml | 30 +++++++------ 6 files changed, 78 insertions(+), 38 deletions(-) create mode 100644 addons/mass_mailing/static/image_shapes/basic/circle.svg create mode 100644 addons/mass_mailing/static/image_shapes/basic/slanted.svg create mode 100644 addons/mass_mailing/static/image_shapes/basic/triangle.svg diff --git a/addons/mass_mailing/static/image_shapes/basic/circle.svg b/addons/mass_mailing/static/image_shapes/basic/circle.svg new file mode 100644 index 00000000000..03bd8874acc --- /dev/null +++ b/addons/mass_mailing/static/image_shapes/basic/circle.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/addons/mass_mailing/static/image_shapes/basic/slanted.svg b/addons/mass_mailing/static/image_shapes/basic/slanted.svg new file mode 100644 index 00000000000..976cdccb97c --- /dev/null +++ b/addons/mass_mailing/static/image_shapes/basic/slanted.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/addons/mass_mailing/static/image_shapes/basic/triangle.svg b/addons/mass_mailing/static/image_shapes/basic/triangle.svg new file mode 100644 index 00000000000..2376040b055 --- /dev/null +++ b/addons/mass_mailing/static/image_shapes/basic/triangle.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/addons/mass_mailing/static/src/scss/themes/theme_default.scss b/addons/mass_mailing/static/src/scss/themes/theme_default.scss index d73b9a832bc..6045ea078f3 100644 --- a/addons/mass_mailing/static/src/scss/themes/theme_default.scss +++ b/addons/mass_mailing/static/src/scss/themes/theme_default.scss @@ -103,30 +103,6 @@ div.col:not([align]) { width: $width; height: $height; } - - $size: 2rem; - - &.rounded-circle, - &.rounded, - &.rounded-0, - &.rounded-leaf, - &.img-thumbnail, - &.shadow { - display: inline-block; - vertical-align: middle; - text-align: center; - // fa-1x is not ouput - width: $size; - height: $size; - line-height: $size; - @for $i from 2 through 5 { - &.fa-#{$i}x { - width: $size + $i; - height: $size + $i; - line-height: $size + $i; - } - } - } } // Background Images .oe_img_bg { diff --git a/addons/mass_mailing/views/snippets_themes.xml b/addons/mass_mailing/views/snippets_themes.xml index 3b424e2f707..8292191fa63 100644 --- a/addons/mass_mailing/views/snippets_themes.xml +++ b/addons/mass_mailing/views/snippets_themes.xml @@ -346,10 +346,52 @@ t-att-data-variable="radius_variable"/> + + +