* = 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
closesodoo/odoo#79190
X-original-commit: 7f33cdcd14ef753cc5bf823bfc1de0d2431e285a
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
`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.
closesodoo/odoo#79120
X-original-commit: 37c9ae2c3b228e5abbe5bdb84df2c381d9f2fcb3
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
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
closesodoo/odoo#79094
X-original-commit: 967d21a8d0dd8c79be1fe0a2d2ec3a6edbb389ca
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
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
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
closesodoo/odoo#78425
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
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/2951closesodoo/odoo#78766
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
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
closesodoo/odoo#78721
X-original-commit: 89bdfcd16828e1432900ea46118fd6ddadf96f2d
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, it was possible to edit scroll buttons with the
editor toolbar.
task-2656662
closesodoo/odoo#78637
X-original-commit: ca5a36323900a27896761ed12c002d22b6c6cf53
Related: odoo/design-themes#523
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
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
closesodoo/odoo#78627
X-original-commit: 7ce6d8d70be79c9c626865598b898dce9a18b045
Related: odoo/enterprise#21782
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
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
closesodoo/odoo#78493
X-original-commit: 61d7744ca988641bd4d8a4006350ec197eece25a
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, the CSS of the overlay option buttons of the
timeline snippet was broken.
task-2648348
closesodoo/odoo#78491
X-original-commit: 13770d650def3107378fe4010aac48dc85a5256a
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
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/77312closesodoo/odoo#78413
X-original-commit: af6785599358d2dcb9ff811afc2e558a94d9704d
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
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/71449closesodoo/odoo#78268
X-original-commit: 20648ef2134672587c25fd3c7c79ed3825728b38
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
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
closesodoo/odoo#78251
X-original-commit: 50019c8f68b89968615f87c365095c94caeef46c
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
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
closesodoo/odoo#78185
X-original-commit: 086bef8ffaff29a12836a36baed6cfb0ffea7da0
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
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)
closesodoo/odoo#77935
X-original-commit: 262499a91cc9f2365cf2ff131796d9b61b438f9b
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
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
closesodoo/odoo#77720
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
*: 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
closesodoo/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>
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
closesodoo/odoo#77917
X-original-commit: b83a2110fd3035cc8466c4fa74f6530be5d00597
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
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
closesodoo/odoo#77879
X-original-commit: 6135b04738a58564592f438364f5a147ce9c471f
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
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
*: 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
closesodoo/odoo#77862
X-original-commit: 2a000e33c5a44ddf0a777b43d8266cc413d8e4e2
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
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
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
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
closesodoo/odoo#77857
X-original-commit: 02aba326710523bf210644e9038198059db1672c
Related: odoo/design-themes#514
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
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
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
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>
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
closesodoo/odoo#77848
X-original-commit: ae219ec06baf0280c76ae09b1453cc1481eece30
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
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
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
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
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
closesodoo/odoo#77648
X-original-commit: c25f80c70930f65a928b44d4fe91775c37bc4268
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
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
closesodoo/odoo#73355
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
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
closesodoo/odoo#69543
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Tom De Caluwé <tdc@odoo.com>
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
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
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
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
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)
closesodoo/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>