Commit Graph
2906 Commits
Author SHA1 Message Date
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
qsm-odoo 4f64fa3e78 [FIX] website: prevent saving multiple times in a row
While waiting for a better and more robust fix in the editor itself,
this prevents to hit the save button of the website editor while a save
is in progress.

closes odoo/odoo#52540

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-06-05 16:34:23 +00:00
Elisabeth DickinsonandThibault Delavallée 50b9798074 [IMP] website: make tips bioutifoul, and add moar tips
PURPOSE

Make digest email and tips more appealing. The goals of these tips are

  * to encourage the adoption of other apps (Did you know ?);
  * to make Odoo look more fun (Fun tips and tricks, young and dynamic style);
  * to show social proof and increase trust (emphasis on already existing
    projects / customers to);

SPECIFICATIONS

Add a tip about SEO.

LINKS

Task ID 2197417
PR odoo/odoo#51619

Co-Authored-By: Elisabeth Dickinson <edi@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
2020-06-04 15:20:14 +00:00
DramixDw 0f2cada323 [IMP] website_blog: use postlink for the tag cloud
Refactoring the tag cloud to make it work with post request.
Disallow multi-tag in get for bot indexation.

task-2250385
2020-05-29 15:09:42 +00:00
DramixDw 714f0aa07f [IMP] website: reintroduce a way to post from js
It was deleted in 11.0 as it was not used anymore. Now, it is
reintroduce as it is a nice utility function for some external app or
fixes. Here, it is use so that /website/add and /website/add/<path> work
as a controller POST with a CSRF token.

task-2241766
2020-05-29 13:59:15 +00:00
stefanorigano (SRI) aa867ba702 [IMP] website, *: define 17 generic color palettes
*: web_editor

Those will be shared by all themes.

Part of https://github.com/odoo/odoo/pull/52224
task-2197038

closes odoo/odoo#52224

Related: odoo/design-themes#290
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-06-02 15:29:50 +00:00
qsm-odoo e505ed2833 [IMP] website, *: allow color palette selection
*: web_editor

Note: on color palette change, all the colors of the user are reset and
he is warned about it.

Part of https://github.com/odoo/odoo/pull/52224
task-2197038
2020-06-02 15:29:33 +00:00
stefanorigano (SRI) 257a21abd7 [IMP] website, *: refine default theme design
*: web_editor

Part of https://github.com/odoo/odoo/pull/52223
task-2197038
2020-06-02 12:17:23 +00:00
qsm-odoo 00f70f7936 [IMP] website, *: allow to use a color preset for menu and footer
*: web_editor, web

Also now allows to control the copyright section color.

This commit also allows to use color name alias when the user choose
one of the 5 main colors or a gray color for one component (e.g. if the
user picks 'o-color-1' as the color for its text in preset 4, then it
will no longer be linked to the current css color of 'o-color-1' but to
'o-color-1' directly; meaning that if that color changes in the future,
so will the text of preset 4).

Part of https://github.com/odoo/odoo/pull/52223
task-2197038
2020-06-02 12:17:23 +00:00
Cocographiqueandqsm-odoo 5953c4df6b [IMP] website: use color presets on default snippets
Part of https://github.com/odoo/odoo/pull/45856
task-2197038

Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-06-02 09:42:19 +00:00
qsm-odoo 55c90cc9fa [IMP] website, *: allow presets user edition
*: web, web_editor

Now, the user can edit each individual component of each color preset
thanks to the third tab of the left panel. The edition of the first
preset is the same as the others for the users but it is actually
also used for "no-preset" areas, meaning that they impact the whole
website by default (*without impacting the other presets*). The website
thus appears as areas using presets, preset 1 being the default (in the
future all areas will be customizable with a different preset). The only
difference between "using preset 1 explicitely" and "not using a preset"
will be that background color is transparent in no-preset, leaving the
body background appear. If the body background has no image, then there
is no difference at all as the background color of the body is set to be
the background color of the preset 1. In boxed mode, that color is used
for the "box" and the website body uses a different customizable color.

