Commit Graph
3222 Commits
Author SHA1 Message Date
Romain Derie 2c8c079c05 [FIX] http_routing, website: prevent crash when using fw in url
Before this commit, the routing map generated and used would be the one from
the website the request is performed, instead of the one from the `fw` website
ID which will be the one we redirect the user to.

This issue was introduced with the routing map by website, be8fc2296b and is
restricted to a single case: a publisher using the website switcher, and it
won't happen on next page naviguation/refresh as the `fw` website id will be
the same as the current website's ID. Thus there won't be any routing map
mismatch.

Step to reproduce:
  - Create a page on website 2, set it as homepage
  - Naviguate to website 1 on '/' url
  - Naviguate to website 2 on '/' url
This will raise a werkzeug error about `EndPoint not iterable`.

----- Technical analysis ------

This is the current flow:
1. `_dispatch()` is setting `website_routing` to `get_current_website()` -> 2
2. `_dispatch()` is calling `_match()`
3. `_match()` is calling `routing_map()` with key = `website_routing`, which
   was set to 2 in step 1.
4. `routing_map()` is calling `_generate_routing_rules()` which generate the
   rules based on `website_routing`, which was set to 2 in step 1.
5. `_dispatch()` authenticate the user by calling `_authenticate()`
6. `_dispatch()` is calling `_add_dispatch_parameter()`, where URL param `fw`
   is forced in session, so `get_current_website()` now return the correct
   `website_id` -> 1

The issue: in order to handle the `fw` URL parameter (step 6.), we need to
check the rights to ensure we can allow the website switch.
To check rights, user need to be authenticated (step 5.), which is done after
generating the routing map (2. & 3. & 4.).
The routing map is generated based on the current website (step 1.)

Step 6 depends of steps 5 which depends of steps 2/3/4 which depend of step 1,
but step 1 should depend of step 6, which is an impossible cycle.

closes odoo/odoo#70397

X-original-commit: 4eb26497a774e934d7e1a6be9f505400fd9e2cdb
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2021-05-05 11:01:15 +00:00
Jorge Pinna PuissantandSamuel Degueldre f43a0814ae [IMP]*: configuration of ESLint for specific files
This commit will add the needed ESLint configurations on the JS files.
These configurations are added if the JS file uses a different
environment (serviceworker, node, etc) or if it uses a specific global
(google, ace, etc).

Co-authored-by: Samuel Degueldre <sad@odoo.com>
2021-05-04 13:32:49 +00:00
Arthur Detroux (ard) a7ee7f7cb4 [FIX] website: hide cookie bar when entering edit mode
Previously :
Once a user enabled the cookie bar, it prevented him from dropping
snippets in the main area of the page because the focus was on
the cookie bar. Dropping snippets there has a confusing behavior and
might make the user think the editor is broken.

Reason :
The cookie bar has an oe_structure class and takes over the body
if it's not hidden or dismissed. The oe_structure allows to drop
snippets.

Fix :
Hiding the cookie bar when user enters edit mode to avoid dropping
snippets in it by mistake.

task-2477430

closes odoo/odoo#70258

X-original-commit: 8c672662c80d0dfaeb06eedfc7136a68734fbdb3
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-05-03 12:43:09 +00:00
qsm-odoo 215ae8cadb [FIX] web_editor, *: remove some post new editor dead code
*: website, website_event

Remove some dead code introduced by the new editor merge at [1].

[1]: https://github.com/odoo/odoo/commit/499e8860f194a7eb09a2e224b713a362923d77ac

closes odoo/odoo#70257

X-original-commit: 0a890a353dd89a60fd156f4280d069596b199cc7
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-05-03 12:36:35 +00:00
Sébastien Mottet (oms) 094c94fcd3 [IMP] website: change some wordings in configurator features screen
Some feature descriptions and titles have been reworded.
A sentence has been added below the title to indicate
that choices made on this screen are not definitive.

Task ID: 2451965

closes odoo/odoo#70252

