Commit Graph
463 Commits
Author SHA1 Message Date
Benjamin Vray bfec4e2ca4 [FIX] website: fix ripple effect on buttons
Before this commit, the "ripple effect" no longer worked because the
assets were never activated for the following reason:

- To activate the ripple effect assets via the editor options, we
activated a template that no longer exists (with
data-customize-website-views). Instead of activating the assets with the
new system of assets using records.

After this commit, a new "data-customize-website-assets" xml attribute
was created so that the assets can enable/disable in the same way as the
views. The "write" method for ir.asset has also been overridden in
website so that each website has its specific assets (via COW).

task-2686370

closes odoo/odoo#81833

X-original-commit: 9f56357cc1f4a7b8606ef4d5fd431fc396bdf1e8
Related: odoo/design-themes#546
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-12-23 15:07:06 +00:00
50abe8947a [FIX] website: prepare cover dataset upon color selection
Before this commit the cover dataset was only updated during updateUI()
but if the cover was saved before closing the color palette after
selecting a solid color, the selected color was not confirmed and the
saved cover dataset was based on the previously selected color.

After this commit the cover dataset is updated whenever an option is
selected to handle the specific "save before close color palette" case.

task-2678100

closes odoo/odoo#81835

X-original-commit: ad59cbd33e0eaf5c7c77f9e5c0b0435917e2c155
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Benoit Socias <bso@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2021-12-23 14:14:57 +00:00
qsm-odoo f7ad4ff8ec [IMP] web_editor, website: review s_popup drop-in selector
The final forward-port work merged in master at [1] should have been
adapted to avoid the JS "hack".

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

closes odoo/odoo#81699

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-12-20 19:16:55 +00:00
Arthur Detroux (ard) 583f7ceb2d [IMP] website, web_editor: provide clarity for theme colors
Prior to this commit, the color presets generated by the color palette
would always be visible by the user which could lead to confusion.
Most users would click on the presets and edit them instead of editing
the color palette.

This commit groups the presets into a collapsed section under the color
palette to incentivize the user to click on the color bubbles instead.

task-2687469

closes odoo/odoo#79921

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-12-17 16:57:57 +00:00
Younn Olivierandqsm-odoo 073e63b824 [FIX] website: improve mega menus editability
This commit adds the possibility to modify some background colors of the
mega menus so that the templates are fully editable.

Some of these templates have a column with an extended background, using
the :before css pseudo element.
As this is not a DOM element, it cannot be changed from javascript.
It was decided that using shapes would not produce the same effect as
the designer intended, and that it would be too confusing for the user
to be provided with an option allowing to extend the background of a
column.
Therefore, these specific s_mega_menu_gray_area elements must have their
background hardcoded.

task-2668908

X-original-commit: f01c74118ad4c772fb18866956ab9fb214f781fa
Part-of: odoo/odoo#81559
Co-authored-by: qsm-odoo <qsm@odoo.com>
2021-12-17 09:18:14 +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
Younn OlivierandMatthieu Stockbauer aba31e9f2d [IMP] web_editor, website: add connector options to steps snippet
A new option StepsConnector is added to the steps snippets, allowing to
pick the type of the steps connector and its color.

The option listens to changes in the UI or in the columns size to
recompute the width and position of the arrows.
The width of the connector is computed based on the widths of the
current step and the next step, which are defined in bootstrap columns.

The s_process_steps snippet CSS version is now 001.

task-2463009

closes odoo/odoo#77282

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Matthieu Stockbauer <tsm@odoo.com>
2021-11-18 16:00:40 +00:00
Patrick Hoste b5c87d86ca [IMP] website(_event): replace old event snippet by new dynamic one
PURPOSE

Replace the old event snippet which was a simple template with a
javascript file doing a rpc by a new one directly inherited by the
dynamic snippet.
The old snippet was displaying a list of the upcoming events based
on the user's localization. With this commit, it will be completely
replaced by the new snippet. The migration will convert the old
snippets to avoid versioning and keeping ugly code.
The new snippet allows the user to set multiples tags to display
only the wanted events on the website.