Note: before this commit, the "text" color edition was used to set the
main text color and one of the constrasting color for the color-yiq
function (the darkest if a dark color or the lightest if a light color).
That last part has been removed and automatic colors will now always
use $gray-900 and $white as contrasting colors, unless changed by the
theme explicitely. This needed to be removed as now the "text color"
edition has been moved in the "preset 1" config and should thus only
impact the "no-preset / preset 1" areas instead of all the presets.

Part of https://github.com/odoo/odoo/pull/45856
task-2197038
2020-06-02 09:42:19 +00:00
qsm-odoo 7736cde22c [IMP] web_editor, website, *: use new color names
*: mass_mailing, website_blog, website_forum, website_hr_recruitment

Deprecate alpha, beta, gamma, delta and espilon color names and now use
a new color system: o-color-x, with x from 1 to 5.

This will allow to review the colors of all themes to have nice visuals
for the new color combinations classes, without breaking the current
uses of bg-alpha, alert-delta, etc in current websites of customers
(by keeping the old color and classes for compatibility).

This will also allow to uniformize all themes under the same conventions
to enforce BS color override:
- o-color-1 used as primary (as before, for alpha)
- o-color-2 used as secondary (as before, for beta)

Before, some themes were not following the 2 guidelines. The users
using those themes will simply have the possibility to choose o-color-1
and o-color-2 colors accordingly to restore their website without
breaking the new system features.

Another change is that those colors are defined through color palettes
and not theme color palettes. This will avoid them to generate automatic
bootstrap classes which we don't want (alert, btn) and generate the one
we want by ourself.

Note: for mass mailing, the colors and classes also have been renamed
but the system stays unchanged.

Part of https://github.com/odoo/odoo/pull/45856
task-2197038
2020-06-02 09:42:19 +00:00
qsm-odoo d9c4d928f7 [IMP] web_editor, *: integrate new o_cc${xxx} classes in the colorpicker
*: website

Part of https://github.com/odoo/odoo/pull/45856
task-2197038
2020-06-02 09:42:19 +00:00
qsm-odoo 69190959ce [IMP] website, *: introduce new classes to color snippets
*: web, web_editor, website_blog, website_event

New o_cc${xxx} classes where ${xxx} is a number [1-5] to style snippets:
they come with a background color, a text color, headings colors, a
link color, primary button colors and secondary button colors which
will later be possible to customize by the user.

The classes are made so that they are working on two levels. So if a
column receives a color class and the snippet too, everything will work
fine. More than 2 levels are not supported and the editor is made so
those cases should not appear. See o_colored_level class.

Part of https://github.com/odoo/odoo/pull/45856
task-2197038
2020-06-02 09:42:19 +00:00
qsm-odoo 0281c951f2 [IMP] website: remove the old color palette *re*generation
Changing 'alpha' does not change the other colors which have been chosen
by the user. If only 'alpha' is chosen by the user, then the other
colors are still adapted accordinly (compatibility).

Part of https://github.com/odoo/odoo/pull/45856
task-2197038
2020-06-02 09:42:18 +00:00
qsm-odoo 78d5b744f5 [IMP] website, *: introduce a way to define outline buttons by default
*: web, web_editor