X-original-commit: 63195ba03ccc1bf40b4682fc7c9aa4a1a55f1e43
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Sébastien Mottet <smottet@users.noreply.github.com>
2021-05-03 11:40:09 +00:00
Samuel DegueldreandTom De Caluwé 2cfb8658bf [FIX] web_editor: fix default shapes not reacting to palette changes
Previously, when toggling on background shapes, they always had the
default colours. In [1] we made it so that when you toggle on a shape on
a section, it would automatically reuse the colors of the surrounding
shapes if any.

Unfortunately, when the "implicit" colors were also the default colors,
they were still marked on the shape, and it got an explicit background
image that would no longer react to changes in the palette.

This was caused by the fact that the call to _getDefaultColors returns
an empty object when the section doesn't already have a shape-container,
this was not a problem before since we were not passing in any colors
when creating the initial shape previously, the the aforementioned
change made it so that we did.

This commit fixes the issue by creating the shape-container before
calling the method that will set the colors on the shape, this way
getDefaultColors works as expected, and the colors are not marked on the
section when they are the default ones, restoring the ability of the
shape colors to adapt to the palette

[1]: https://github.com/odoo/odoo/commit/875aca63f7dab287c61485ebe999b3b8dd89d91c

task-2500607

closes odoo/odoo#70054

X-original-commit: 63acc2b0d1957dedd40af2033722f9ea4ef2e597
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Tom De Caluwé <tdc@odoo.com>
2021-05-03 09:27:44 +00:00
Antoine Guenet db420f14e9 [FIX] web_editor, website: ensure editor toolbar doesn't hide dropdowns
A colorpicker in an option positioned above the toolbar in a snippets
menu would be hidden by the toolbar because of the toolbar's z-index.

That z-index is only needed when the editor is in a modal.

The bug this commit fixes only arises when the toolbar is in a snippets
menu.

This applies the z-index only when there is a snippets menu in the page.
To accomplish that we need the "editor_has_snippets" class that the
website module applied to the body. For the sake of harmony within Odoo,
that class is now applied by snippets.editor so that no matter the
module, if there is a snippets bar, the class is on the body of its
document.

closes odoo/odoo#69680

X-original-commit: b1aa9c6093cea918337d5600ff9b16b7dd80de23
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-04-22 12:02:31 +00:00
Gorash aa47eda087 [IMP] web: add mode qweb in ace
Add a new parser in the ace for the qweb highlight. This makes it possible
to visualize the qweb tags and the part of code.
Used in the website and in xml fields.

closes odoo/odoo#69609

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-04-21 12:15:01 +00:00
Benjamin Vray 079b9556c6 [FIX] website: fix top position of modal
Before this commit, the top position of a modal in website was always
the height of the main menu navbar. Even if the main menu navbar was
not displayed when the user is not logged.

That bug was introduced in 6ef622772f

After this commit, the top position of a modal is the height of the
main menu navbar but only if that navbar is displayed.

task-2507949

closes odoo/odoo#69391

X-original-commit: 00ab01d05b3876c5d926e16b9a5d65ace4df7360
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-04-19 13:01:46 +00:00
Sébastien Mottet (oms) 61aa892686 [FIX] website: make configurator IAP call failures silent
On initialization, the website configurator makes a
call to an external service (api_website) hosted on
iap-services.odoo.com to retrieve a list of industries.
This call might fail if the external service is done.
This potential failure is now correctly handled:

On '/api/website/1/configurator/industries' call
failure, the configurator is silently skipped and the
user is redirected to the view website.theme_view_kanban

closes odoo/odoo#69465

X-original-commit: 35311608197ec77bafed82505639314ca693fb19
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-04-19 11:30:49 +00:00
Antoine Guenet 138c0ce67e [FIX] website: properly focus an editable zone with a placeholder
closes odoo/odoo#69330

X-original-commit: f355f0ea276a39674842700bc5f22b2a7cbe5790
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-04-15 14:57:00 +00:00
Romain Derie 86cf231bf1 [FIX] web_editor, website: restore link popover behaviors
This commit fixes multiple bugs related to the new link popover edition [1].
Those bugs mostly comes from new editor integration [2] conflicts, as those
where merged almost at the same time and needed a quick fix of rebase
conflicts.

