Commit Graph
6854 Commits
Author SHA1 Message Date
qsm-odoo 95ca988113 [FIX] website: fix video loading
task-2376327
2021-07-16 11:26:38 +02:00
Xavier Morel b51b094c2b [IMP] http: avoid cycle on request 2021-01-26 09:05:35 +01:00
Benjamin Vray f534d20674 [FIX] web_editor, *: fix active class disappearing on tabs snippet
* = website

Before this commit, the active class of the tabs snippet buttons
disappeared when leaving the edition of the buttons.

After this commit, it is no longer possible to enable link options for
the buttons of the tabs snippet and accordion snippet. Being able to
customize these buttons introduces too many bugs and is not really
necessary.

task-2656662

closes odoo/odoo#79190

X-original-commit: 7f33cdcd14ef753cc5bf823bfc1de0d2431e285a
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-10-29 12:39:58 +00:00
Romain Derie f51a53e6ee [FIX] website: avoid calling external services during test
`s_map` snippet is calling maps.google.com which might be the reason this tour
experience some race condition when trying to drag and drop the
`s_newsletter_subscribe_form` (which happen after the `s_map` snippet was
dropped).

When the race condition happen, we can see on the screenshot that the snippet
was drag & dropped into the footer instead of the `s_text_image` inside the
`#wrap` as it should be (see comment on first step of the test).
The reason the snippet is not dropped where it should be is because the `s_map`
was not removed as it should have been (seeing the screenshot), so the page was
scrolled and the footer became the first available and visible `o_editable`.

The `s_map` snippet is probably still in the DOM (despite a step is in charge
of removing it) because it is recreated after the google maps server reply,
which sometimes is probably taking an unexpected long time.

Anyway, external services should never be called during tests, removing the
snippet from the tour is an "easy" first step to try to fix the race
condition.

closes odoo/odoo#79120

X-original-commit: 37c9ae2c3b228e5abbe5bdb84df2c381d9f2fcb3
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2021-10-28 10:05:33 +00:00
Guillaume (gdi) e55d2839a6 [FIX] website: add default color combination to mega menus
Set the background color of mega menus to the first color combination
by default. This ensures that the mega menu is not transparent by
default (important for master where the dropdown will be transparent to
allow transparent mega menus) but mainly ensures that inner components
(links, buttons, titles, etc) use a visible color as otherwise they use
the *header* combination colors which may not work with the default
white background dropdown.

task-2623335

closes odoo/odoo#79094

X-original-commit: 967d21a8d0dd8c79be1fe0a2d2ec3a6edbb389ca
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-10-27 19:23:42 +00:00
xO-Tx 04f09503b2 [FIX] web, website: fix initAutoMoreMenu on user navbar
The current code in 'initAutoMoreMenu' doesn't work properly
on navbar after the update on dropdown in [1]. Small tweaks
were added in this commit to fix that.

[1]: 84715436d87bb05b421bc9ccaacda67d07571690

task-2618929

X-original-commit: 29b9280c44534d2f210dbcea83e0049365949f48
Part-of: odoo/odoo#78959
2021-10-26 07:48:00 +00:00
Kamen Zhekov 3739d74afe [IMP] website - add noindex when not browsing configured domain
Description of the issue/feature this PR addresses:
Currently, search engines index a SAAS-hosted website twice
(once for the actual domain, and once for the .odoo.com domain)
which is something that should be preventable.

Desired behavior after PR is merged:
If a domain name is configured, and the website is accessed
through a different domain than the configured one, the noindex
tag appears, preventing crawlers from indexing it..

task-2418904

closes odoo/odoo#78425

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2021-10-21 16:54:43 +00:00
Romain Derie 7d8a8ddea0 [IMP] website(_forum/_profile): remove _get_http_domain method
Before Odoo saas-14.4, one should call `_get_http_domain()` on website to get
its domain. Indeed, that method was in charge of cleaning that domain, as it
was done with commit [1].