Disable the automatic generation of bootstrap color buttons and do it
ourself with a tweak: we introduce btn-fill-* (working as the normal
btn-* classes (in opposition to btn-outline-* classes). We then map
btn-* classes to either btn-fill-* or btn-outline-* classes depending
on the configuration (with a sass extend).

Part of https://github.com/odoo/odoo/pull/52220
task-2197038

closes odoo/odoo#52220

Related: odoo/design-themes#288
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-06-01 10:48:53 +00:00
qsm-odoo 18294864ab [IMP] website, web: add link decoration option
Also extend bootstrap to not use that style on specific elements like
btn, dropdown-items, etc.

Part of https://github.com/odoo/odoo/pull/52220
task-2197038
2020-06-01 10:48:22 +00:00
qsm-odoo be6a8cfde7 [IMP] website, web, *: allow to choose website font-size
*: web_editor

Note: this work also prepare the code to be able to support different
font configs per font family.

Part of https://github.com/odoo/odoo/pull/52220
task-2197038
2020-06-01 10:48:08 +00:00
qsm-odoo d345bc4df7 [IMP] website: reorganise secondary_variables.scss file
Future changes will require a different order of the code in that file.
This commit only reorganises the file to make future code review easier.

Part of https://github.com/odoo/odoo/pull/52211
Related to task-2197038

closes odoo/odoo#52211

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-05-31 13:37:25 +00:00
qsm-odoo 43557ecbc7 [IMP] web_editor, website: add loading effect in left panel editor
The goal is to reduce loadings as much as possible but there will
always be some. So that loadings do not appear as bugs and give users
some feedback that they are ongoing, this commit adds a loading effect
during the loading of some actions.

Part of https://github.com/odoo/odoo/pull/52211
Related to task-2197038
2020-05-31 13:36:25 +00:00
fja-odoo ad828f4042 [IMP] website: use groups_id for visibility
visibility_group was used for visibility, we now use the groups_id field.
groups_id is a M2M field while visibility_group was a M2O field resulting
in an issue to display the M2M field in the frontend. We decided to
allow editing the groups as a M2O in the frontend. If there is more
than one group the user will have to go through the backend to edit.

task-2264580

closes odoo/odoo#51846

Related: odoo/upgrade#1260
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-05-29 08:22:34 +00:00
qsm-odoo b27a6f98ca [IMP] website: do not load ace editor library when opening theme tab
The ace editor library was loaded as soon as the theme tab was opened
while it is only useful for the related <head/> option in there -> we
now load it only if that option is used. This was introduced with the
feature at [1].

[1]: https://github.com/odoo/odoo/commit/560e3af48ab9327b49a8cf44a9b0416dfb5b95de

closes odoo/odoo#52124

X-original-commit: 989c256aabeaa55d7b5ecb26614cc2c2578f71e6
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-05-28 15:46:42 +00:00
qsm-odoo e2cf0a2358 [FIX] website, *: review theme tab creation + switching
*: web_editor

When clicking on the theme tab on an empty page, a scrollbar appeared
and stayed. This was because the fake `<theme/>` element was focused and
the overlay positioned randomly outside of the page.

This commit fixes that by simplifying the code and always hiding the
related overlay. This commit also makes sure the onFocus/onBlur method
of the theme options are called consistently, even though they are
probably not useful.

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

closes odoo/odoo#52114

X-original-commit: 7760898de4e14fa30db1db87dfa05276bfcaa2bb
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-05-28 14:32:25 +00:00
qsm-odoo b76af0758e [FIX] website: remove footer top border
The footer of Odoo is composed of 3 main elements: a <footer/> with a
.oe_structure and the footer copyright inside. The footer had a
transparent top border which was there for technical reason: making sure
the .oe_structure content was "1px" below the end-of-page content so
that dropping a snippet at the end of page but also in the footer was
possible (otherwise the dropzones would be at the exact same position).

This border which was invisible at the time may now become visible in
more cases so we have to remove it. Another hacky solution is made to
replace the old one, while remembering the footer usability is being
reviewed anyway.

Related to task-2197038

closes odoo/odoo#51997

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-05-27 14:07:06 +00:00
Samuel Degueldre f5e0727ca5 [FIX] web, *: fix keyboard overlay staying active when alt-tab/clicking
*: website

The keyboard navigation mixin was initially only used in the web-client,
because of this, some of the logic for hiding the overlay was put inside
of the web-client. We recently made keyboard navigation available on
website [1]. The handlers that would hide the overlay when alt-tabbing
or clicking on the page were not registered. This commit fixes that by
making the keyboard navigation mixin register the overlay-hiding
handlers itself.

[1]: https://github.com/odoo/odoo/commit/0b0690a3934cedcab0d5e34373e8d40c2ab25660

closes odoo/odoo#50122

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-05-25 08:41:49 +00:00
qsm-odoo e3b4f3ddf4 [FIX] website: prevent infinite loop in header animation code
Bug introduced by [1]. When the header starts being animated, the main
padding-top of the page is adapted automatically with JS... but that
JS was actually starting a never-ending loop. This is fixed now.

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

closes odoo/odoo#51726

X-original-commit: 07ed02608b8f4e3744c5e69c2651aa3df8bdd943
Signed-off-by: bvr-odoo <bvr-odoo@users.noreply.github.com>
2020-05-23 10:17:27 +00:00
Benjamin Vray d3af060ea9 [FIX] website: fix lightbox slideshow in gallery snippet
Before this commit there was a traceback when rendering the lightbox
in the gallery snippet. This bug was introduced by the new media dialog
system.

Related to task-2162952

closes odoo/odoo#51603

X-original-commit: 791ecf72af4a0928a02bf1bbdc269c67fcc3524c
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-05-20 10:32:59 +00:00
fja-odoo a72c9adbe5 [IMP] web_editor, *: make Colorpicker a Widget
*: website, web

Move the colorpicker dialog logic into a colorpicker *widget*, which the
colorpicker dialog will now instantiate.

Part of https://github.com/odoo/odoo/pull/46088
task-2195313
2020-05-14 22:45:33 +00:00
Martin Trigaux d879300944 [REM] website: remove lazy template call
Was making a render_template on an arbitrary template
Does not seem to be used anymore
2020-05-14 13:59:10 +02:00
qsm-odoo 64629a3b4f [FIX] website: allow using bold in blog posts with all fonts
Bootstrap uses `font-weight: bolder` for its `<b>` elements. This is
good... but only works if the "bolder" font is actually referencing
an available one.

Indeed, since we only load 400 and 700 font weights for fonts, see the
following table. CSS values on the left, actual fonts being used on the
right.

```
<p> | <b> | <p> | <b>
----------------------
100   400 | 400   400
200   400 | 400   400
300   400 | 400   400
400   700 | 400   700 -> ok
500   700 | 400   700 -> ok
600   900 | 700   700
700   900 | 700   700
800   900 | 700   700
900   900 | 700   700
```

See how bolder and fallbacks works: [1] and [2].

With most fonts, the rendering of `<b>` was thus only working for elements
using 400 or 500 font-weight. For font-weight > 500, we'll consider
this as a limitation for now: bold area cannot be made bolder.
Font-weights < 400 are however more important as used by some of Odoo
and bootstrap style (e.g. the entire blog posts).

The problem is even deeper as website visitors could have more or
different available font-weights on their computer.

This fix adds the loading of 300 weights for all fonts so that:
- The displayed weights are more consistent across different computers.
- Making a light text bolder through the editor works.

[1]: https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight#Meaning_of_relative_weights
[2]: https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight#Fallback_weights

opw-2226573

closes odoo/odoo#51061

X-original-commit: e7496b923b097f677bef09b890c52b5a680cf53c
Related: odoo/design-themes#277
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-05-11 15:59:16 +00:00
fja-odoo c20423313c [FIX] website, *: fix colorpalette custom colors
*: web_editor

Previously the theme body, text, header, headings and footer colors were
not added to the customs colors of other colorpickers if they were
custom. Now it is the case.
Those colors can be set to a theme color but it will be the css color
of the theme color that will be set, not its name.
This can lead to the custom color being a theme color which was not
checked before as it was not possible. Now it is checked.

Also before the theme tab, if the selected color was custom, it would
always appear in the palette and be marked selected. This is no longer
the case with the like of status colors as their color are
not part of the custom colors available on the color palette. Now we add
the selected color as a custom color to always have the selected marked.

task-2198177

closes odoo/odoo#50766

X-original-commit: d631b27b0bf04e708c16262378ab5729252838fe
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-05-06 13:49:49 +00:00
Samuel Degueldre e4c3f778cc [FIX] website: don't interpolate null values for css properties
In 29f02a37f0 we bumped the verion of libsass that we use. One
breaking change introduced by the new version is that if a css variable
is interpolated to the empty string, it is still emited in the compiled
css [1]

This commit fixes that by explicitly omitting null values from the map
before looping over it.

[1]: https://sass-lang.com/documentation/breaking-changes/css-vars

task-2248360

closes odoo/odoo#50668

X-original-commit: 6faf327706169bbe31e188a42805085b95b78052
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-05-05 14:40:18 +00:00