Commit Graph
2937 Commits
Author SHA1 Message Date
qsm-odoo 85531edd1b [FIX] web_editor, *: restore editor UI for selected CSS variables
*: website

Commit [1] broke the UI for some options related to CSS variables when
using Chrome. The commit made sure the string-value CSS variables are
printed with quotes, so that the JS representation of the CSS values can
distinguish them (strings = strings with surrounding quotes, others like
colors, numbers, etc = strings without surrounding quotes). With chrome,
the printed surrounding single quotes are read as double quotes for
strange reasons though... so the value "a" was not considered equal to
the value 'a'.

This commit makes sure surrounding quotes are normalized. This is done
through a new utility function to read CSS variables. This also makes
sure the values are trimmed, and colors normalized.

[1]: https://github.com/odoo/odoo/commit/3a34e39caa8544059dfb1888edc29c62c3efde31

closes odoo/odoo#54757

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-07-22 10:31:28 +00:00
Benjamin Vray 17e7e754cd [IMP] website: keep the selected image after moving it in gallery
Keep the selected image after moving it in the gallery. So that the
options for moving the current image are always displayed.

Part of https://github.com/odoo/odoo/pull/45096
task-2162952
2020-07-17 11:28:11 +00:00
Benjamin Vray a2fd2dacd9 [IMP] website: review carousel snippet
Add the width option for each slides in the carousel snippet.
Remove share links from the third slide of the carousel.

Part of https://github.com/odoo/odoo/pull/45096
task-2162952
2020-07-17 11:28:11 +00:00
Benjamin Vray 316ceaf4d8 [IMP] website: add dots indicators in gallery snippet options
Add dots indicators in gallery snippet options.

Part of https://github.com/odoo/odoo/pull/45096
task-2162952
2020-07-17 11:28:11 +00:00
Benjamin Vray f626130df9 [IMP] website: split image gallery into 2 different snippets
Snippet image gallery retains only the slideshow mode and a new snippet
called 'image wall' takes the 3 other modes.

Part of https://github.com/odoo/odoo/pull/45096
task-2162952
2020-07-17 11:28:11 +00:00
Benjamin Vray ef9cc134b6 [IMP] website: review gallery snippet
Review the gallery snippet. It has been improved in multiple ways.
Added new options, etc.

Part of https://github.com/odoo/odoo/pull/45096
task-2162952
2020-07-17 11:28:11 +00:00
Benjamin Vray 7a36eee043 [IMP] website: remove right/left indicators in gallery in editor
In gallery snippet with slideshow mode, the right/left indicators have
now the same behavior in editor and outside. Before this commit, these
indicators were always visible in editable mode.

Part of https://github.com/odoo/odoo/pull/45096
task-2162952
2020-07-17 11:28:11 +00:00
DramixDw da32bdb88a [IMP] website, *: make cover options always available
*: website_blog, website_event

It would make sense to be able to change the height of a cover or to
change the text alignment even if there's no backgroung-image.
Therefore, we're removing the background-image restriction for the
options of the cover snippet.

Part of https://github.com/odoo/odoo/pull/47933
task-2210733

closes odoo/odoo#47933

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-07-15 11:36:56 +00:00
DramixDwandqsm-odoo 188c338ab2 [IMP] website, *: make editor closer to WYSIWYG
*: event, website_blog, website_event, website_forum, website_sale,
   website_sale_comparison

We're changing most of the "DRAG BUILDING BLOCK HERE" placeholders so
that they only appear on drag. Making the preview as close as possible
to the page once saved. However, we're still keeping them on empty pages
because it make sense there to let know that the area is editable.

Part of https://github.com/odoo/odoo/pull/47933
task-2210733

Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-07-15 11:36:56 +00:00
qsm-odoo 1384354356 [IMP] website, *: review options' order/label + add "⌙" markers
*: web_editor

Some of those "⌙" markers will become foldable options in the future.

Part of https://github.com/odoo/odoo/pull/53930
task-2157252

closes odoo/odoo#53930