Since Odoo saas-14.4, that cleaning is automatically performed on domain before
saving it into database, thanks to commit [2].

Thus, we can now remove the `_get_http_domain()` and use directly the domain as
it is considered clean.

Note that migrated databases coming from version older than Odoo saas-14.4
could still have an incorrect domain (trailing slash, no scheme..).
This will be handled during migration with [3].

[1]: https://github.com/odoo/odoo/commit/3ad775aab717b395a5d11527aeb3596af66afa99
[2]: https://github.com/odoo/odoo/commit/042c95b0219bb0aa13e73385e092fa76ff1a1b0a
[3]: https://github.com/odoo/upgrade/pull/2951

closes odoo/odoo#78766

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-10-21 15:47:22 +00:00
Tom De Caluwé f81f2a124c [IMP] website: prevent clicking while starting the editor
When visiting a page with enable_editor set to true, the web editor
will be automatically started. However, while the editor is loading,
the end user can still click other buttons in the navbar.

For example, some changes in the web editor require a save and reload
of the current page being edited. After saving, the same page will be
reloaded with enable_editor.

This commit blocks any clicks while the editor is being loaded.

task-2607755

closes odoo/odoo#78721

X-original-commit: 89bdfcd16828e1432900ea46118fd6ddadf96f2d
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-10-21 09:56:47 +00:00
Benjamin Vray 9dd8f06117 [FIX] website: prevent scroll button editing
Before this commit, it was possible to edit scroll buttons with the
editor toolbar.

task-2656662

closes odoo/odoo#78637

X-original-commit: ca5a36323900a27896761ed12c002d22b6c6cf53
Related: odoo/design-themes#523
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-10-19 15:59:07 +00:00
Barad Mahendra 281b65a943 [FIX] web,*_*: fix the html content in notification
Currently markup-ification of the legacy notifications system
display the html content in notification layout for some of the
notification of document and planning from commit: https://github.com/odoo/enterprise/commit/ba44461fea337ed2e5adbdfa1e8eede00b036def

So here in this commit, we make the method `makeLegacyNotificationService`
always `_.escape(message)` and pass `messageIsHtml: true` to the owl
notifications system so notification with html content will be displayed
properly.

Task-2657391

closes odoo/odoo#78627

X-original-commit: 7ce6d8d70be79c9c626865598b898dce9a18b045
Related: odoo/enterprise#21782
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-10-19 14:43:42 +00:00
Kishan Gajjar b2f170156a [FIX] website: restore icons for 'Big Icons Subtitles' snippet
closes #78507

closes odoo/odoo#78548

X-original-commit: 593efcf99a6aa2b18364786a807d9ec9b3c7e72f
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-10-18 12:46:02 +00:00
Benjamin Vray 34c401caf8 [FIX] website: fix save animated snippet
Before this commit, when dropping custom snippet (or saved snippet)
containing an animation in the page, the animated element of the
snippet remained hidden.

task-2664876

closes odoo/odoo#78493

X-original-commit: 61d7744ca988641bd4d8a4006350ec197eece25a
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-10-18 10:21:58 +00:00
Benjamin Vray 2e57d784d3 [FIX] website, web_editor: fix overlay options of the timeline snippet
Before this commit, the CSS of the overlay option buttons of the
timeline snippet was broken.

task-2648348

closes odoo/odoo#78491

X-original-commit: 13770d650def3107378fe4010aac48dc85a5256a
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-10-18 10:21:49 +00:00
Younn Olivier 46c0bf7827 [FIX] website, mass_mailing: remove composed css classes
Recently, [1] broke the style of a few snippets, because it was adding a
:not selector to the parent css class, that was used to define children
classes that were adding a suffix to the parent class name with the &
symbol.

It was decided that every snippet css class should be explicitly
declared to avoid breaking the style when adding selectors to the parent
class. This will also prevent breaking the style when adding a new css
version for the snippet.