- The navbar & footer link would not load the popover link edition anymore,
  as it was only targetting `#wrap`.
- Double click on links was re-introduced but it was supposed to be gone.
- Tooltip from Edit and Unlink inside the popover remained open after popover
  was closed.
- Some leftover code that were not related to popover but kept during the
  rebase.

[1] Commit 8fcf930a6b
[2] Commit 740168ce8d

closes odoo/odoo#69389

X-original-commit: e13966cc8e04111a9e18a344132546c6baa79fea
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2021-04-16 11:28:52 +00:00
Sébastien Mottet (oms) f4eed6547a [IMP] website: configurator changes and adaptations to iap module
The following two points are necessary adaptations for
the correct functioning of the configurator with the
module deployed on iap-services.

- The routes of the api_website module deployed on
iap-services.odoo.com use model converters to retrieve
the industry selected by the user. The configurator
has been updated accordingly. We now use industry id
instead of industry name. Using id instead of name make
record retrieval faster and model converters handle
exception if the record doesn't exist.

- 'homepage' is now added to the requested pages by
the client. Previously, this page was added by the iap
module to the requested pages.

The following two points are changes to the configurator
route handling:

- multilang=False has been added to the route rendering
the configurator in order to avoid having the lang in
the url.

- If no step is specified in the url, the implicit step
is 1. Therefore /website/configurator/1 has been changed
to /website/configurator.

closes odoo/odoo#69370

X-original-commit: b6efa4caf6514484c254869cb2f1965d207e7c65
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Sébastien Mottet <smottet@users.noreply.github.com>
2021-04-16 09:02:09 +00:00
Antoine Guenet fef5c6eff7 [ADD] website: tour adding a megamenu item to top menu
closes odoo/odoo#69223

X-original-commit: 480986ad21b0df4e1ca63bd6e5ef97c6d7f7bf29
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-04-14 08:28:05 +00:00
Antoine Guenet 46ff93fdab [FIX] website, web_editor: properly init and save new menu entries
X-original-commit: 31063c117a46cb77efe9e4d2ad3d8bd19940dc2f
2021-04-14 08:28:05 +00:00
qsm-odoo 6a5a47ee82 [FIX] website: restore scroll effects in custom code
The website scroll effects using the `AnimationEffect` Odoo API were not
working anymore if custom code enforces the html element as the
scrolling element. Indeed in that case the scroll event handlers were
now attached to the html element itself while it needs to be the window
in that case.

This may be something to fix at the source (the `getScrollingElement`
method). This will be checked later.

closes odoo/odoo#69087

X-original-commit: 21650ce342d0329c5385acf1181be154abbec550
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-04-10 16:54:12 +00:00
Sébastien Geelen (sge) 92d0713478 [IMP] web_editor, mass_mailing: activate undo/redo button in mail edition
closes odoo/odoo#68912

X-original-commit: 2b12674fcfdebf362e5bd806bc8374d82c30de82
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-04-07 15:44:43 +00:00
Romain Derie b1b516eb97 [FIX] website: fix wrong string interpolation
Without this, the website selector was not working

closes odoo/odoo#68877

X-original-commit: 967132be52d259eaa89b7c0d32b8e4a116d4ad9e
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-04-07 10:25:29 +00:00
Younn Olivier f6786a9fe6 [FIX] website: add loader when installing a new module from frontend
The eCommerce module installation is sometimes taking over 30 seconds,
to manage the user wait a loader is now displayed during the
process.

Part of https://github.com/odoo/odoo/pull/68823
task-2446852

X-original-commit: 9a75b8cc09b3210e0a555f225ac347801b584d3a
2021-04-06 17:50:18 +00:00
Younn Olivier 04824fc8ec [FIX] website: decrease moving blocks speed by 35%
When moving blocks up and down, the speed has been decreased by 35%, as
it was too fast for the user before.

Part of https://github.com/odoo/odoo/pull/68823
task-2446852

