Commit Graph
7 Commits
Author SHA1 Message Date
Antoine Guenet ccbcb4919e [FIX] mass_mailing: ensure media list items are full width
A horizontal padding was applied to each media list item, making it
impossible to make the media list items full width. Full width media
list items can always be reduced by adding padding in the editor, but
the converse is not true. For this reason, this commit applies
horizontal padding 0 to each media list item in the snippet template.

task-2716398

closes odoo/odoo#81637

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-12-20 13:38:59 +00:00
Antoine Guenet afa8233502 [FIX] mass_mailing: center image in cover snippet
When the cover snippet's image is in full width, we don't notice it's
not centered. But reduce its width and it appears at the left of its
container. There is no reasonable scenario in which this would be what
we expect so this commit centers that image by default.

task-2716399

Part-of: odoo/odoo#81637
2021-12-20 13:38:59 +00:00
Antoine Guenet 62dbff18ca [FIX] mass_mailing, website: prevent merge lines in s_numbers snippet
When double clicking a number in the numbers snippet, then typing a new
number, the number line would be merge with the text underneath. This
prevents that by adding a line break in between so they aren't
considered the same line by the editor (an inline with a block as
sibling is a tricky case for edition).

task-2711644

closes odoo/odoo#81551

X-original-commit: 886af1f328a9f1664b0d3e204bf984bfee28b215
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet <age@odoo.com>
2021-12-16 16:44:56 +00:00
fb20b16d48 [FIX] web_editor, *: review icon buttons sizing and paddings
*: mass_mailing, website, website_sale

Before this commit, it was impossible to add `fa-fw` directly on a
`we-button` as it would make the icon half invisible, since the whole
`we-button` would have the font-awesome `.fa-fw` css rule applied on it;
width: ~1.28em.

Then, one would need to insert a `<i/>` tag inside the `we-button` for
it to work.

This commit improves that behavior by handling automatically such cases,
and will preserve the purpose of the `fa-fw` class which is to have a
fixed width for those icons.

Note that the util class introduced in [1] (o_we_button_icon renamed
here in o_we_icon_button) is still useful to handle the case of svg
images, they are not allowed to shrink, the same way the fa buttons are.

[1]: https://github.com/odoo/odoo/commit/e4233643b93b521454cc146c6a2ae876781fb9ba

Related to task-2172311

closes odoo/odoo#77980

X-original-commit: e8ab9d76b802e80bb386812e4c8566825cbc2c92
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Younn Olivier <yol@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2021-10-07 13:09:26 +00:00
Antoine Guenet 0249b0ce1a [REF] mass_mailing, website: rename conflictual snippet options classes
The css of some website snippets conflicted with their mass_mailing
equivalents. A quick, non-intrusive solution had been to contain that
css so it wouldn't conflict. This replaces that solution with the more
neighborly renaming of said snippets in mass_mailing. This way there is
no added awareness of mass_mailing within the code of website.

Part-of: odoo/odoo#77724
2021-10-04 15:31:11 +00:00
Antoine Guenet ff9a77c4be [FIX] mass_mailing, web(site,_editor): restore original website options
Commit [1] copied a lot of website snippet options into mass mailing.
Some were moved to web_editor and xpathed to be used in both without
duplicating code. Sadly that is not without side effects and it was
therefore decided to duplicate them instead so they can live separate
lives in the future.

[1] https://github.com/odoo/odoo/commit/4f7cd33d0fd69ee5984d0968233ffc73d7751030

Part-of: odoo/odoo#77724
2021-10-04 15:31:11 +00:00
Antoine GuenetandElisabeth Dickinson d0c2d8e9a1 [ADD] mass_mailing, web[site|_editor]: website snippets to mass_mailing
The following snippets (and their relevant options) were added to
`mass_mailing`, mostly duplicated from the website builder:

- s_cover
- s_title
- s_text_block
- s_comparisons
- s_color_blocks_2
- s_three_columns
- s_image_text
- s_text_image
- s_picture
- s_features
- s_numbers
- s_masonry_block
- s_media_list
- s_showcase
- s_company_team
- s_call_to_action
- s_references
- s_product_list
- s_features_grid
- s_alert
- s_rating
- s_blockquote
- s_hr
- s_text_highlight
- s_coupon_code

The following snippets were removed to make way for the new:

- s_mail_block_banner
- s_mail_block_title_sub
- s_mail_block_paragraph
- s_mail_block_comparison_table
- s_mail_block_two_cols
- s_mail_block_three_cols
- s_mail_block_image_text
- s_mail_block_text_image
- s_mail_block_image
- s_mail_block_footer_separator
- s_mail_block_steps
- s_mail_block_discount2

The following standalone snippet options were added, mostly duplicated from the
website builder:

- Box
- layout_column
- SnippetMove
- snippet_options_text_align (via web_editor)
- snippet_options_width (via web_editor)
- snippet_options_block_align (via web_editor)
- BodyWidth (based on ContainerWidth but only for the mailing's body)
- minHeight
- so_snippet_addition
- so_content_addition
- sizing_x
- vAlignment

Styles and selectors were adapted to the specifics of `mass_mailing`.

task-2554899

X-original-commit: e5e1d4255ab416581b2ef7159c0c28540528771c
Part-of: odoo/odoo#77724
Co-authored-by: Antoine Guenet <age@odoo.com>
Co-authored-by: Elisabeth Dickinson <edi@odoo.com>
2021-10-04 15:31:07 +00:00