Commit Graph
2592 Commits
Author SHA1 Message Date
qsm-odoo 721bf25543 [FIX] website: fix slideshow and styling gallery options
- When the 'square' option was selected, it was not marked as active
  with the checkbox icon.

- The slideshow speed was not marked as active correctly and the option
  was not working anymore (this was due to other improvements made to
  the gallery snippet recently that revealed the bug).

task-2070647

closes odoo/odoo#37011

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-09-17 14:34:47 +00:00
17237ff31c [IMP] website, *: allow to set background video to snippets
* web_editor

This commit adds support to set background videos to all the snippets
that already support setting background images (except on parallax
background for now).

task-1920630

closes odoo/odoo#36261

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Varun Raval <var@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2019-09-17 12:06:17 +00:00
qsm-odoo 57f92e2a8b [FIX] website_blog, *: restore blog/post cover edition
* web_editor, website

Editing the cover images or sizes was not working anymore. When it
worked, it was thanks to the 'o_dirty' class appearing magically on a
cover part... and that magic seems to be gone.

This commit fixes the problem by adding the 'o_dirty' class on all
elements whose content is changed, not only the editable ones (this is
the case for the blog cover: it is a non editable element whose bg
image can be changed).

Note: this also fixes the edition of multiple covers (of different blogs
or posts) at the same time (this could be backported in 12.0 if needed).

closes odoo/odoo#36999

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-09-17 11:15:42 +00:00
fja-odoo 6b73ab03f8 [IMP] website: add swap parameter to fonts import URL
Google fonts now support custom font displaying, which allow us to
swap the font when it is loaded. Especially useful for high latency
connections.

Ref: https://addyosmani.com/blog/google-fonts-font-display/

task-2069043

closes odoo/odoo#36696

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-09-17 08:16:18 +00:00
fja-odoo e33172e832 [IMP] website_sale, *: keep track of products viewed
*= website, website_livechat, website_rating

///// Tracking Product /////

Now when a user browse products in eCommerce, we keep track of the
products he looked at. We use the website_visitor
to store the products viewed. A cookie is added with a TTl of 30 min it
will prevent the RPC for that time. We track the page only if the
product view is tracked.

The recently viewed products are displayed as a snippet but also
with the customize option in product pages of website_sale.

Products that are in cart will not be returned as recently viewed.

It is possible to add a recently viewed product to the cart directly
from the carousel, it will not redirect to the cart. If we are on the
cart page, the product is displayed in the cart.

The Visitor page in website now references products viewed

///// Tracking Page /////

Feature to track a view was remove in: https://github.com/odoo/enterprise/pull/4834

That feature is now reintroduced and will use website_track instead of
leads to be stored.

The track field is now on the view instead of the page.

url field is added to website.track, it will store the url for pages and
views

The Visitor page in website now references urls viewed

Add some tests

task-1984575

closes odoo/odoo#35810

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-09-16 09:38:53 +00:00
Christophe Simonis 5a273e74f0 [MERGE] forward port branch saas-12.4 up to fe59754c52
closes odoo/odoo#36721

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-13 13:32:51 +00:00
qsm-odoo ee33597ec9 [IMP] website: vertically center the images in gallery slideshow
Note: the design of the whole snippet should be improved

Part of https://github.com/odoo/odoo/pull/36803
task-2070930

closes odoo/odoo#36803

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-09-12 16:31:57 +00:00
qsm-odoo d394b9f087 [REF] website: only show relevant option according to gallery mode
Refactor the whole _setActive method of the gallery snippet option and
make sure only relevant options are shown (for example, disable the
column option in slideshow mode or the interval delay for masonry mode).

Part of https://github.com/odoo/odoo/pull/36803
task-2070930
2019-09-12 16:22:56 +00:00
Kaushalya Mandaliya 710406e935 [IMP] website: UX improvements in Optimize SEO Dialog
Added cursor pointer when hovering a keyword in Related Keywords and
added relevant tooltip for the better user experience.

Renamed classes:
js_seo_keyword_suggestion -> o_seo_keyword_suggestion
js_seo_suggestion -> o_seo_suggestion

task-2070946
closes odoo/odoo#36709

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-09-12 10:58:57 +00:00
fja-odoo 0caf14a96d [FIX] website: fix nested menu creation
If the menu's parent is a newly created menu it will have a temp string
id which was failing to be parsed as an int and thus falling back on the
root menu as its parent.

