This commit adds a trash icon on the snippet overlay to delete the
snippet without using the left panel button.
task-2314805
closesodoo/odoo#55612
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
11px was set as default font-size when achieving 5 or 6 edition levels
in the sidebar was the norm. Thanks to the snippet's cleanup, resulting
in a reduced number of editable elements, we can now increase the
default fon-size and, consequentially, all general spacings.
Part of https://github.com/odoo/odoo/pull/55959
task-2157252
Issue
- Select "My Company (Chicago)" as current company
- Open "Projects" module
- Create a new Task
- Edit description, upload a new Image and add it to description.
Multi-company error "Write" on project.task .
In frontend, can optimize uploaded picture.
Causes
Wrong "allowed_company_ids" value in context.
Solution
Remove allowed companies from context to avoid allowed_company_ids
which may erroneously restrict based on website.
opw-2304511
closesodoo/odoo#55897
X-original-commit: 8f6506a57853040d065569fdd60f9d94be8e26e1
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
*: website
Since [1], the thumbnails of the saved snippets were not right anymore,
all fallbacking to the default image. This is because snippets thumbs
now use svg files instead of png and the snippet saving feature did not
allow it. This commit fixes that and makes the feature more robust.
- Allow to use any original thumbnail, and not only for website app.
- Remove useless defaut image, a fallback for when the feature is broken
is useless.
- Identify snippets by key instead of by main class (possible since
the new `data-snippet` attribute on snippets).
[1]: https://github.com/odoo/odoo/commit/b7fe2bdae2f45372c0d538767a226a413b806f3fclosesodoo/odoo#55896
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, all the data-oe-* attributes were removed from
the snippet panel on editor loading. Some were actually added then
removed by the same function... probably for historic reasons. All of
this is now useless, this commit takes also the opportunity to modernize
that all code section and removes other code which was there for
compatibility reasons too.
Now, the data-oe-* on snippets thumbs are kept (as some will actually
be used by upcoming commits). This commit just makes sure no data-oe-*
is left on the snippet bodies themselves.
Part of https://github.com/odoo/odoo/pull/55272
task-2309832
*: web_editor, website_blog
Unfortunately, this feature revealed a new batch of flaws in the
editor widgets system so some hacks were made to make it work. We will
always have the time to improve the pure technical side later.
This commit also separates the notion of color filter from the notion
of parallax. A color filter can now be applied independantly, when
there is either a background image or a background video. Applying a
color filter on top of a background video is actually a new feature.
Applying a color filter on top of a background image is actually now
achievable by two different ways: this new color filter layer or by
applying the color transformation on the image itself via the related
option. Depending on the user case, both could make sense at the same
time, but more importantly: having a CSS color filter is useful for
using those for default Odoo content (e.g. like the current contact us
page where we use a cover banner with an image with a black filter on
top of it: doing that without CSS color filter would mean to alter the
image directly which would not be ok when the user changes the image).
Also, sometimes you want the unfiltered image on a page and the exact
same one but filtered on another (for example: forum images).
Note: this commit also "fixes" an issue: the optimization feature for
images when parallax was enabled was not available before.
Part of https://github.com/odoo/odoo/pull/47313
task-46147
Since v13, snippet's thumbs are rendered as background images using the
't-snippet' instruction.
This code was kept for back-compatibility.
Part of https://github.com/odoo/odoo/pull/55645
task-2157252
This commit adds a new snippet option allowing the user to choose one of
a series of SVG shapes as their background, or to be overlaid over the
background image of a snippet and to customize the colors of those
shapes.
Part of https://github.com/odoo/odoo/pull/53017
task-2210790
closesodoo/odoo#53017
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
*: website_blog
Previously, background colors, images, and videos could all be applied
on the same section, such that the image can be used as a fallback for
the video, and the color as a fallback for the image. However, if you
wanted to change the background color behind the background image, the
background image would be removed. The background image and background
video also shared the same widget to pick the image or video.
This commit adds a background-type toggler, where the user can toggle
the background color, image and video individually. It also makes the
video picker into its own UserValueWidget, such that the user can pick
both an image and video without overriding the other.
Part of https://github.com/odoo/odoo/pull/53017
task-2210790
Before this commit, the enabled state of we-button element was a
"pressed-like" background + a check icon. This check icon was then
explicitely removed for we-button extension such as checkboxes and
button groups' buttons. Now, the enabled state does not contains that
check icon by default and it is explicitely added for selects' buttons.
Part of https://github.com/odoo/odoo/pull/53017
task-2210790
Before this commit, the 'snippet_option_update' event was triggered
whether or not it was a preview update. In the preview update case,
nothing was done, ever. This commit removes the preview notification.
If it ever becomes useful, it can be restored at that moment.
This commit actually solves a bug introduced by [1]: that snippet update
notification is now triggered after a setTimeout delay to allow events
to bubble before the UI update it will trigger (in non preview mode).
The side effect this had was that, between each preview, the execution
chain was deferred of a setTimeout delay between each step (even though
previews do not update the UI). This was enough to allow for a paint
refresh.
So before this commit, if option C was selected, then the user hovered
option A then option B, the option C was visually re-enabled between A
and B. This won't be the case anymore after this commit.
Long story short: restore no-flickering when previewing options.
[1]: https://github.com/odoo/odoo/commit/2616c8950fd615561e720660bcc39e018f4061e4
Part of https://github.com/odoo/odoo/pull/55588closesodoo/odoo#55588
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
*: website
Before this commit, editor widgets were updated by 3 successive calls
to methods 'setValue', 'updateUI' and '_updateUI'. The last two were
in charge of updating the UI depending of the value that was set, only
in specific condition (like "if the widget is not focused", "or not
previewed", ...).
This is now in fact useless: 'setValue' can be in charge of the UI
update. Indeed, when a value is set on a widget there is no reason to
not update its UI anymore. This was useful when the UI was updated on
preview, which is not the case anymore. This could also be useful for
widget with multiple options attached to them... but in those rare cases
updating the UI multiple times (one time per option method) should not
be a problem.
Part of https://github.com/odoo/odoo/pull/55588
*: web_editor
This will more probably change again in the future but this is a first
step towards a hierarchized 'options' tab for the editor panel.
Part of https://github.com/odoo/odoo/pull/55529
Commit [1] introduced a flickering when any modal was opened on the
frontend. Indeed, it introduced the possibility to go into "fullscreen"
mode, which makes the Odoo UI navbar and sidebar disappear. This is
animated: the padding of the `<body/>` element is using a CSS
transition... but when a Bootstrap modal opens, the padding-right is
changed to compensate the scrollbar removal. This change now being
animated, it creates a flickering.
A generic solution was made: only animate what is animated for the
duration of the fullscreen mode switch.
[1]: https://github.com/odoo/odoo/commit/0b0690a3934cedcab0d5e34373e8d40c2ab25660closesodoo/odoo#55210
X-original-commit: ccadb20c82a651e9ef87e818b898f3e9a081cacd
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Previously, you could only add a tag on a blog post from the backend.
Here we're adding a way to add them from the left-panel so that it's
easier for the user to add them.
The long term goal will not be to reimplement complex view of the
backend. This is actually already past the limit: we will need a way
to instantiate views from the backend in the frontend in the future.
Part of https://github.com/odoo/odoo/pull/52759
task-2267693
closesodoo/odoo#52759
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
Render inline SVG inside buttons in order to allow CSS styling.
Define SVG icons design for normal/hover status applying the same colors
as default text buttons.
In order to support multi-colors SVGs, this commits will affect inner
shapes in different ways:
- '.o_graphic' shapes: will gets the UI btns colors (default/hover)
- '.o_subdle' shapes: will gets a slightly reduced default text color
Shapes without '.o_graphic/.o_subdle' classes will be rendered normally,
as defined in the svg code.
Part of https://github.com/odoo/odoo/pull/54913
task-2157252
Co-authored-by: qsm-odoo <qsm@odoo.com>
*: web_editor
-> Introduce the we-gpspicker widget and improve the way the gmap lib
is loaded (for Odoo / multiple snippets / ...).
Part of https://github.com/odoo/odoo/pull/49101
task-2091396
Enter keypress browser event were removed in 3c372d1da8.
It was reintroduced in text fields with d2f024d254 and this PR do the
same and reintroduce it for source mode of FieldHtml (`html` widget).
opw-2302605
closes#55066closesodoo/odoo#55081
X-original-commit: b10ca1f6094b7c8e6e222aa0ea3d1f891e79379a
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Before this commit, user could not selecta a date before year 1900.
This was an historical limitation due to python < 3.2 that didn't
support dates before 1900.
After this commit, user can select any date, user can select any
date from 01/01/0001.
taskID: 2166761
Fixes#41788Closes#43055closesodoo/odoo#51406
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
Co-authored-by: Aaron Bohy <aab@odoo.com>
Since the new effects on the header, the overlays do not overlap
correctly after the page has been scrolled. Now we hide the overlays
during the scrolling and show/recompute it after the scrolling.
Part of https://github.com/odoo/odoo/pull/51446
task-2229127
X-original-commit: 209a94d8c4fcdc2e74860c9392fc14a35aec52ed