Related: odoo/upgrade#1478
Related: odoo/design-themes#332
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-07-14 14:43:16 +00:00
qsm-odoo 20249d316e [IMP] website: remove animate scrolling option for table of content
Part of https://github.com/odoo/odoo/pull/53930
task-2157252
2020-07-14 14:43:16 +00:00
qsm-odoo b4ce6fbc01 [IMP] website, *: add prettier preview of border styles
*: web_editor

Part of https://github.com/odoo/odoo/pull/53930
task-2157252
2020-07-14 14:43:16 +00:00
qsm-odoo 43c158295b [FIX] website: remove duplicated filter option for blockquote
The blockquote in its "cover" layout allows to add a background with
a dedicated colored filter on top of it. That option was a bit buggy
since the filter option only appeared if the page was saved first. As
we now have a generic option to apply a colored filter on image
themselves, that option became useless anyway.

Part of https://github.com/odoo/odoo/pull/53930
task-2157252
2020-07-14 14:43:16 +00:00
qsm-odoo bb0cd4d5c8 [IMP] web_editor, *: review background color/image options UI
*: website, mass_mailing, website_blog, doc

Part of https://github.com/odoo/odoo/pull/53930
task-2157252
2020-07-14 14:43:16 +00:00
qsm-odoo d23a9c1954 [IMP] web_editor, *: introduce new "button group" editor widget
*: website, website_form

Basically work just as a we-select but with a different design.

Part of https://github.com/odoo/odoo/pull/53930
task-2157252
2020-07-14 14:43:16 +00:00
qsm-odoo f16113a06e [IMP] web_editor, *: review the editor design CSS
*: web, mass_mailing, website, website_form, website_sale

New CSS design of the editor (step 1/x).

This work is unfortunately far from perfect but is a first step towards
what we want. In particular, much CSS linked to elements that are meant
to be removed/moved in the upcoming weeks was done in a huge rush but
will thus hopefully be removed/reviewed before the 14.0 release.

As the design is now far more complex including gradients and other
"complex" elements, it was also very difficult to keep a design based on
css-variable so this system was removed, which means that the editor now
appears the same everywhere (backend, frontend, ...). The original goal
of this system was to have an adapted style for backend, frontend and
website visitors. Unfortunately, the current result was a very good
frontend editor design, a not-so-good backend editor design (for mass
mailing at least) and a totally unadapted design for the website
visitors. Making this perfect will be achievable by loading different
assets for those 3 areas and hopefully those assets will only differ by
the values of editor scss variables.

Part of https://github.com/odoo/odoo/pull/53930
task-2157252
2020-07-14 14:43:16 +00:00
qsm-odoo b9ad60d5eb [FIX] web_editor, web: fix traceback with drag & drop when no header
Commit [1] introduced the bug by relying on the fact an element with
id=top is in the edited DOM. As the website header can be disabled, this
induced a crash as soon as the header was indeed disabled. Also, the
editor is not meant to edit the website only so we cannot rely at all
on the presence of a #top element.

[1]: https://github.com/odoo/odoo/commit/6df67a28c2f113572acd4a3db19ab6b1bd37e7da

closes odoo/odoo#54409

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-07-13 15:24:07 +00:00
Aaron Bohy af85bb5e13 [IMP] web,*: do not deploy services in tests
*mail,point_of_sale,web_editor,website

In the tests, required services are deployed for each test
independently. There is no need to have, in additon, all services
deployed globally. Worse, it could conflict and lead to unexpected
results.

This commit ensures services are no longer deployed globally in
tests. It turns the module 'web.env' into a declarative module with
no side-effect, by moving the service deployment to main.js, which
isn't added to the tests page.

Task 2287397

closes odoo/odoo#53817

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2020-07-13 12:55:07 +00:00
qsm-odoo 7be1429656 [REF] website, *: review how available fonts are defined in scss
*: web, web_editor

Instead of three lists + one map to define font information and user
choices saved as the index of the related fonts in those lists, the
fonts are now stored in an unique map <font-name> -> <data> and the
user choices are saved as the font name. This allow to have a visually
better definition of the fonts and allows to reorder fonts in the UI
without losing user customization (and actually simplify some code).

Unfortunately any user font customization < 14.0 will be lost, but this
is a small price to pay (users can still rechoose the same font in the
editor UI where they will go anyway to discover all the new shiny
features we are introducing there).