X-original-commit: cbbaa74fe15efd19e0614d984247995af9a64247
2021-04-06 17:50:18 +00:00
Younn Olivier e901b29c99 [FIX] website: fix share snippet icons vertical alignment
Icons were not centered in the share snippet.

Part of https://github.com/odoo/odoo/pull/68823
task-2446852

X-original-commit: 6b2a6b3d6730b320f673ee544b2be607a258f914
2021-04-06 17:50:17 +00:00
Oussama MESSAOUDIandqsm-odoo b3240f1a4e [FIX] website: properly retrieve gray parameters from gray values
- Retrieve the correct value for hue and extra-saturation parameters.
- Dynamically set the max, min value of the extra-saturation slider.

Linked PR: https://github.com/odoo/odoo/pull/66428

Part of https://github.com/odoo/odoo/pull/68488

closes odoo/odoo#68849

X-original-commit: 9f5b9dd3a9659283708a32885b49618364798cac
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2021-04-06 17:49:33 +00:00
Sébastien Mottet (oms) e8a5af2e28 [IMP] website: configurator for automatic website generation
On website app  installation and on new website creation a configurator is launched.
The purpose of this configurator is to generate a website that meet the user's needs.

The configurator is composed of 4 steps:

1) Business description: the user is asked to describe its need with its website purpose (dropdown), its industry (autocomplete search) and its objective (dropdown).

2) Logo and palette selection: the user must select a color palette for its website. He can also upload its logo. In this case color palettes recommendations are generated based on the logo's colors.

3) Features selection: the user select the pages and applications he needs.

4) Theme selection: three themes are recommended to the user based on its industry. This screen display a preview of these three themes.

task-id: 2451965
ENT PR: odoo/enterprise#16949
UPG PR: odoo/upgrade#2316

closes odoo/odoo#67537

Signed-off-by: Sébastien Mottet <smottet@users.noreply.github.com>
2021-04-02 13:04:03 +00:00
qsm-odoo 179fe1e4a6 [FIX] web_editor, website: solve broken link popover test
- The test was clicking on a link "too soon" in some cases (editing a
  link then immediatly clicking on it while the save action is not fully
  performed). Ideally, this should probably be more robust around the
  save action to first edit the link synchronously then perform the
  actual save in DB but this can be checked later on.

- Removed useless popover update while it was hidden.

- Make sure that two consecutive update of the popover only updates its
  UI relying on the last asked data.

- Make sure the popover correctly clean what it did once destroyed
  (however, it is never actually destroyed for now... to check later).

closes odoo/odoo#68686

Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2021-04-02 09:19:44 +00:00
740168ce8d [REF] web_editor, website_*, mass_mailing: adapt to Odoo Editor
Co-authored-by: David Monjoie <dmo@odoo.com>
Co-authored-by: Antoine Guenet <age@odoo.com>
Co-authored-by: Nicolas Bayet <nby@odoo.com>
Co-authored-by: Sébastien Geelen <sge@odoo.com>
Co-authored-by: Emilien Durieu <edu@odoo.com>
2021-04-01 16:01:06 +00:00
27166ff9df [REM] web_editor, website: remove Summernote wysiwyg rte library
Co-authored-by: David Monjoie <dmo@odoo.com>
Co-authored-by: Antoine Guenet <age@odoo.com>
Co-authored-by: Nicolas Bayet <nby@odoo.com>
Co-authored-by: Sébastien Geelen <sge@odoo.com>
Co-authored-by: Emilien Durieu <edu@odoo.com>
2021-04-01 12:49:47 +00:00
Romain Derie 8fcf930a6b [IMP] web_editor, website, *: introduce popover as edit system for links
*: website_form

This commit introduces a simple & light popover/tooltip (as in Google Doc) when
editing a link.

It will be used:
1. (web_editor) On every page links.
2. (website) In the website navbar, when clicking on a menu, it will replace the
popup shown to ask the user what he wants to do (edit the menu or go to the link
or do nothing). That popup was a bit invasive and old-fashioned.

Part of https://github.com/odoo/odoo/pull/64756
task-2439860