LINKS

Task-2489680
PR : odoo/odoo#68644

Related: odoo/upgrade#2406
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-11-17 13:05:53 +00:00
Tom De Caluwé 4fd5fd4a97 [FIX] web_editor, website: fix removal of last item inside active slides
A bug currently makes the carousel snippet collapse/disappear when its
active contents are removed. This happens because after the removal,
the carousel no longer has an active item.

The solution that was chosen was to not allow the removal of slides
unless using the dedicated option which is there for that. This solution
has the advantage to also allow users to create empty slides (using a
background image for example) by simply removing the columns inside.

Note: Newly created carousels will include the oe_unremovable class on
their slides. As such they will no longer depend on isEmptyAndRemovable
checking them for having a carousel-item class on the parent.

task-2506165

closes odoo/odoo#79892

X-original-commit: 0cf36a227e7b90fb64b1bc8024de813894d10d14
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-11-16 19:21:14 +00:00
fde251330d [FIX] website: fix sharers of share snippet
The whatsapp sharer was fixed via [1]. This uses https for all sharers
and fix the pinterest one using the logo image with their new API.

[1]: https://github.com/odoo/odoo/commit/62575b75ff48a34df23f8742737226949f13c13c

closes odoo/odoo#79891

X-original-commit: 45497060d9185e7fddb3fc6fcfcbcb81040c8d8b
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: jpr-odoo <jpr@openerp.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2021-11-16 18:39:20 +00:00
jpr-odooanddwa-odoo f2bace6518 [IMP] website: add min & max option for chart axis value
This commit introduces min & max input options for the chart values of
the axis. It will be visible only for the line and bar chart.

- When min and max values are same, we fix this by changing the min
  value to zero and multiply provided value by 2 to set max value.

- When min value greater than max value, we swap the values.

- When the min value is given and the max value is not:
    - If the min value is smaller than greatest value of the chart, then
      the max value is set to the greatest value of the chart.
    - Otherwise, the given minimum value is used as maximum value and
      the minimum is set to 0.

- When only the max value is given then the minimum value is set to 0.

task-2250766

closes odoo/odoo#52221

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: dwa-odoo <dwa@odoo.com>
2021-11-15 14:27:06 +00: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
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
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
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
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
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
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
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 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 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
Cocographique 78875e0bc2 [IMP] website: adapt default content of Tabs snippet
Customisations made by the themes for the Text-Block
snippet were also applied in the Tabs snippet.
And so, options like paddings and background-color
generated unexpected and potentially broken layouts.

closes odoo/odoo#77479

X-original-commit: 3e046fdc8edf630919ec7d6b753100100cb78f05
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-09-30 10:38:40 +00:00
Sébastien Mottet (oms) 433f6c2758 [FIX] website, web_editor: prevent mega menu removal
The user was able to remove the mega menu snippet without removing
the corresponding link in the menu. To avoid this flow to happen
we removed the delete button for the mega menu snippet. We also
handle the case where the user remove the mega menu snippet element
by element. On last element removal we put back the original template.

task-2636545

closes odoo/odoo#77256

X-original-commit: 97810a9c40396bb27cb5779937734849d185cf1f
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-09-28 09:29:09 +00:00
e91beddac0 [IMP] website: add ability to conditionally show form fields
Allow the user to create forms whose fields can have a conditional
visibility, meaning that the field is only visible if another field in
the form meets certain conditions.

The previous hidden checkbox is replaced by a select with 3 options
(visible, hidden, visible only if).

task-2431285

closes odoo/odoo#77255

X-original-commit: 2dcbfecf3c10687a2cd3af36335d5be70c904fce
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Arthur Detroux (ard) <ard@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2021-09-28 09:29:03 +00:00
qsm-odoo 48092fcf85 [IMP] web_editor, *: add a generic class for large editor widgets
*: website, website_payment, website_sale