Part of https://github.com/odoo/odoo/pull/54065
task-2291398

closes odoo/odoo#54065

Related: odoo/design-themes#269
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-07-09 18:09:59 +00:00
qsm-odoo 3a34e39caa [REF] web_editor, *: review how html properties are printed (scss)
*: website

Make sure strings are printed quoted and null values are not printed.

Part of https://github.com/odoo/odoo/pull/54065
task-2291398
2020-07-09 18:09:59 +00:00
Jeremy Kersten f8a7379be9 [IMP] website_customer, website_hr: match apps when redirect in edit backend
Edit in backend now redirect to related apps, and no more in website Apps

closes odoo/odoo#54208

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-07-09 06:45:33 +00:00
qsm-odoo ecefd51b63 [IMP] web_editor, *: add visibility check for editor sub-widgets
*: website

Update the visibility (from dependencies and _computeWidgetVisibility
function) for all widgets, including the ones which are children of main
widgets (e.g. new ability to hide some choices from a select depending
on other options).

closes odoo/odoo#54162

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-07-07 15:56:55 +00:00
Jeremy Kersten c387ec19b4 [IMP] website: allow to have custom slug Ux
Now, slug uses seo_name if field exists before to fallback on display_name.

It allow to have a custom url without change the product name already used in
backend e.g. or just because you want add some keywords for seo.

task-2291676

closes odoo/odoo#54152

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-07-07 13:11:57 +00:00
qsm-odoo 94b59b1972 [FIX] web, web_editor, *: review chess-like bg for transparency preview
*: website

The style to achieve the chess-like bg result was duplicated at many
places. The 'web' app was also actually using an image from the
'web_editor' app (we can live with it in stable as web_editor always
comes with web in auto_install but this was still a mistake).

closes odoo/odoo#54154

Also: fix some layout issue in the colorpicker widget.
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-07-06 15:47:06 +00:00
Benjamin Vray 0f2cab4aeb [IMP] website: add a z-index on the header for shadow option
We need a z-index on the header to make the shadow option work properly
We also needed to increase the z-index of the popup snippet so that it
goes above the header when it is displayed.

Part of https://github.com/odoo/odoo/pull/49142
task-2229551

closes odoo/odoo#49142

Related: odoo/design-themes#238
Related: odoo/upgrade#1432
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-06-30 14:19:17 +00:00
Benjamin Vrayandqsm-odoo b43546c091 [IMP] website, *: add the possibility to hide the footer, per page
*: web

Part of https://github.com/odoo/odoo/pull/49142
task-2229551

Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-06-30 14:19:16 +00:00
Benjamin Vrayandqsm-odoo db951aafbe [IMP] website, *: add the possibility to hide the header
*: web_editor

General website option + page option

Part of https://github.com/odoo/odoo/pull/49142
task-2229551

Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-06-30 14:19:16 +00:00
Benjamin Vray 7827da3e7a [IMP] website: add the possibility to hide the logo
Part of https://github.com/odoo/odoo/pull/49142
task-2229551
2020-06-30 14:19:16 +00:00
Benjamin Vray 904fea38a2 [IMP] website, *: add minor improvements on header / footer design
*: web

+ Ease edition

Part of https://github.com/odoo/odoo/pull/49142
task-2229551
2020-06-30 14:19:16 +00:00
Benjamin Vrayandqsm-odoo 5879e40445 [IMP] website, *: add new footer effect options
*: web

Part of https://github.com/odoo/odoo/pull/49142
task-2229551

Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-06-30 14:19:16 +00:00
qsm-odoo 8e5caea148 [FIX] website: properly set $component-active-color
The global variable was declared inside a 'if', making it non-global and
thus without any effect.

3 solutions to keep it working with the !default flag:
- Declare it first outside the if with `null !default`
- Declare it inside the 'if' with `null !global !default`
- Use a one-line 'if' *function* to declare it

I chose the third solution as the first one is too verbose and not a
fan of the !global syntax (which could break if bootstrap was imported
inside another 'if' I guess).

closes odoo/odoo#53702

