[FIX] web: fix colorlist css by restoring mistakenly deleted file

During the wowl refactoring, the colorpicker field was converted into a
new field component and the colorlist that allows to pick the color was
extracted into a new component with its own style. While doing so, the
stylesheet for the color picker was reworked into the stylesheet of the
colorlist, which is ultimately what we want, but in the mean time, the
legacy colorpicker widget no longer has the style it needs to be
displayed properly. A partial fix was applied previously by resoring
part of the scss directly in the colorpicker field css which is a
mistake.

This commit simply restores the old colorpicker scss file so that the
legacy field displays properly and removes the parts of it that had been
copied over to the new color picker field.

closes odoo/odoo#95392

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit is contained in:
Samuel Degueldre
2022-07-06 13:11:39 +02:00
parent 4805103274
commit ff82425e27
3 changed files with 65 additions and 39 deletions
+1
View File
@@ -140,6 +140,7 @@ This module provides the core of the Odoo Web Client.
'web/static/src/legacy/scss/form_view_extra.scss',
'web/static/src/legacy/scss/list_view_extra.scss',
'web/static/src/legacy/scss/profiling_qweb_view.scss',
'web/static/src/legacy/scss/color_picker.scss',
'base/static/src/scss/res_partner.scss',
# Form style should be computed before
@@ -0,0 +1,64 @@
.o_field_color_picker {
display: flex;
float: right;
margin-right: 7px;
width: 100%;
ul {
display: flex;
justify-content: flex-end;
flex-wrap: wrap;
@include o-kanban-colorpicker;
@include o-kanban-record-color;
width: 100%;
max-width: unset;
margin: 0;
padding: 0;
> li {
border: 2px solid white;
box-shadow: 0 0 0 1px gray('300');
margin: $o-kanban-inner-hmargin 4px 0 0;
> a:focus {
outline: none;
}
}
}
}
.o_field_color_picker_preview {
@include o-kanban-record-color;
margin-right: 7px;
> li {
display: inline-block;
margin: $o-kanban-inner-hmargin $o-kanban-inner-hmargin 0 0;
border: 1px solid white;
box-shadow: 0 0 0 1px gray('300');
> a {
display: block;
&::after {
content: "";
display: block;
width: 20px;
height: 15px;
}
}
// No Color
a.oe_kanban_color_0 {
position: relative;
&::before {
content: "";
@include o-position-absolute(-2px, $left: 10px);
display: block;
width: 1px;
height: 20px;
transform: rotate(45deg);
background-color: red;
}
&::after {
background-color: white;
}
}
}
}
@@ -28,42 +28,3 @@
}
}
}
.o_field_color_picker_preview {
@include o-kanban-record-color;
margin-right: 7px;
> li {
display: inline-block;
margin: $o-kanban-inner-hmargin $o-kanban-inner-hmargin 0 0;
border: 1px solid white;
box-shadow: 0 0 0 1px gray('300');
> a {
display: block;
&::after {
content: "";
display: block;
width: 20px;
height: 15px;
}
}
// No Color
a.oe_kanban_color_0 {
position: relative;
&::before {
content: "";
@include o-position-absolute(-2px, $left: 10px);
display: block;
width: 1px;
height: 20px;
transform: rotate(45deg);
background-color: red;
}
&::after {
background-color: white;
}
}
}
}