task-2660921

[1]: https://github.com/odoo/odoo/pull/77312

closes odoo/odoo#78413

X-original-commit: af6785599358d2dcb9ff811afc2e558a94d9704d
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-10-15 16:13:47 +00:00
qsm-odoo 05765de195 [FIX] website: properly re-show the header when scrolling to the top
Sometimes, when using the "standard affixed" header effect, when
scrolling to the top, the header was kept hidden and left a blank space.

This happened in fact systematically when scrolling to the top very
fast. Indeed, in that case, the code went through the header update
only once and was not able to go from state 3 (page scrolled header
visible) to state 1 (page not scrolled header visible) without going
through state 2 (page scrolled header invisible) and you thus ended
with a mix of state 1 and 2: page not scrolled and header invisible).

Closes https://github.com/odoo/odoo/issues/71449

closes odoo/odoo#78268

X-original-commit: 20648ef2134672587c25fd3c7c79ed3825728b38
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-10-13 10:02:38 +00:00
Sébastien Mottet (oms) 667a00a029 [FIX] website: use base-1 as default palette for configurator
When using the configurator the user can upload its logo to
generate a color palette. In this case we select the base-1
palette as default palette instead of the theme's default palette.
Doing so avoids the potential customizations the theme palette
may introduces.

task-2665885

closes odoo/odoo#78251

X-original-commit: 50019c8f68b89968615f87c365095c94caeef46c
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-10-13 08:41:06 +00:00
Arthur (ard) 9b47e248de [FIX] website: prevent snippet drop in product_catalog
Before this commit, a user would be able to drop pretty much any
snippet inside the product_catalog (pricelist) snippet.
This was not ideal as the snippet wasn't designed to receive
any other snippets inside of it.

With this commit, the configuration of the snippet is closer
to snippets such as timeline, allowing lines to be moved around
without allowing snippets to be dropped inside it.

task-2655171

closes odoo/odoo#78185

X-original-commit: 086bef8ffaff29a12836a36baed6cfb0ffea7da0
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-10-12 14:11:43 +00:00
Jeremy Kersten 05dd2169a6 [FIX] website: allow to disable cache page based on content
In some case, we know that page will contains dynamic content and that cache
should be ignored.

E.g. as soon as a s_snippet_form will be present in page, we know that we need
the real csrf, and so we cannot use the cached response from another user.

Now, we disable the cache (cache_time=0)

closes odoo/odoo#77935

X-original-commit: 262499a91cc9f2365cf2ff131796d9b61b438f9b
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-10-12 11:44:44 +00:00
Romain Derie 3b0ac62a75 [IMP] website: add missing depends on is_mega_menu compute
closes odoo/odoo#78065

X-original-commit: 278a6e6c68675ad1ae820ef0a5e38407d5594e8f
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2021-10-08 16:09:27 +00:00
Romain Derie 1490557016 [FIX] http_routing: hide the traceback by default on error 500 page
Before this commit, the error 500 page would always shows the full traceback
even if it is supposed to only show it in debug mode (or if editable).

That behavior was probably broken by the debug refactoring [1], which
introduced side effect with [2] (see template `http_error` which was moved with
[3]).

[1]: https://github.com/odoo/odoo/commit/d7cd97a9be63ae0a8643400b56d6f9a03285fba6
[2]: https://github.com/odoo/odoo/commit/24a20cd3fb00657da44d10a7a7d89cf94bdbdd83
[3]: https://github.com/odoo/odoo/commit/423402f1e50000186924186beba0cbe87e02e774

X-original-commit: 0d4e3001de81cc04cc6cc805edd75de19ce0255d
Part-of: odoo/odoo#78065
2021-10-08 16:09:27 +00:00
Tom De Caluwé 6b89bf62be [IMP] website: finish a text edit step in a tour when clicked
The idea of a text edit step is considered clearly communicated to the
end user from the moment the trigger is clicked ( as opposed to the
step waiting for actual input from the end user). This way an end user
can finish the tour faster without actually having prepared custom text
content yet.