This was broken by the new mega menu feature introduced with
https://github.com/odoo/odoo/commit/1345702258adbfbee0d780dc22e552395e6d1df7

task-2069365

closes odoo/odoo#36606

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-09-10 14:45:24 +00:00
qsm-odoo 53e428aa45 [REF] website: remove anchor option on columns
The anchor option was available on column so that you can target a
column which wraps on a new line in mobile... but we decided to remove
the feature as it complexify the UI.

Also fix a small bug: it was not possible to hit "save" when not
changing the anchor name of an element (an error message was displayed
to say it is already used in the page... while it is in fact used by
itself).

Part of https://github.com/odoo/odoo/pull/36515
2019-09-10 11:49:34 +00:00
qsm-odoo 092409edc1 [REF] web_editor, website: review UI labels and icons
Part of https://github.com/odoo/odoo/pull/36515
2019-09-10 11:49:34 +00:00
qsm-odoo d174ed0a83 [IMP] website, *: combine first dropzone and editor messages
* web_editor

When starting a drag and drop in the editor, a series of dropzones
appear to indicate to the user where he can drop the block being
dragged. In the website editor, when an editable structure is empty,
it is filled with a message to indicate we can drag and drop something
in there. The problem was that this message and the design that comes
with it disappeared when starting a drag and drop as it was replaced by
the editor dropzones. Now, the 2 are combined: when a dropzone appears
in an empty editable structure, the message and its design are kept and
just changes color and animation to match the one of an editor dropzone.

Part of https://github.com/odoo/odoo/pull/36515
task-2057320
2019-09-10 11:49:34 +00:00
Gorash 35829f2031 [FIX] website: the rte tour was undeterministic
The tour try to click on the language dropdown before the reloading of the
page if the server is slow.
To fix it, we avoid the reloading by the rte, and trigger the reload
in '_reload' method of editor menu who add the class 'o_wait_reload'.
We add a selector and trigger in the test to avoid undeterministic error.

closes odoo/odoo#36098

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2019-09-04 14:45:31 +00:00
Christophe Simonis 51354fadb0 [MERGE] forward port branch saas-12.3 up to 50e571acf7
closes odoo/odoo#36491

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-11 09:39:33 +00:00
Christophe Simonis 545e6d2034 [MERGE] forward port branch 12.0 up to 52f6e38cea 2019-08-30 17:20:28 +02:00
qsm-odoo 412117c2a7 [FIX] website: restore background sizing of fixed parallax backgrounds
Fixed backgrounds are disabled when using a mobile/tablet device,
which is not a big deal but, on some of them (iOS...), defining the
background as fixed breaks the background-size/position props.
So we enable this only for >= XL devices.

We may want to find a better alternative for future versions.

opw-2055073

closes odoo/odoo#36187

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-08-28 12:39:38 +00:00
Romain Derie cfbaba81c2 [FIX] website: correctly close dropdown menu on scroll
Before this commit, the code that was supposed to close the dropdown in the
navbar when scrolling was not working anymore.

Indeed, it would removes the `show` class from the `nav-item dropdown`
(dropdown menu entry) but not from the `dropdown-menu` (dropdown content).

Fixes #35320

closes odoo/odoo#36069

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-08-26 10:37:30 +00:00
Christophe Simonis b792ba7d9a [MERGE] forward port branch saas-12.3 up to 752b2553c6 2019-08-08 11:52:13 +02:00
qsm-odoo 6f2b17d259 [FIX] website: restore css loading for website elements
For some reason, with the recent changes and reverts with the editor,
some CSS ended up lazy loaded even though it was needed straight ahead
(switch, customize modal, etc).

This commit restores the assets structure that worked before. Note:
the website.edit_mode.scss file is however kept in the lazy loaded css
even though it was not like that before. The part that should not be
lazy loaded in it is moved to another file.

task-2064157

closes odoo/odoo#36368

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-09-03 15:33:10 +00:00
qsm-odooandAndrea Ulliana 1345702258 [IMP] website: add the ability to create mega menus
Allow users to create complex website menus, also known as "mega menus".
Mega menus are enabled individually via the edit menu dialog, then their
content can be customized by dragging snippets in them like any other
snippets area in edit mode.

task-1925319

