This commit is the first step towards the addition of various SVG shapes
for the website app.
The purpose of this commit is to add the new shapes SVGs and to sort the
current shape menu into new categories.
The avoid duplicating the shapes added in mass_mailing, the 3 shapes:
- Circle
- Slanted
- Triangle (corner)
Are now in the web_editor, their existing reference in mass_mailing
template have have been changed to their new locations. To adapt to
`b1a3a3b18370ad76280726298602815769dce1c2` the paths have been changed
and a new record for `s_tech_default_image.jpg` have been created in
the new file `mass_mailing_themes/data/ir_attachment_data.xml` since
it's an image only used in themes. (Also removing `noupdate=0` from
the data element in `mass_mailing/data/ir_attachment_data.xml`
since it is the default value).
I also removed the .png and old .jpg of this image since now the shape
is applied directly on the image.
Since the shapes + their image are converted in a base64 img+svg on
save, we can move the assets of the current website shapes in use
without compatibility issue. Therefore these shapes were renamed and
moved their new folder category.
The SVG width and height of the new and previous shapes was set to
600x600 since they are mostly squarish and are going to be rendered in a
square preview in the future.
To simulate the future preview of the shape selection menu, the
`we-button img` width was set to
`$o-we-sidebar-content-field-dropdown-grid-item-height` and the
`we-button` width to `1/4` in the file `wysiwyg_snippets.scss`.
It makes the preview 60x60 and displayed in a four tiles layout.
Note :
- If later on the SVG are rendered as inline-svg rather than base64
the current IDs inside the .svg might conflict if multiple svg are
on the same page.
- The previous shapes might look a bit weird with the squarish ratio
in preview, alternatives solutions should be explored during the
implementation of the new UI.
task-3094258
closesodoo/odoo#110673
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Old thumbnails for deprecated snippets have been removed. The
other snippet thumbnails have been grouped together in same folder.
Some images are unnecessary since the new mail builder, some are simply
not used anywhere.
The references snippet is limited to four images, adding more columns
will copy the last column's image, so no need for images 5 and 6.
The basic template doesn't allow snippets - the editor doesn't even
appear - since no snippets can be added, their images are unnecessary in
the templates image folder.
In all cases, the drag&dropped snippets, even from other templates,
use the theme_default images and not the templates' images.
Move all images in snippets_demo folder to theme_default folder
For more consistency, default images have been renamed according to
their snippet names
Part-of: odoo/odoo#95940
Removed unnecessary classes and placed necessary styles as inline styles
for better support by the builder.
Removed options.js which allows to change the blockquote's style as in
the web editor, but none of the other options is well supported in
emails. Due to this change, the blockquote's cover image is removed.
Changes to text done via the Design tab in the builder weren't being
applied to text inside `<span>`, so this has been changed to a `<p>`
element in order for the changes to be applied.
Part-of: odoo/odoo#95940
As mentioned in the previous commit, the circle in the `Styles` option
has been replaced by a shape.
Previously we used `.rounded-circle` on images to make them round,
now we use the new circle shape from the `Shapes` option to achieve
the same effect.
This change has been applied on the snippets' images.
Snippets containing icons with these options have also been modified.
In the builder, the `Shapes` option generates a second image (circle)
from an original source (square image) and applies various
data-attributes.
In order for the option to function correctly on snippets,
the different data-attributes such as `data-original-src` and
`data-shape` have been added manually to the snippet's images.
This creates a need for an original image and a shaped version of the
image in the repo.
task-2836942
Part-of: odoo/odoo#95974
PURPOSE
Reorganize addon according to guidelines, helping finding and updating code.
SPECIFICATIONS
Correctly split data into separate files. A lot of content was put a bit
randomly in data files, leading to a hard discovery of code and features.
We also fix duplicated attachments definition, both in mass_mailing_data and
ir_attachment files. It has been merged into the attachment data file.
Task-2864264 (Mass Mailing Module Reorganization)
Part-of: odoo/odoo#92509