task-2580338

closes odoo/odoo#77720

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2021-10-08 16:08:48 +00:00
Victor Feyens ab022ec12d [FIX] *: target v15.0 documentation with doc links
X-original-commit: acc95ec204baa1dddbe292c379a1768fe1deccbf
Part-of: odoo/odoo#77923
2021-10-07 17:59:52 +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
Tom De Caluwé 3c09208b7f [FIX] website: allow disabling themes with custom layout headers
Some themes replace the website.template_header_default template in the
website layout. This poses a problem when changing to another theme
afterwards because of the interaction between the website templates and
the _reset_default_config method:

1) Since version 15.0 the nav tag inside the header templates was
abstracted into a separate template (website.navbar) and added to each
header layout through t-call.

2) The _reset_default_config deactivates or reactivates views that were
enabled or disabled by the currently active theme. However, when doing
so, the default header is activated before the custom header is
deactivated.

As a consequence, after toggling the default header, there are
temporarily two header extensions in the website.layout template. They
both replace the //header//nav element. Because of the abstraction of
the nav element into a separate template by the header extensions, only
the first replacement will work.

task-2662497

closes odoo/odoo#77917

X-original-commit: b83a2110fd3035cc8466c4fa74f6530be5d00597
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-10-06 16:24:48 +00:00
Martin Trigaux e132c36ee6 [I18N] *: export 15.0 source terms
closes odoo/odoo#77898

X-original-commit: ad5afb1d18661784bfcf51bca66e576de1f6c49b
Related: odoo/enterprise#21478
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-10-05 16:54:21 +00:00
Romain Derie de0308e87f [FIX] web: remove the command palette from the frontend
There is multiple issue with the palette in the frontend:

First, the command palette is bound to CTRL+K, which need to be bound to link
creation as this is an universal keybind, as CTRL+P CTRL+F are, as any other
edition app in the world does.
(Note that link creation is not only for edit mode but also for end user, eg
forum post)
History of the keybind:
1. Command palette was introduced with CTRL+K
2. The keybind was changed to CTRL+M to restore CTRL+K for link edition, see
   8727ed2766
3. The keybind change was reverted and command back to CTRL+K, as CTRL+M can't
   be used on MAC

Second, the command palette do not correctly work in the frontend, the menu are
not opened when an entry is selected, and the submenu are not shown in the palette
when the menu was opened before opening the palette.

Lastly, the CTRL+K in frontend does not only open the command palette but it
also create a link in the background of the palette being opened.. which
result in very bad usability..
The one expecting a link has to deal with a palette.
The one expecting a palette has had a link created without really noticing it.

task-2659885

closes odoo/odoo#77879

X-original-commit: 6135b04738a58564592f438364f5a147ce9c471f
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2021-10-05 15:41:46 +00:00
Younn Olivier 1b4f640a92 [FIX] website: remove translation for technical fields
task-2629245

closes odoo/odoo#77873

X-original-commit: 472256c8539602a7bb2e81b389faf050b4d0785d
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-10-05 15:41:28 +00:00
Younn Olivier 67ee284918 [FIX] website: keep focus on snippet when changing visibility
Triggering the event 'snippet_option_visibility_update' with show
parameter set to false would deactivate the snippet.

task-2629245

X-original-commit: a8d1c162ebfc8d8f80794d3a1e57008c575b3963
Part-of: odoo/odoo#77873
2021-10-05 15:41:27 +00:00
xO-Txandqsm-odoo dd55d6376c [FIX] website, *: fix content/design of header templates
*: web_editor, website_sale_wishlist

The goal of this commit is to fix the issues with the header templates
and their related options. Such as:

- Alignment of inline language selector
- Alignment of CTA / Template content
- Add missing CTA in some templates
- Bugs with off-canvas hamburger menu