closes odoo/odoo#36097

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>


Co-authored-by: Andrea Ulliana <aul@odoo.com>
2019-09-03 15:31:42 +00:00
qsm-odoo 3daed421f4 [FIX] website: restore edit menu dialog
Since saas-12.5, with recent ORM changes, writing on non-existing fields
does not trigger a warning anymore but instead crashes. This revealed
that the 12.0 "Edit Menu" dialog was doing some of that. Indeed,
depending on what was edited, we ended up writing on the 'is_homepage'
field, the 'text' field, the 'isNewWindow' field, ... which do not
exist.

This commit takes advantage of the fix to also lint the dialog code and
convert some of it to ES6.

Discovered while working on task-1925319

closes odoo/odoo#36204

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-08-29 07:24:16 +00:00
RomainLibert 6aaef4a3d9 [FIX] website: fix ctx argument
In the call to Chart.js we pass a ctx which should be a DOM element,
however we pass `null` as the ctx.

It seems that what happens is that we look for the DOM element inside
the `document` (via getElementById) but this element is not yet inserted
into the document, hence this returns `null`.

Since we already have a reference to the canvas element which should be
used as ctx, we can probably just reuse this reference

closes odoo/odoo#36072

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-08-28 11:13:18 +00:00
qsm-odoo 4f27e52cab [IMP] web_editor, *: introduce and restore new web_editor UI
* mass_mailing, note, website, website_blog, website_form,
website_mass_mailing, website_sale

This commit, unfortunately, mixes three things:

- Restoring as much as possible the scss organisation to allow styling
the web_editor UI properly.

- Fixing some bugs like a border around the page once the editor is
loaded, no ability to scroll the snippets, etc

- Introducing a whole new UI for snippet options: a left panel instead
of the old dropdown & button overlay.

Note: this commit also do some linting and ES6 convertion even though
some of it has been done in the parent commit.

