Commit Graph
5 Commits
Author SHA1 Message Date
Romain Derie af320bad34 [IMP] website: make code snippet more obvious to edit
Some (most?) people keep trying to double click on it to edit it.
The wording was not helping as "Replace this" doesn't really tell the
user how to do it. He actually has to click on the "Edit" button on the
right panel.

Personal experience, the first times I tried that code snippet, I didn't
find that button and it took me a few times before understanding how it
works.

The new wording and the shortcut button to edit it should be more clear.
Another idea was to allow dblclick to enter edit mode, but this seems
overkill and the 2 improvements here should be enough to make it easy to
figure.

Also added a comment about the `&#10` and one-liner, it is far from
obvious when reading the code..

task-2978786

closes odoo/odoo#99922

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-09-16 19:17:02 +02:00
Romeo Fragomeli 1fcd098af5 [REF] *: BS5: migration
Automated change made by a lot of RegEx to change all think that is
possible to automate.

https://getbootstrap.com/docs/5.1/migration

Task ID: 2766483

Part-of: odoo/odoo#95450
2022-07-07 13:30:24 +02:00
qsm-odoo 6a7064ed0b [FIX] website: allow height control over inline embed code snippets
The embed code snippet (introduced at [1]) comes with a default
"half-screen" min-height. Since [2] (patched with [3]), the min-height
option is not shown anymore for snippets which are dropped in other
snippets ("inline" snippets)... and [4] actually made the embed code
snippet an "inline" one later on. The problem is that once dropped as
an "inline" one, the embed code snippet had thus a "half-screen"
min-height which was impossible to remove.

This commit patches the snippet so that it does not use a default
"half-screen" min-height but default paddings which work both as
"main" and "inline" snippets. The user can still use the min-height
option by himself if he wants to.

[1]: https://github.com/odoo/odoo/commit/2cc481d1a62202ade4c1ca8f846c962f9f2cc34d
[2]: https://github.com/odoo/odoo/commit/58503a248e7ab6b66d61d00869cdae6719e5a068
[3]: https://github.com/odoo/odoo/commit/bebb45e6d5e8224f2d534d5644b9af45fea903b1
[4]: https://github.com/odoo/odoo/commit/6336d1ba35f36733958cab48c1d90b6e3c0505d2

opw-2870772

closes odoo/odoo#93515

X-original-commit: 16da89de212cf82b465658afb05739d59a08d364
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-06-14 18:26:35 +02: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
Benoit Socias 2cc481d1a6 [IMP] website: support a snippet to embed custom code
Before this commit there no general purpose snippet to embed HTML code
in the page.

After this commit there is a new Embed Code snippet that allows the user
to include any HTML within the page.

task-2517473

closes odoo/odoo#68019

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-05-28 12:37:49 +00:00