Instead of having a "o_we_large_input" class, now to have large widget, we can
use the generic "o_we_large" class (a future update is needing that for a non-
input widget).

task-2431285

X-original-commit: a8446e5d0f0b10f99f8174c012a6a53e2134b77a
Part-of: odoo/odoo#77255
2021-09-28 09:29:02 +00:00
qsm-odoo 5b6fc08304 [FIX] website: disable animation possibility on some columns
The possibility to animate colummns instead of main snippets was
recently added. It should however have targeted mains columns that the
user can manipulate and resize instead of structural columns used in
some snippets (form, team, ...).

X-original-commit: 3dc2255819b87fa1094bfe07dcd1e2365becd757
Part-of: odoo/odoo#77255
2021-09-28 09:29:02 +00:00
Kamen Zhekov 63209575ee [IMP] website_sale: add choice for default sort type in website editor
It is impossible to define the default order in which to display
products in the shop page. The order can be changed through the
"Sort By" dropdown, but it is reset every time the page is refreshed.

There is now an option in the website editor that allows setting a
default sorting method that is applied when displaying products.
It is overridden by the setting from the "Sort By" dropdown if
there is a different sorting method selected.

task-2616245

closes odoo/odoo#76512

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-09-22 12:22:40 +00:00
qsm-odoo d03903ab00 [FIX] website: properly translate mega menu template labels
Missing translations introduced with [1].

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

closes odoo/odoo#76883

X-original-commit: f810703ae51a41a273d749e88309d1cf8caaca71
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-09-21 09:38:26 +00:00
Sébastien Mottet (oms) 59e4bb6526 [FIX] website, web_editor: fix wrong indentation and comment
Fix wrong indentation and comment introduced by commit https://github.com/odoo/odoo/commit/a57cda43c3b097b49baa2fc2a394494bbb01419a

task-2636545

X-original-commit: 0a589389860a9c1f18eae5cbd90a1ba3e85f5dfc
Part-of: odoo/odoo#76883
2021-09-21 09:38:26 +00:00
Benjamin Vray 360abc0570 [IMP] web_editor, website: make animation options available on text
After this commit, it is possible to animate text in website pages.

task-2545252

closes odoo/odoo#76610

X-original-commit: 187acb938f70a2130d25fa76079221339c742f1e
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-09-16 10:01:06 +00:00
Benjamin Vray a04ce99689 [IMP] website: add a zoom-out animation in website animate
task-2545252

X-original-commit: b1e15473f024c569e6a8f44ba8805467f484fb05
Part-of: odoo/odoo#76610
2021-09-16 10:01:06 +00:00
Benjamin Vray 146070db7c [IMP] website: make the columns animable instead of the whole section
-Instead of having animate options on whole section, make it available
on a column.
-Rename "Disable animation" into "No Animation".

task-2545252

X-original-commit: 9a4d4d1527c004f4157d6c039acdd99f8d7e8231
Part-of: odoo/odoo#76610
2021-09-16 10:01:05 +00:00
Younn Olivier e4fbe5ab14 [IMP] website: add logged in param for conditional visibility
This commits adds to the existing conditional visibility option
introduced in [1], the option to display or hide blocs to a user,
depending on if he's logged in or not.

A select widget was added as an alternative to the many2one widgets that
were currently used, as we don't need to connect to the database to
display logged in/logged out option.

[1]: 1c442782f8

task-2618946

closes odoo/odoo#76609

X-original-commit: a42634f8cef57dce0a6a5a09408c3f5823fc647a
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-09-16 01:22:30 +00:00
Younn Olivier 096a6e72a9 [FIX] website: only display website languages for conditional visibility
The languages displayed for the ConditionalVisibility option are now the
ones available for the website.
The select widget is hidden if there is only one.

task-2629245

closes odoo/odoo#76537