Unfortunately, it will require more work to make everything perfect.

task-2636546

closes odoo/odoo#77862

X-original-commit: 2a000e33c5a44ddf0a777b43d8266cc413d8e4e2
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2021-10-05 14:18:01 +00:00
xO-Tx f5f59eab9c [FIX] website: fix magazine header template
The goal of this commit is to fix some UI issues on magazine
template:

1- Responsive collapsing (navbar should not expand on
   magazine template).
2- Center top header structure on mobile.
3- Missing CTA on magazine template.

task-2636546

X-original-commit: 094146856640c2765d238919a1f85288262f2ad0
Part-of: odoo/odoo#77862
2021-10-05 14:18:00 +00:00
qsm-odoo 0efc4276fe [FIX] website: properly show selected header links style
Since [1], method names of user value widgets are sorted alphabetically
to ensure consistency. This broke widgets using both the
customizeWebsiteVariable and customizeWebsiteViews methods as the
non-alphabetical order is unfortunately the right one there.

Until a better system is implemented, this fix simply switch those two
methods order specifically.

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

X-original-commit: 4ee47afb3709862c6ecd8e19e7aa7db5016e528e
Part-of: odoo/odoo#77862
2021-10-05 14:18:00 +00:00
stefanorigano (SRI) 27604376a9 [IMP] web_editor, website: improve "palettes-chooser" dropdown design
This commit reviews the component design in order to match the
"Configurator" one.

As a result, 'color-4' and 'color-5' are hidden in the palette-chooser
while remaining visible/editable once the palette is active.

This commit will also reorder color fields in the sidebar and in the
colopicker in order to match both the palette-preview & CC-list colors
order.

Beside design consistency, another reason behind these changes goes back
to the initial stages of the color system introduced with v14.

At the very beginning the system was designed to handle 3 custom colors
+ "locked" black and white.
Being able to edit black and white sounded interesting at that time;
as a result 'color-4' and 'color-5' have been introduced in the
system.

Despite being a powerful tool for designers and pro-users, the edition
of these color has been proven to be tricky an potentially unsafe.

Together with new default palettes that standardize 'color-4' and
'color-5' to safe values, hiding these color from the list simplify
the palette selection process and aims, implicitly, to communicate to
"normal" users that these colors are "not part of the palette", while
somehow related.

task-2656337

closes odoo/odoo#77857

X-original-commit: 02aba326710523bf210644e9038198059db1672c
Related: odoo/design-themes#514
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-10-05 14:17:48 +00:00
stefanorigano (SRI) 0d5244e4d1 [IMP] website: improve default palettes
Prior to this commit default palettes were picked from the general
library in an attempt to provide as much variety as possible.

Unfortunately they didn't cover the entire primary colors spectrum and
some were "challenging" to customize (eg. mild-tone colors barely
readable in certain circumstances).