X-original-commit: 96921325b6e6b309996b98c849ba49124d76ab38
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-06-25 23:03:49 +00:00
DramixDw 2feaee191b [FIX] website: hide countdown at the end
When using the options 'Hide countdown at the end', only the first
canvas would dissapear and the message wasn't showing up. It was due
to a return in a loop that would cause the code to stop at that point
instead of just going to the next iteration as intented.

task-2261649

closes odoo/odoo#53218

X-original-commit: 9b5f5cfce5d2d01c8e02f231e69ab350a3178795
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-06-18 09:32:04 +00:00
qsm-odoo 5e89b7475e [FIX] website: properly go to fixed anchors
Since the header effects are now done without duplicating the header
into a fixed element, link anchors towards it were not working anymore
as they could be redirected to the fixed-positioned header. This commit
solves the problem "generically" for all fixed elements (I am not sure
any link towards a fixed element except the header makes sense though).

closes odoo/odoo#53156

X-original-commit: 1a2827f80bd7a66d4190977b22d4bc5846737b08
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-06-17 11:38:28 +00:00
3fea5b2136 [REF] mail, *: refactor messaging with OWL
This commit is a significant rewriting of client-side discuss, chatter,
chat window, and messaging menu using OWL. The behavior should be broadly
the same, with some slight functional changes here and there.

From a technical standpoint, the code of messaging is mainly organized in 2
main groups of modules:

- models, which are logical entities that depict the client-side state of
  messaging as a whole.
- components, which are in charge of displaying information from models.

This refactoring also introduces new JS guidelines regarding folder structure
(/static) and naming rules for JS modules.

Community PR: https://github.com/odoo/odoo/pull/39023
Enterprise PR: https://github.com/odoo/enterprise/pull/6249

Task-1914207

This PR is a collaborative work by Alexandre, Julien, Sébastien and Xavier,
with the precious help of Lucas to speed it up towards the end.

closes odoo/odoo#39023

Related: odoo/enterprise#6249
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Co-authored-by: Alexandre Kühn <aku@odoo.com>
Co-authored-by: Julien Giannone <jgi@odoo.com>
Co-authored-by: Lucas Perais <lpe@odoo.com>
Co-authored-by: Sébastien Theys <seb@odoo.com>
Co-authored-by: Xavier Dubuc <xdu@odoo.com>
2020-06-15 18:12:21 +00:00
Nicolas Lempereur a8e9a81814 [FIX] web_editor: translatable after pasted translation
Fixes same issue as b836e00d70 but for `<div/>` tag.

When we translate html content, all text and (currently) this subset of
inline tags are allowed inside translations: 'abbr', 'b', 'bdi', 'bdo',
'br', 'cite', 'code', 'data', 'del', 'dfn', 'em', 'font', 'i', 'ins',
'kbd', 'keygen', 'mark', 'math', 'meter', 'output', 'progress', 'q',
'ruby', 's', 'samp', 'small', 'span', 'strong', 'sub', 'sup', 'time',
'u', 'var', 'wbr', 'text'.

In b836e00d70 an issue was fixed that `<p/>` would possibly get inside
translation when copy-pasting, testing some scenario in current chromium
browser (83.0) it seems the pasted content contains `<div/>` tags.

opw-2259367
opw-2260711
closes #52592

closes odoo/odoo#52932

X-original-commit: eed9fb771521143c0b514d96b5efdcb9715051f0
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-06-12 15:39:25 +00:00
Laurent Stukkens (LTU) 8a0a17fab9 [IMP] website: keep focus on snippet when moving up or down
Part of https://github.com/odoo/odoo/pull/51236
task-2176020
2020-06-12 20:07:51 +00:00
Cocographiqueandqsm-odoo 35fe5e0ebe [IMP] website: review "Separator" snippet color
Part of https://github.com/odoo/odoo/pull/52698
task-2210730

closes odoo/odoo#52698

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-06-12 17:06:36 +00:00
Cocographique c799b64482 [IMP] website, *: improve "Blockquote" and "Quotes Carousel" snippets
*: web_editor