X-original-commit: 380edf50bd1d8d1f7b1a33fd4fa1ad70dbc12804
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-09-15 09:02:16 +00:00
qsm-odoo 7ffff1d6a3 [FIX] website: restore pricelist snippet options
Commit [1] did a shameless copy-paste of a <template> definition to
define the new masonry snippet options... forgetting to rename the xml
ID. This ends up with two website.s_product_catalog_options views
since [2], the second one overriding the first one.

Thanks to @bvr-odoo for spotting the issue.

[1]: https://github.com/odoo/odoo/commit/c90ab7b6646b603dcd0a49387b5eeba60ce17f59
[2]: https://github.com/odoo/odoo/commit/c90ab7b6646b603dcd0a49387b5eeba60ce17f59#diff-2a1ab0acc5a21712b0cd75d3f8d89815505f8341571bc3ab28c0c07bf549ceb2R253

closes odoo/odoo#76038

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-09-06 16:52:51 +00:00
qsm-odoo 6854ff8026 [IMP] website: add no-hamburger-in-mobile option
At the same time, review the whole "hamburger type" option to be more
clear for the user. Unfortunately, the whole "no-hamburger-in-mobile"
option is kinda going against the way our editor works right now so this
commit implements it with well-placed hacks... to improve somehow at
some point.

Part of https://github.com/odoo/odoo/pull/68149
task-2368576

closes odoo/odoo#68149

Related: odoo/design-themes#11
Related: odoo/upgrade#2294
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-09-03 14:29:52 +00:00
qsm-odoo ff26771e9c [IMP] website: rearrange the logo option in header
Part of https://github.com/odoo/odoo/pull/68149
task-2368576

Part-of: odoo/odoo#68149
2021-09-03 14:29:51 +00:00
Oussama MESSAOUDIandqsm-odoo 7e8ba9bc2f [IMP] website, *: review the header templates + add CTA as an option
*: portal, website_sale, website_sale_wishlist

Part of https://github.com/odoo/odoo/pull/68149
task-2368576

Part-of: odoo/odoo#68149
Co-authored-by: qsm-odoo <qsm@odoo.com>
2021-09-03 14:29:51 +00:00
Benoit Socias 7559626c54 [IMP] website, *: make a generic search bar snippet available
(*: website_blog, website_event, website_forum, website_sale,
website_slides)

Before this commit the search bar was specific to products.

After this commit a generic search bar is available as a general feature
of website which can be configured to inspect specific models.
The snippet is used to replace the old search bar in blog, courses,
event, forum, page and shop.
The search results of these pages and the autocomplete of the search bar
run through the same search mechanism.
A new hybrid results page has also been created as a target of a search
on "Everything".

In each involved module, `website._search_get_details()` is implemented
to return search metadata for every model related to the `search_type`
parameter.
Search metadata for a single model is returned by `_search_get_detail()`
on that specific model.

The autocomplete runs through the additional
`website._search_render_results()` pre-rendering step that prepares the
data to fit in the autocomplete template.

task-2379555
https://github.com/odoo/odoo/pull/65871

Part-of: odoo/odoo#65871
2021-09-03 06:59:33 +00:00
Benjamin Vray 5ffce116a6 [IMP] website_payment, *: new snippet make a donation
*=  website, website_sale, web_editor

This commit add a new snippet donation for the website builder.

PR-63133

task-2398403

Part-of: odoo/odoo#63133
2021-09-03 02:03:14 +00:00
Younn Olivier 7a96557b83 [FIX] website: fix animate options for dropdowns
The WebsiteAnimate option was triggering a resize on the window in its
start method, which would lead to a scroll on the wrapwrap and closing
the megamenu dropdown if it was open. Besides that, animations were not
working when selected on a section in a dropdown menu.

Now, an open dropdown that has animated content is considered as the
scrolling element so that its animations are rendered correctly and it
is not closed because of a scroll elsewhere.

The "Launch animation at first time/always" option is hidden for
dropdowns as bootstrap will launch it anytime a dropdown is open.

Part of https://github.com/odoo/odoo/pull/71143
task-2502208