This commit defines new safest palettes that cover a wider range of
primary colors (ref. ~2 palettes for each column in this page
https://getbootstrap.com/docs/5.0/customize/color/#all-colors).

task-2656337

X-original-commit: 405e5470d2f950877d22420462c2e14922f77c35
Part-of: odoo/odoo#77857
2021-10-05 14:17:48 +00:00
stefanorigano (SRI) 48b87b4c7f [FIX] website: limit palettes number proposed by the ui
Prior to this commit the entire palettes library (139 entries) was
rendered into the "Theme" tab palettes dropdown.

The final result was overwhelming, especially considering that palettes
were not ordered by color. Moreover, since palettes have been designed
to provide variety within themes, a lot of them appeared very similar
(if not exact clones) when compared in the context of a general library.

This commit keeps palettes' definitions to avoid breaking
pre-existing DBs design, but will propose the user the "configurator"
ones (+ the 2 system ones) only.

Themes can eventually inject a preferred palette in the list in order to
match screenshoot and "pre-configurator" demo content.

This commit also removes the previous prefix-based ordering system, now
obsolete. Indeed several themes use palettes defined by other themes,
invalidating the prefix mechanism.

task-2656337

X-original-commit: 9ff9417d1d5ccb85e0d0751acc8de5faced30236
Part-of: odoo/odoo#77857
2021-10-05 14:17:47 +00:00
stefanorigano (SRI)andqsm-odoo 67bd29fb0f [FIX] website: fix o_footer_scrolltop default color definition
This commit fix a minor issue caused by the assumption that 'copyright'
block colors would have been always defined by default.

Indeed with a48a30f we introduced the possibility to have "transparent"
copyright blocks, invalidating `$-copyright-color`computation when
palettes don't specify a color.

This commit also handles the case of transparent footer, mixing with the
body color.

task-2656337

X-original-commit: 1b9fac8de08f042561a14b9b6ee5ae51b277705d
Part-of: odoo/odoo#77857
Co-authored-by: qsm-odoo <qsm@odoo.com>
2021-10-05 14:17:47 +00:00
qsm-odoo a177593572 [FIX] web_editor: restore column count snippet option
When decreasing the number of columns through the column count snippet
option, the editor entered a deadlock situation.

This reverts [1] which is the cause, trying to await the UI update
during a snippet removal. This commit first prevents the deadlock while
waiting for a better solution to be implemented.

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

task-2652904

closes odoo/odoo#77848

X-original-commit: ae219ec06baf0280c76ae09b1453cc1481eece30
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-10-05 14:17:18 +00:00
xO-Tx dde609a838 [IMP] web, website: remove website menu loading effect
The goal of this commit is to remove the menu fade-in effect
on page load since we can now call the initAutoMoreMenu in
non-lazy JS code.

When 'initAutoMoreMenu' called, images won't be loaded yet,
that's why we add a class: '.o_menu_image_placeholder'
to set a default size on images and once all images are loaded,
we reupdate the menu.

task-2618929

X-original-commit: 6be166df24dedbe4729e1e7bfe6a302713932b74
Part-of: odoo/odoo#77843
2021-10-05 14:17:13 +00:00
xO-Tx 92d9c84c83 [IMP] website: use initAutoMoreMenu for website menu
The goal of the 'autohideMenu' feature: instead of having the menu
items wrapped on multiple lines, they are hidden and only when we
compute how many items we can show on one line, we show the menu.

This implementation was fine in old versions when we did not have
the lazy loading of the JS yet.

The goal of this commit is to replace 'initAutoMoreMenu' by code
that can be called from a non-lazy loaded JS file so it will be
possible to remove fade-in effect from it.

task-2618929

X-original-commit: 7affc29c9b3fc85c27c10d0b8ba600ebdaf311ac
Part-of: odoo/odoo#77843
2021-10-05 14:17:13 +00:00
xO-Tx 898d181c7f [MOV] *: move initAutoMoreMenu to a non-lazy loaded file
*: web, website

task-2618929

X-original-commit: 0a031fca52e92ce052522446b0c1751aac5dc572
Part-of: odoo/odoo#77843
2021-10-05 14:17:12 +00:00
xO-Tx 0de634965a [REF] web, website: rewrite initAutoMoreMenu method
The goal of this commit is to make initAutoMoreMenu fully
non-jquery and totally independant of other odoo utils.

task-2618929

X-original-commit: 7be1bb9083c786064fa140c811952e7735ce5539
Part-of: odoo/odoo#77843
2021-10-05 14:17:12 +00:00
Sébastien Mottet (oms) aaef93c017 [FIX] website: keep configurator images on theme switch
On theme switch default images of the previous theme are replaced
by the one of the new theme. For website where default images
come from the configurator we don't want them to be replaced by
the theme's images.

task-2614840

closes odoo/odoo#77648

X-original-commit: c25f80c70930f65a928b44d4fe91775c37bc4268
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-10-05 12:35:56 +00:00
Julien Banken fbedc9c0b9 [IMP] website: improve the visitor kanban card of the website module
On the page 'Visitors' page of the website module (backend), the cards
can be miss-aligned on small screen size. To improve the responsiveness
of the cards, we will use the `col` and `col-*` classes of Bootstrap
with some specific breakpoints (e.g. `col-sm-*`, `col-lg-*`, etc). We
will also use flex display to reduce the number of custom css rules.

task-2524363

closes odoo/odoo#73355

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-10-05 12:35:52 +00:00
Guillaume ClemensandTom De Caluwé bb6379e4f9 [IMP] website: add accordion styles
This commit adds new classes and options to the accordion snippet in
order to add new styles and allow switching the side where the collapse
status icon floats to.

task-2457232

closes odoo/odoo#69543

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Tom De Caluwé <tdc@odoo.com>
2021-10-04 18:38:43 +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
Elisabeth Dickinson 62f766b36c [FIX] website: stop website snippets CSS from affecting mailing snippets
CSS from website's snippets was affecting snippets in mass_mailing with
the same class. To counteract this, we adapted the selector to exclude
mailing snippets.

task-2554899

X-original-commit: 40348e9c314bb1211b8a49690311733abcb4ada6
Part-of: odoo/odoo#77724
2021-10-04 15:31:10 +00:00
Antoine Guenet a9d4603b37 [ADD] mass_mailing: temporarily restore removed templates
This commit is there to be reverted in master. It temporarily restores
templates previously removed so as not to break migrations.

- 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

task-2554899

X-original-commit: d49b1942d33a222ac9159e76f7931cb89a85016f
Part-of: odoo/odoo#77724
2021-10-04 15:31:10 +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
b63ee52552 [FIX] *: remove scss 'extend' from dropdown components
This commit removes all the 'extend' initially introduced to avoid code
repetition and ensure visual consistency across Bootstrap and Owl dropdowns.

Despite achieving the desired results, using 'extend' in this context
was seriously impacting the bundle generation time, probably due to an
underestimated amount of Apps' legacy-code applied on these elements.

In order to achieve the same results, the chosen strategy is to add
Bootstrap default classes directly into Owl dropdowns.
Also, it moves code related to bootstrap dropdown in 'webclient.scss',
leaving 'core/dropdown/dropdown.scss' for Owl code only.

Due to the discrepancies between Bootstrap and Owl html
structure, the '.dropdown-item' class could not have been added
directly to Owl's '.o_dropdown_item' itself, without refactoring
the Dropdown component structure.

// ==== Bootstrap 4.6 default Structure ================================
<div class="dropdown-menu">
  <button class="dropdown-item" type="button">Action</button>
  <a class="dropdown-item" href="#">Another action</a>
</div>

// ==== OWL default Structure before this commit =======================
<ul class="o_dropdown_menu">
  <li class="o_dropdown_item">
     <span>Action</span>
  </li>
  <li class="o_dropdown_item">
     <a href="#">Another action</a>
  </li>
</ul>

// ==== OWL Structure after this commit ================================
<div class="o-dropdown--menu dropdown-menu">
  <span class="dropdown-item">Action</span>
  <a class="dropdown-item" href="#">Another action</a>
</div>

// ==== web.assets_backend.css Bundle Generation Comparison ============
With all modules installed (enterprise edition over runbot):
Before this commit, bundle took ~2.5s and ~4s to generate and weighted ~322kB (~2.5MB uncompressed)
After this commit, it takes between ~1.2s and ~1.6s and weights ~257kB (~1.6MB uncompressed)

closes odoo/odoo#77649

X-original-commit: 84715436d87bb05b421bc9ccaacda67d07571690
Related: odoo/enterprise#21370
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Co-authored-by: Stefano Rigano <sri@odoo.com>
Co-authored-by: François Georis <fge@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
2021-10-04 07:57:00 +00:00