Note 2: some elements that were removed are still styled in the POS apps
but this is because part of a feature was removed while leaving dead
code behind, this is handled in another PR which is to be merged
(https://github.com/odoo/odoo/pull/36136).

Part of https://github.com/odoo/odoo/pull/36068
task-1942370

closes odoo/odoo#36068

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-08-28 09:04:55 +00:00
Jeremy Kersten ed19f90992 [FIX] website: rte_translator try to try to fix
using the same trigger than l72 for the same action.

We just set the cat amount the pigeons, and hope to fix random red's runbot

closes odoo/odoo#36110

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-08-27 08:54:58 +00:00
Romain Derie 269aa59411 [IMP] http_routing, website: allow to customize the lang in URL
With this commit it is now possible to change the lang displayed in the URL.
Eg, you could use `/fr` instead of `/fr_BE`, or even a fancier `/french`.

Task-32838

Courtesy of pla@odoo.com

closes odoo/odoo#35135

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2019-08-26 16:35:19 +00:00
912996fe90 [REF] web_editor, website: adapt wysiwyg to 12.0 editor
The wysiwyg abstraction layer was introduced in saas-12.2 by
commit f2969923. Its goal was to provide an external interface
for other modules that wanted to use the editor feature such
that the editor core itself could be changed without requiring
extensive changes in the other modules.

This commit is adapting the wysiwyg interface to instantiate
the 12.0 editor below it rather than the saas-12.2 one, thus
reverting the "new editor" part of f2969923 itself.

Part of PR 35677.

Co-authored-by: Nicolas Bayet <nby@odoo.com>
Co-authored-by: Antoine Guenet <age@odoo.com>
Co-authored-by: Christophe Matthieu <chm@odoo.com>
Co-authored-by: David Monjoie <dmo@odoo.com>
2019-08-21 19:11:31 +00:00
35b61822a8 [REV] wev_editor, website: revert saas-12.2 editor
This commit reverts the saas-12.2 editor by putting back the editor
of Odoo 12.

The saas-12.2 editor was an intermediate work between the previous
editor of Odoo 12 and the new one slated for Odoo 13. It was unstable
but it was supposed to be replaced by the new editor of version 13.

However, since the new editor has been postponed to Odoo 14, the
saas-12.2 one would have been staying in Odoo 13, which would have
been a nightmare to maintain. To avoid this outcome, we chose to
put back the 12.0 editor in its place.

This has the particular advantage that Odoo 13 will share the same
bugfixes as Odoo 12 and 11 as they all run under the same core
editor, while the saas-12.2 one would have been an entirely
different beast to maintain.

This is a partial revert of f2969923.

Part of PR 35677.

Co-authored-by: Nicolas Bayet <nby@odoo.com>
Co-authored-by: Antoine Guenet <age@odoo.com>
Co-authored-by: Christophe Matthieu <chm@odoo.com>
Co-authored-by: David Monjoie <dmo@odoo.com>
2019-08-21 18:52:36 +00:00
qsm-odoo e5235747c5 [FIX] web, website: start public widgets after all lazy loadings
Bug introduced with
https://github.com/odoo/odoo/commit/1f5c9e363b6f7cb9a2770e6247536803fd13e3f0

Before this commit, the public/website root was started as soon as
the bundle it is in was lazy loaded. It then started all the registered
public widgets. The problem was that some of those may be registered
by other lazy-loaded bundles. The public root would then not start
those if those bundles were lazy-loaded with a too long delay.

This commit fixes the bug by starting the public/website root once all
known bundles are fully lazy-loaded.

closes odoo/odoo#35118

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-08-06 11:09:43 +00:00
Christophe Simonis 7d04dc1c7c [MERGE] forward port branch saas-12.2 up to 9e74730a26 2019-08-06 18:48:24 +02:00
Christophe Simonis 0fadd586fa [MERGE] forward port branch 12.0 up to ff9ddfdacc 2019-08-06 15:57:57 +02:00
qsm-odoo dc0630833b [FIX] website: prevent multi checked options in the same group
In the customize theme modal, if one option enabled views which were
a subset of the views which are enabled by another option, both options
would be checked on modal opening if all the related views were active.

This is the case for the "choose an image" and the "choose a pattern"
options: the first one enables a view which adds an image on the body
and the second one enables the same view but also another which enables
the fact that the image must be repeated.

This commit solves the issue by always selecting the option enabling
the most views among the checked options in a same set.

opw-1958395

closes odoo/odoo#35465

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-08-05 15:57:25 +00:00
sri-odoo 21d818cf53 [IMP] website: allow subtitles on empty oe_structure helpers. 2019-08-20 15:24:33 +00:00
David Beguin 6bec0e4d29 [IMP] website : add website visitors activity tracking
This commit adds the website_visitor model that will be used
to track website visitor activity (page viewed, number of visits and
more general info about the visitor (country, lang, etc..)

This model will, in later commit, be used to send chat requests
and push notification from the operators (or backend users)
directly to the visitor.

- A website_visitor is created once the visitor is requesting
a website.page that is tracked.
- A website_visitor is considered as connected if his last tracked
website_page request is within the last 5 minutes.
- The number of visits for a website_visitor is incremented
if his last tracked website_page request was at least 8 hours ago.
- A website_visitor is only handled by the system. Users cannot
create, edit or delete a website_visitor.
- A unique website_visitor is created per website.
That means that the same real person can triggers multiple visitor
creation if visits multiple websites.
This is because, for livechat purpose on later commit, for example,
the chat request can be created on the correct livecaht channel
(linked to the correct website)
- The visitor is recognized via his cookie (visitor_id). So if the visitor
flush his cookies, a new visitor will be created the next time he will
request a tracked website_page.
- Link user's res.partner to website.visitor.
    If a website_visitor log in
    (a visitor that has visitor_id in his cookie),
    the website_visitor is linked to the res.partner.
    The website visitor name is than adapted to match the name of
    the first res.partner linked to the visitor.
    A visitor can have multiple partners as the same session
    can be used by multiple person (one PC for a team for example).

To keep a detailed history of the visitor page views,
we add a website.visitor.page model that makes the link
between visitor and website.page but that keeps the visit date.
So that we can see if a visitor went mulitple times
on the same page and when. It's usefull to see his last page views.

Task ID : 2028059
PR #34624
2019-08-19 06:33:37 +00:00
Christophe Simonis 140ee6b8f0 [MERGE] forward port branch saas-12.4 up to 98a55917a6 2019-08-14 16:48:10 +02:00
Andrea Ulliana d5d2f5014a [IMP] website: make SEO dialog clearer
Part of https://github.com/odoo/odoo/pull/34422
task-2026299

closes odoo/odoo#34422

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-08-09 09:45:07 +00:00
Andrea Ulliana 599d23c670 [IMP] website: make the menu/link dialog clearer
Part of https://github.com/odoo/odoo/pull/34422
task-2026299
2019-08-09 09:45:07 +00:00
Andrea Ullianaandqsm-odoo 615f4ceefd [IMP] website: make theme dialog clearer
Review labels and alignements.

Part of https://github.com/odoo/odoo/pull/34422
task-2026299

Co-authored-by: qsm-odoo <qsm@odoo.com>
2019-08-09 09:45:07 +00:00
fja-odoo 736353b169 [IMP] website, *: improve published smart button
* = web, website_blog, website_crm_partner_assign, website_event,
website_event_track, website_forum, website_hr_recruitment,
website_livechat, website_partner, website_profile, website_sale,
website_sale_delivery, website_slides

The published button name is a bit ambiguous, now it will clearly state
what it does with a new title : "Go to Website". The "Published",
"Unpublished" state is shown with the globe icon changing color
(green and red) and a title on the button.

Badge and Delivery don't have a website page, the button will then be
a publish/unpublish button in the backend.

task-2002435

closes odoo/odoo#34261

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-08-08 16:05:33 +00:00
Christophe Simonis a4b1b532ea [MERGE] forward port branch 12.0 up to b82df99d7a 2019-07-25 20:01:05 +02:00
Christophe Simonis b82df99d7a [MERGE] forward port branch saas-11.3 up to 5f419d4ad3 2019-07-25 18:38:32 +02:00
Christophe Simonis e4a4b5a8f0 [MERGE] forward port branch 11.0 up to 0375c0174d 2019-07-24 16:04:59 +02:00
Andrea Ulliana f9c2716b3e [IMP] website_forum: bring forum modes
It is now possible to specify the forum mode : Questions and Answers or
Discussions. In Q&A mode, a user can only reply once while there is no
limit in Discussions mode.

task-2008910

closes odoo/odoo#34097

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-08-02 16:32:29 +00:00
Romain Derie ac170e8a82 [FIX] web_editor, website: stop snippet animations before cloning
Before this commit, when a snippet was cloned, its animation was not destroyed
first. The flow was:
1. Clone the snippet (DOM) - web_editor trigger `snippet_cloned`
2. Start cloned snippet animation - website listen `snippet_cloned`

This was causing bugs, eg facebook snippet for which the animation is to create
an iframe containing the facebook widget.
When cloning this snippet, its iframe would be cloned to, then its animation
would be started, creating another iframe.

To fix such flows, the snippet cloning flow should be:
1. Strop the snippet animation
2. Clone the snippet (DOM) - web_editor trigger `snippet_cloned`
3. Start cloned snippet animation - website listen `snippet_cloned`
4. Restart the original snippet animation

task-1951466

closes odoo/odoo#35029

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-07-22 08:30:21 +00:00
Christophe Simonis bfd34e14b1 [MERGE] forward port branch saas-12.3 up to 40e8b67179 2019-07-26 15:12:29 +02:00
Christophe Simonis e0f9c092cc [MERGE] forward port branch saas-12.2 up to 1d6d790513 2019-07-26 11:32:43 +02:00
Julien Castiaux ebb61753bf [FIX] website: Flip arrows on carousel in RTL
Enable the rtlcss library, translate the website into arabic, add a
carousel. The previous left appears right on the screen and the next
right arrow on the left.

This fix is to invert the two value (left arrow/right arrow) when the
screen in RTL-ed.

rtlcss documentation is available at:
https://rtlcss.com/learn/usage-guide/value-directives/#tip

opw-2041898

closes odoo/odoo#35220

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-07-26 12:48:27 +00:00
Martin Trigaux 1f5a4649a6 [MERGE] Forward port of saas-12.3 to saas-12.4 up to 87fc1554d6
closes odoo/odoo#34820

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-12 13:59:35 +00:00
Martin Trigaux c962b2cd11 [MERGE] Forwardport of saas-12.2 to saas-12.3 up to 01365a3f62
closes odoo/odoo#34747

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-12 07:22:41 +00:00
Jeremy Kersten 127ada424d [FIX] website: improve test with more precise trigger
Why not... If it can avoid a red branch.

closes odoo/odoo#34626

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-07-05 15:20:05 +00:00