closes odoo/odoo#71143

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-09-02 14:14:52 +00:00
Younn Olivier 56b70e16db [IMP] website: prevent dropping snippets in mega menus
This prevents dropping main snippets in the mega menus, but it is still
possible to move the elements inside it or drop inline snippets.

Part of https://github.com/odoo/odoo/pull/71143
task-2502208

Part-of: odoo/odoo#71143
2021-09-02 14:14:52 +00:00
Younn Olivier a57cda43c3 [IMP] website, *: use widgets to display mega menu templates
*: web_editor

The masonry templates selection SnippetOption has been abstracted so
that mega menus content can also be replaced with template content.

Part of https://github.com/odoo/odoo/pull/71143
task-2502208

Part-of: odoo/odoo#71143
2021-09-02 14:14:50 +00:00
63a3ba4a42 [IMP] website: add mega menu snippets
New mega menus :
- s_mega_menu_big_icons_subtitles
- s_mega_menu_cards
- s_mega_menu_images_subtitles
- s_mega_menu_little_icons
- s_mega_menu_menus_logos
- s_mega_menu_odoo_menu
- s_mega_menu_thumbnails

Part of https://github.com/odoo/odoo/pull/71143
task-2502208

Part-of: odoo/odoo#71143
Co-authored-by: Younn Olivier <yol@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2021-09-02 14:14:50 +00:00
qsm-odoo 014446f84b [FIX] web_editor, website: combine dataset "image" and "img" keys
Commit [1] introduced a new "image" option instead of fixing the "img"
option which already existed. Also it created a <img> tag with a "fa-fw"
class which does not make much sense. Also, our system with data-img
actually creates a <svg> tag so that the color of the icon is the one
decided in our SCSS instead of the one hardcoded in the image and so
that there is an hover effect.

[1]: https://github.com/odoo/odoo/commit/02ccad3200187724d5f133842032981fb91f7465

closes odoo/odoo#75743

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-08-31 10:01:20 +00:00
Philémon van Helden 02ccad3200 [IMP] web_editor, website: replace light bulb with palette
In master, in the 'Theme' tab of the website editor, the button to edit
color schemes has a light bulb icon, which doesn't clearly represent what
it does.

In this commit, we replace it with a palette SVG. Since we-select
elements do not have an image option implemented, we also add one
for future usage.

task-2618494

closes odoo/odoo#75730

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-08-30 10:59:16 +00:00
Philémon van Helden 6336d1ba35 [IMP] website: allow embed code snippet to be dropped as a child
In master, the embed code snippet can only be dropped as a sibling.

In this commit, we allow dropping it as a child, by giving it the same
options as the countdown snippet.

task-2618494

Part-of: odoo/odoo#75730
2021-08-30 10:59:15 +00:00
Jeremy Kersten ef531afe39 [IMP] website(_sale): allow to force numberOfRecord for dynamic snippet
Now you can specify into the dynamic_filter_template the number of record to
use for desktop, mobile, and the number of record to fetch.

Some template have only sense to be shown with 1 record e.g. a full width.

Syntax:
Add on root element one or more of these attributes:
  data-number-of-elements="2"  -> number of record on Desktop
  data-number-of-elements-sm="2" -> number of record on Mobile
  data-number-of-elements-fetch="2" -> number of record to fetch

closes odoo/odoo#75662

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-08-27 18:46:15 +00:00
c90ab7b664 [IMP] website: add templates for masonry snippet
Add an option in the masonry snippet's allowing to choose among multiple
templates for the snippet layout. The usability of the snippet also has
been reviewed (restrict the ability to control background on deeper
boxes). Also reviewed the bg-200 use on boxes and replaced them with
a preset as otherwise it seems buggy to not be able to remove the
bg-200 by selecting a preset (other than hitting the trash icon in the
colorpicker).

Part of https://github.com/odoo/odoo/pull/67361
task-2463033

closes odoo/odoo#67361

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: smottet <oms@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2021-08-23 12:20:17 +00:00