Part of https://github.com/odoo/odoo/pull/52698
task-2210730
2020-06-12 17:06:36 +00:00
Cocographiqueandqsm-odoo e5a5f98819 [IMP] website: improve "Popup" snippet
Review the layout to always use standard bootstrap classes so that
future task targeting modal can target s_popup snippets the same way
(for example: our task allowing to open a popup on click on a button).

This also allows to simplify the css and simplify the options. A new
option also now allows to have a backdrop, or not, so that user clicks
are blocked while the popup is opened, or not.

+ Adapt cookie bar accordingly.

Part of https://github.com/odoo/odoo/pull/52698
task-2210730

Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-06-12 17:06:36 +00:00
Cocographique cd4eb1fd33 [FIX] website: use BS border-radius variable for "Badge" snippet
Part of https://github.com/odoo/odoo/pull/52698
task-2210730
2020-06-12 16:50:20 +00:00
Cocographique 307f2afa73 [FIX] website: use BS variables for "Alert" snippet style
Part of https://github.com/odoo/odoo/pull/52698
task-2210730
2020-06-12 16:50:20 +00:00
Julien Mougenot c4786fccfd [IMP] *: update notifications to optional title
closes odoo/odoo#52826

Related: odoo/enterprise#11084
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-06-12 09:01:50 +00:00
Samuel Degueldre c058f19bfa [IMP] website_sale: let users create and edit custom product ribbons
Previously, there was only one static "Sale" ribbon. Users might want to
have many types of ribbons, for different levels of sales, or to
indicate that a product is sold out. This commit lets the user create
custom ribbons and use them on prodcuts on the shop page. Additionally,
setting a ribbon on a product used to require a reload, this is no
longer the case. All ribbon modifications are stored in a cache and the
RPCs to put them into effect are only done on save.

task-1981170
Part of odoo/odoo#47574

Related: odoo/upgrade#1079
Related: odoo/design-themes#219
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-06-10 11:44:33 +00:00
qsm-odoo bae8636124 [FIX] website: restore bg color compatibility for s_media_list
[1] removed the associated bg color of media list items as it was now
defined directly on the XML of the snippet. This was however enough to
break the style of old-db snippets. As the s_media_list snippet was just
refactored to need a 001 version, in the same Odoo version where the
mentioned bug was introduced, this commit can just restore the
background color associated for 000 versions.

[1]: https://github.com/odoo/odoo/commit/5953c4df6b9c08519f64a65c1cf5d5558d59f7d4#diff-62db7349afa5503cc8308e815d41db5dL10

closes odoo/odoo#49697

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-06-10 08:53:09 +00:00
Cocographique 7523d0477f [IMP] website: clean "countdown" snippet end message
Part of #49697
task-2210730
2020-06-10 08:35:39 +00:00
Cocographique 408678cd54 [IMP] website: improve images of "Media List" snippet
Part of #49697
task-2210730
2020-06-10 08:35:39 +00:00
Cocographiqueandqsm-odoo ba719b9589 [IMP] website: improve edition and options of "Media List" snippet
Part of #49697
task-2210730

Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-06-10 08:35:39 +00:00
Cocographiqueandqsm-odoo c9477d820b [IMP] website: improve "Products catalog" snippet
Part of #49697
task-2210730

Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-06-10 08:35:39 +00:00
qsm-odoo 42a424db20 [FIX] website: only open s_popup snippet once (outside of editor)
When the snippet was configured to be opened "on exit", it was opened
on every screen exit until the page was reloaded/left.

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

closes odoo/odoo#52686

X-original-commit: e07a25c40dc48ff36150f5a10461d95a86e95804
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-06-09 10:52:27 +00:00
Samuel Degueldre aa8d2a8be2 [IMP] web_editor, *: move image optimization feature to left-panel
*: website, mass_mailing

In continuity with the nline crop, in an effort to make the image
workflow as seamless as possible in the website editor, the image
optimization feature has been moved out of the modal which could be
opened through the media-dialog and into the left panel.

This commit adds a quality slider and a width selector, as well as a
preview of the image's weight to the left panel, and removes the
image_optimize dialog.

This commit also introduces the possibility to add a color filter on
images.

Part of https://github.com/odoo/odoo/pull/51517
task-2192755

closes odoo/odoo#51517

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-06-05 18:11:53 +00:00