closes odoo/odoo#64756

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-04-01 09:49:45 +00:00
Romain Derie fe67b34f1a [IMP] website: keep dropdown open when clicked in navbar on edit mode
Before this commit, when a menu inside a dropdown was clicked, the dropdown
would close itself, making the menu impossible to be edited.
That was not really an issue as those menu could still be edited through the
menu editor dialog.

That behavior was already prevented for mega menu in order to be able to edit
them.

This commit adds the same behavior to regular dropdown menu. It is mandatory
for the following commit adding a popover on menu to edit them instead of the
dialog.

Part of https://github.com/odoo/odoo/pull/64756
task-2439860
2021-04-01 09:49:45 +00:00
Benoit Socias a64e76e90a [FIX] website: disable preview on dynamic snippet filter selection
Before this commit filter selection on the dynamic snippet did trigger
the rendering of a preview. This sometimes caused a blocking loader to
appear when the filter selection triggered the replacement of the list
of available templates.

After this commit selecting a filter does not trigger a preview
rendering anymore.
Also the condition for making the warning message appear is now about
the selected template being in the list of available templates.

https://github.com/odoo/odoo/pull/68529
2021-03-30 13:53:54 +00:00
Benoit Socias 3c0d98bcd8 [IMP] website_blog: add a blog snippet that relies on snippet filters
Before this commit the latest posts snippet implemented the lookup for
its templates and its rendering procedure.

After this commit a new blog posts snippet is introduced which relies on
the dynamic snippet mechanisms.

task-2477207
https://github.com/odoo/odoo/pull/67334
2021-03-29 14:27:58 +00:00
Benoit Socias 3355dc1623 [REF] website, website_sale: support recently viewed in product snippet
Before this commit the recently viewed products were handled differently
from the dynamic product snippet.

After this commit the dynamic product snippet supports the functionality
of the recently viewed products snippet:
- its template used to show each product
- its filter of displayed products
- its "Add to cart" feature (with the animation)
- its "Forget" feature (only applicable when viewing recently viewed)
Also added "Accessories" and "Recently Sold With" filterings.

Several kinds of filtering can be combined.
- Products can be restricted to a given category
  - Pseudo categories for all products or current category can be used
- Products can be restricted to matching names
- Products can be obtained from one of the following:
  - Newest
  - Latest sold: ordered by descending frequency in last 8 orders
  - Latest viewed
  - Accessories (of the current product)
  - Recently sold with (the current product)
Accessories and recently sold with are only available in product pages.

Also, generic templates have been considered useless and the whole
mechanism allowing them has been removed (this includes the
pre-rendering mechanism for the fields specified in the filter).

task-2453416
https://github.com/odoo/odoo/pull/65554
2021-03-26 15:41:44 +00:00
Romain Derie 7cdf04df67 [IMP] website: add qweb view to see view hierarchy
The core website behavior is the COW (copy on write) which makes it possible to
handle multiple websites on a single database.

When you do a CRUD operation on an `ir.ui.view` in a website context, the ORM
normal behavior is bypass to perform special stuff, such as:
  - Write: if the view is generic (no `website_id`), we bifurcate the write on
           the specific view (same `key` but with `website_id` set). If that
           view doesn't exist, we create it and fork its whole descending
           hierarchy. This write behavior is known as COW.
  - Create: we ensure that view is created only for the website and no other.
            Basically we just add a `website_id` to that view, but it might
            also be about setting the correct `inherit_id` by finding the
            specific view among multiple views with the same `key`.
  - Unlink: if the view is generic, we will unlink that view but also create a
            copy of that view for every other websites so they remain
            unmodified: this is known as COU (copy on unlink).

All those behavior aims to satisfy to the multi website holy grail:
 -- Any modification in a website context should never impact another website --

Because of those uncommon behaviors, it is sometimes hard to understand or
investigate a database, as views might be copied, up to the point where there
is multiple whole view hierarchies.

This commit attempts to create an user interface to easily figure what's going
on in a database at an `ir.ui.view` level.
The mains advantages of that new `ir.ui.view` Qweb view is to:
  - easily figure which views are COW'd on which website
  - easily detect which views have a real `arch` modification
  - easily see that `arch` change

