*: 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/3a34e39caa8544059dfb1888edc29c62c3efde31closesodoo/odoo#54757
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
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
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
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
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
*: 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
closesodoo/odoo#47933
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
*: 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>
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
*: 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
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/6df67a28c2f113572acd4a3db19ab6b1bd37e7daclosesodoo/odoo#54409
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
*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
closesodoo/odoo#53817
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
*: 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
closesodoo/odoo#54065
Related: odoo/design-themes#269
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
*: 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).
closesodoo/odoo#54162
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
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
closesodoo/odoo#54152
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
*: 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).
closesodoo/odoo#54154
Also: fix some layout issue in the colorpicker widget.
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
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).
closesodoo/odoo#53702
X-original-commit: 96921325b6e6b309996b98c849ba49124d76ab38
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
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
closesodoo/odoo#53218
X-original-commit: 9b5f5cfce5d2d01c8e02f231e69ab350a3178795
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
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).
closesodoo/odoo#53156
X-original-commit: 1a2827f80bd7a66d4190977b22d4bc5846737b08
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
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.
closesodoo/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>
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#52592closesodoo/odoo#52932
X-original-commit: eed9fb771521143c0b514d96b5efdcb9715051f0
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
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>
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>
[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-62db7349afa5503cc8308e815d41db5dL10closesodoo/odoo#49697
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
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/52663closesodoo/odoo#52686
X-original-commit: e07a25c40dc48ff36150f5a10461d95a86e95804
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
*: 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
closesodoo/odoo#51517
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>