The jSignature lib is only used by the NameAndSignature component,
which is not accessible on a many screens. This commit thus
removes the lib and its extension from the bundles, and makes the
NameAndSignature component load it on demand.
Part of task~3439226
closesodoo/odoo#138054
Related: odoo/enterprise#48633
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
The motivation of this commit was to remove the override of owl
that disables the validateTarget check, which we believed was
necessary for the renderToString function.
Fun fact: renderToString doesn't seem to need the override, as
validateTarget is only called when mounting an app and when
completing a fiber, which renderToString doesn't do. It was instead
probably necessary for the legacy compatibily layers that have now
been removed.
So this commit removes the validateTarget override.
This commit also simplifies the setup of the renderToString fn by
lazy creating the app itself, instead of requiring the application
setup to set the main app as renderToString app (e.g. main.js in
web).
Part of task~3508223
closesodoo/odoo#137807
Related: odoo/enterprise#48514
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
Before this commit, owl was in the linter's accepted global variables.
This allowed direct access to owl global object.
For instance, to use xml from owl, you could do :
`const { xml } = owl;`
or you could use it directly:
`owl.xml`
Now, owl is not accepted on linter's global variables anymore, so to
import xml, now you need to use a proper import:
`import { xml } from "@odoo/owl";`
task-id 3498859
closesodoo/odoo#137517
Related: odoo/enterprise#48364
Related: odoo/design-themes#709
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
*: auth_password_policy, bus, event, im_livechat, mail, mass_mailing,
mrp_subcontracting, point_of_sale, pos_self_order, project, stock,
survey, web, web_editor, web_tour, website, website_event,
website_forum, website_sale, website_slides, base
Historically, the web.assets_common bundle was used to contain assets
that were needed by both the frontend and the backend. In practice, this
caused a bunch of issues where people would add things in assets common
that were not needed by both, and it was also abused as a way to get
bootstrap working in unrelated places by only using that bundle's css.
Because of this, as a first step, the assets_common stop being used in
the frontend, but was left everywhere else.
This commit removes the bundle completely, and moves the files that used
to be in that bundle in the other bundles that need them, this will
allow those bundles to evolve independently going forward.
in im_livechat and mail, some of the unneeded legacy code was removed, this
allows us to avoind including all of the legacy code from web in the
livechat embed bundle and in the dicuss public bundle respectively.
closesodoo/odoo#132190
Related: odoo/enterprise#45884
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
- Take them out of `legacy` codebase.
- Group them in a generic `static/src/scss` folder, as those files are
used in webclient but also in public livechat, portal...
X-original-commit: ca2e4fea92b5a26078a412072275a969508358c7
Part-of: odoo/odoo#100759
In BS4, the classes utilities order was set from `-1` (first) to
`13` (last). This commit restores the old behaviour.
In BS5, you only have a range from `-1` to `6`.
These classes are used in Odoo to order the `oe_stat_button`
particularly for UTM campaign. The order is set using CSS as there no
simple way to do it using `XPath` as there are many module (installed or
not) targeting the `oe_stat_button`.
closesodoo/odoo#98458
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Define classes for some default bootstrap transitions + 'none'.
These values are generic enough to fit different circumstances.
Classes added:
- transition-base
- transition-fade
- transition-none
Part of the overall v16 SCSS optimization/restyle, task-2704984.
task-2918463
closesodoo/odoo#97051
Related: odoo/enterprise#30066
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Drop custom cursor classes in favor of Bootstrap default ones.
Part of the overall v16 SCSS optimization/restyle, task-2704984.
task-2918463
Part-of: odoo/odoo#97051
This commits adds the '$o-opacity-disabled' value in the opacity
utility class generation list, allowing to use the 'opacity-disabled'
class to style on the fly elements that don't support disabled states by
default (eg. generic divs)
The commit introduces also a new '.opacity-trigger-hover' class.
It can be applied on parent elements in order to trigger their children
opacity states. Eg:
<div class="opacity-trigger-hover">
<span>Always visible</span>
<span class="opacity-0 opacity-100-hover">
Visible when parent is :hover
</span>
</div>
Part of the overall v16 SCSS optimization/restyle, task-2704984.
task-2918463
Part-of: odoo/odoo#97051
During the BS5 migration, the .text-body class wasn't properly ported.
As it is a standard Bootstrap class and useful to override component's color with the one used by the body (ie. set a heading color the same as the content).
This commit restores it.
closesodoo/odoo#96173
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Since BS5 migration [1], we added the possibility to customize the
BS utilities classes using Bootstrap API [2].
But in the mail module files was not added in the
`mail.assets_discuss_public` bundle so no utility class was generated.
Also, missing 'text-black' and 'text-white' are now added in the
compiled SCSS (for `mail.assets_discuss_public` bundle).
Refs:
[1] odoo/odoo#95450
[2] https://getbootstrap.com/docs/5.1/utilities/api/closesodoo/odoo#95661
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
This allows media queries in width/height classes.
This behavior was supported in BS4 but has been deleted in BS5.
e.g. w-md-75 (in Leaderboard eLearning)
Task ID: 2766483
Part-of: odoo/odoo#95450
To avoid redundancy and mess rules with rounded classes we simplify
all rules in one location (before was in web and web_enterprise)
Also, we don't set the $rounded variables to 0, so we can use it in
the Bootstrap utilities API. Instead, we have set to 0 the specific
variables.
Task ID: 2766483
Part-of: odoo/odoo#95450
- new prefix `bs-` for the root CSS variables
As some website snippet relay on these values we need to restore the old
behaviour by setting this prefix to an empty string.
- restore negative margins disabled in BS5 by default
- restore BS4 behaviour for setting element content
Fix some cases when we want to render more than one node on the root
level.
In BS4 the jQuery was using all node but in the jQuery compatibility
layer in BS5 it takes only the first node if the jQuery Element is used
in the function. This hack try to restore the old behaviour wrapping all
element in a DIV element (to be single root node).
PS: this can break some querySelector and some CSS selector if they are
too fragile.
e.g. of element that break before this hack:
Popover content for PaymentPopOver XML in ShowPaymentLineWidget
- restore old value from BS4 and adapt to new value
$table-cell-padding -> $table-cell-padding-x
$table-cell-padding -> $table-cell-padding-y
$table-cell-padding-sm -> $table-cell-padding-x-sm
$table-cell-padding-sm -> $table-cell-padding-y-sm
- restore BS4 smooth-scroll behaviour
- restore `text-X` from BS4 that use text-emphasis-variant
In BS5, to generate the text utilities `test-X` its use BS5 utilities
(See $utilities SCSS variables). To restore the old behaviour we replace
with the custom `text-emphasis-variant` mixin.
See odoo/odoo@e111cfd35e
- restore border and background of table
In `_reboot.scss`, BS5 add `border-style` to all element of a table.
In some case we customize the table with CSS rules (e.g. `listview`),
these rules set a size of border. The mix of all rules made that the
border of the `td` in `tfoot` are visible and make a black line.
- reset block quote Y margin to 0
BS5 add a spacer and we reset that by puttin margin-y 0
- In BS5, border color is linked to the text color in it. We doesn't
want that and we restore the same behavior as un BS4 by putting
border-color in grey.
- restore HR style like in BS4
Since in BS5, the height matter we remove the padding and added into the
margin.
Also, we restore the color of BS4 for the HR tag
> <hr> elements now use height instead of border to better support the
> size attribute. This also enables use of padding utilities to create
> thicker dividers (e.g., <hr class="py-1">).
https://getbootstrap.com/docs/5.1/migration/#content-reboot-etc
- restore old value for grid gutter to avoid calc error
In BS5 `$grid-gutter-width` is set in rem and in BS4 it was in px.
So SCSS compiler generates error when it tries to calc rem and px.
- restore badge, navbar paddings like in BS4
- restore link decoration in frontend (Portal) whiteout website
Task ID: 2766483
Part-of: odoo/odoo#95450
In BS5 `$emphasized-link-hover-darken-percentage` was removed, so we use
the new variable but we restore some BS4 values:
- 15% as in BS4
- remove the underline on links as in BS4
Task ID: 2766483
Part-of: odoo/odoo#95450
This commit is a hack for Bootstrap 5
In Bootstrap 4 these variables was used with map-merge()
In Bootstrap 5 these variables has set only if they don't exist before
PS: Another fix will be to reorder all bundle to follow Bootstrap
documentation and do another logic that wasn't use before.
Ref:
https://getbootstrap.com/docs/5.1/customize/sass/#colors
Task ID: 2766483
Part-of: odoo/odoo#95450
Add the new helper `.text-bg-#{$color}` to restore the old behaviour like in
BS4 for the `.bg-#{$color}`
In short, in BS5 `.bg-#{$color}` don't change anymore the text color but
only the background. `.text-bg-#{$color}` change both color text and
background.
Task ID: 2766483
Part-of: odoo/odoo#95450
mixins:
* make-container-max-widths
* text-emphasis-variant
variable:
* $modal-footer-margin-between
we had to forward-port the BS4 variable `$modal-footer-margin-between`
to avoid error between px and rem calc :
e.g. of error:
Error: Incompatible units: 'rem' and 'px'.
padding: $modal-inner-padding - $modal-footer-margin-between * .5;
This is because BS5 now uses 'rem' but Odoo still continue to use 'px'.
Therefore, the calculation can't be processed.
Task ID: 2766483
Part-of: odoo/odoo#95450
* = base,http_routing,hw_drivers
- Update Bootstrap from 4.3.1 to 5.1.3
- Update PopperJS to version 2 for Bootstrap 5 (JS part)
Some code was for PopperJS V1, but it's not compatible anymore.
- Remove some BS5 classes utilities backport
- Fix path for BS5
Task ID: 2766483
Part-of: odoo/odoo#95450
Define "Bootstrap v5 ready" utility-classes to handle font-size.
These classes definitions can be safely removed after migrating to v5.
task-2838625
Part-of: odoo/odoo#90476
Define "Bootstrap v5 ready" utility-classes to handle border-width.
These classes definitions can be safely removed after migrating to v5.
task-2842691
Part-of: odoo/odoo#91298
Define "Bootstrap v5 ready" utility-class to handle font-style.
This class definition can be safely removed after migrating to v5.
This class is needed for https://github.com/odoo/odoo/pull/87639
task-2811202
closesodoo/odoo#87637
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Define "Bootstrap v5 ready" utility-class to handle the property
overflow: visible.
This class definition can be safely removed after migrating to v5.
task-2742831
Part-of: odoo/odoo#83403
Define "Bootstrap v5 ready" utility-class to handle gaps.
This class definition can be safely removed after migrating to v5.
task-2733437
Part-of: odoo/odoo#82866
Following new policies in terms of product design-language, this commit
will partially revert 546477d reducing the number of `oi` icons.
It will also improve rendering when icons are rendered at our default
font-size (13px), avoiding blur effects when icons use thin lines.
Since fontAwesome will coexists with `oi` longer than expected, the
commit will also review size utility-classes in order to get consistent
result when used in conjunction with fa's ones (notably `fa-lg`).
Part-of: odoo/odoo#85651
Waiting the complete migration, some classes needs to be available to already
migrates xml files.
This file will be deleted once we're done.
closesodoo/odoo#85586
Task-id: 2704984
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
This commit reduces fontAwesome footprint by removing legacy font-files
(~750kb). It keeps WOFF(s) formats for browsers and TTF format for PDF
and ICON to PNG generations.
TTF format has been removed from the CSS [@]fontface rule, but it's
still called directly in python when needed[1].
This commit reviews the CSS too, removing obsolete vendor-prefix rules
and discontinued fontAwesome classes.
Part of v16 overall restyle (task-2704984).
task-2745275
[1] https://github.com/odoo/odoo/blob/15.0/addons/web_editor/controllers/main.py#L45
Part-of: odoo/odoo#83501
This commit "forks" fontAwesome into `src/libs` in order to allow
further customization.
Part of v16 overall restyle (task-2704984).
task-2745275
Part-of: odoo/odoo#83501