Closes #63040

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-03-26 15:29:42 +00:00
Sébastien Mottet (oms) 2323af4451 [REF] website, *: centralize color palettes in website
*: web_editor

All theme specific color palettes have been moved into website.
It allows to access them without having to install theme modules and
this is a preparation for our website configuration screen task.

Lists of palettes have been replaced by maps with palette names as keys.
Those names are composed of the palette's original theme name ('generic'
or 'base' for palettes not specific to a theme) and of an index
(ex: 'anelusia-2'), for compatibility.
To keep compatibility with previous version we also convert old color
palettes number to color palette name, specifically for each theme.

A side effect of this change is that we got rid of all gray palettes
which existed in some themes. Those were not fitting the new possibility
of gray customization in the third panel and were not always really a
good customization of the default grays (they still were there mainly
for historical purposes). Unfortunately, this may have some side effect
for old websites which used those grays but the new gray palettes (left
to the default one) should most of the time come as an improvement of
the old ones, and they are now customizable by the user. In the future,
we may associate a perfectly-chosen default gray palette, fitting the
customization system, for each color palette.

PR: https://github.com/odoo/odoo/pull/67488
task-2451965

closes odoo/odoo#67488

Related: odoo/design-themes#455
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-03-26 11:31:17 +00:00
qsm-odoo e08184103c [IMP] website: add technical improvement for gray customization
Improvement of [1]. Allows to not have to save the gray-hue and
gray-extra-saturation server-side at all, and thus better allow to use
a fully customized gray palette in theme should a theme need it.

[1]: https://github.com/odoo/odoo/commit/35d27a6c1d3dab621de7f059565d7619ae004412

Merged with https://github.com/odoo/odoo/pull/67488
2021-03-26 11:31:17 +00:00
Benoit Socias 20433b9796 [IMP] website: make maps available without configuration
Before this commit displaying a map on the website required the use of
the Google Maps snippet which requires to configure an API key.

After this commit displaying a map on the website can also be done with
a simpler Maps snippet which requires no configuration.

task-2464422

closes odoo/odoo#66766

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-03-25 15:43:21 +00:00
Oussama MESSAOUDIandqsm-odoo 35d27a6c1d [IMP] website, *: control hue and saturation of grays
*: web_editor

The purpose of this commit is to control the hue and the saturation of
the gray palette.

task-2362091

closes odoo/odoo#66428

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2021-03-24 17:36:14 +00:00
Jeremy Kersten 86e3c1a5e0 [FIX] website: improve logo svg
Without this 'XML declaration', if you have magic installed, the mime type
is image/svg instead of image/svg+xml and browser don't render it.

This commit is related to #68211 meanwhile a more generic solution (if needed).

closes odoo/odoo#68239

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-03-23 13:13:23 +00:00
Oussama MESSAOUDI 91703b9ff5 [IMP] website, *: improve the UI of the mobile visibility option
*: web_editor

Adding the option to show/hide on mobile at snippet level + review the
UI (now a top action button).

task-2431659

closes odoo/odoo#65013

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-03-23 10:15:24 +00:00
Carlos Valverde da6c19acd0 [IMP] website: replace the default website logo
Previous default website logo of the 'website' module ('YourLogo' 
image) looked like a text and not like a proper logo, so it has been 
replaced by a more stylised, gray-coloured, version, as a svg.

--

task-2448746

closes odoo/odoo#68075

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-03-18 12:34:54 +00:00
Samuel Degueldre 7e1ba0de41 [FIX] web, web_editor, website: fix incorrectly translated template literals
closes odoo/odoo#68105

X-original-commit: e1d280880c26d6139dc6a3679fb7df7e07defdd6
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2021-03-18 16:05:37 +00:00
Benjamin Vray 86a1b78f99 [FIX] website, website_sale: fix right corner ribbon
Before this commit, when ribbon was at the right corner of a product
card, this ribbon hid the buttons in list view.

After this commit, in list view, we place the ribbon on the left to
avoid this bug. There was no better solution to fix this in stable.

task-2466120

closes odoo/odoo#67898

X-original-commit: dcddf2125652b03bf4bff385c074fef0b2096f1d
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-03-15 18:19:44 +00:00
Younn Olivier 9bbe5be3fb [IMP] web_editor, *: display handles overlay only when needed
*: website

When declaring a SnippetOption, it is now possible to specify if the
display of the handles overlay should be visible on the snippet element.

By default, it is set to false, and if the selected snippet element does
not have any option that require the handles to be displayed, we will
display them on the first parent element that needs the handles to be
displayed.

In the context of an image, the handles will be displayed on the parent
column, as the image does not have an option that require the handles.

Part of https://github.com/odoo/odoo/pull/66550
task-2431684

closes odoo/odoo#66550

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-03-12 10:16:14 +00:00
Younn Olivier f3ccc91d42 [IMP] website, web_editor: add an icon to replace images in edition
From the editor, when clicking on an image there is a new refresh icon
next to the delete icon that will open the media dialog to allow for its
replacement.

Part of https://github.com/odoo/odoo/pull/66550
task-2431684
2021-03-12 10:16:04 +00:00
Younn Olivier 7332d37c68 [FIX] website: fix image gallery slider index
The gallery slider index was wrongly calculated when the gallery had no
active element, as the jquery method .index() will still return -1 when
no element is found.

task-2472041

closes odoo/odoo#67563

X-original-commit: 666fc3697bd7d70cfa0dd92f0a401b771196bb27
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-03-10 15:50:37 +00:00
Younn Olivier 4366d17794 [FIX] website: fix fullscreen indication pointer events
As the container div of the fullscreen indication stays on the page to
be displayed, it was obstructing the click events of the elements it was
displayed on. The user could not access what was on top of the screen.

The solution was to remove pointer events for that div so that it
doesn't interfere with other elements on the page.

Related to https://github.com/odoo/odoo/pull/65255

closes odoo/odoo#67589

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-03-10 12:49:29 +00:00
qsm-odooandOussama MESSAOUDI 43232259bf [FIX] website: restore mobile visibility snippet option
Conflict between a fix in 14.0 (see [1]) and an improvement in master
(see [2]) broke the feature (because both introducing a JS option for
the feature).

[1]: https://github.com/odoo/odoo/commit/9463f0f889f9dd8da6077895c125da4998a933c0
[2]: https://github.com/odoo/odoo/commit/25173a4c29b57a01cbe415de439f2da0f4760507

closes odoo/odoo#67555

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Oussama MESSAOUDI <ome@odoo.com>
2021-03-09 16:28:23 +00:00
xO-Tx 90b1b1b1b0 [IMP] website: make images wall editable
The goal of this commit is to make the Images Wall/Gallery snippet
editable to be able to open the media dialog on "double-click"
on images.

Part of https://github.com/odoo/odoo/pull/66544
task-2326573
2021-03-09 11:02:36 +00:00
xO-Tx b1e48c8dd2 [IMP] web_editor, *: update multi image selection layout
*: website

The goal of this commit is to improve multi image selection
(Image Wall, Gallery...) using the same layout as in selected themes
for selected images.

Part of https://github.com/odoo/odoo/pull/66544
task-2326573
2021-03-09 11:02:14 +00:00
Younn Olivier dfcc9a3ce0 [IMP] website: show indication to the user that he can exit full screen
Behaviour before the PR is merged :
There is no indication that the user can exit fullscreen by
pressing on escape.

Desired behaviour after PR is merged :
An indication is shown to the user after he enters fullscreen,
which disappear after a few seconds. A new widget
FullscreenIndication is available.

Part of https://github.com/odoo/odoo/pull/65255

task-2438556

closes odoo/odoo#65255

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-03-08 16:25:14 +00:00
Younn Olivier eddf8971cf [IMP] website, website_sale: change labels of new content
When adding a new product, 'Product Name' is displayed
instead of 'Name', and 'Create' instead of 'Continue' for every type of
new content added.

Part of https://github.com/odoo/odoo/pull/65255

task-2438556
2021-03-08 16:23:55 +00:00