[FIX] web: kanban: fix kanban card drag&drop highlight
Since odoo/odoo@209a97c, the drag&drop of a kanban card in a columnn is highlighted. This feature was tested visually on a build that was not up to date with master. Resulting in a visual conflict with [classes.push("bg-100");](https://github.com/odoo/odoo/commit/7cfe50749f89a2e2fdd5bfdcc943210f891e38c9#diff-4de8437424d1b687477e865e387b017fc5a6a86e9c50c9ea198da79d3a7a1a4cR266) which overrides the highlight background-color. This commit resolves this conflict to have the drag&drop highlight background. closes odoo/odoo#99441 Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
This commit is contained in:
@@ -19,6 +19,9 @@
|
||||
--KanbanRecord__image--fill-width: #{$o-kanban-image-fill-width};
|
||||
|
||||
--KanbanRecord__dropdown-gap: #{$border-width};
|
||||
|
||||
--KanbanColumn__highlight-background: #{rgba($o-info, .05)};
|
||||
--KanbanColumn__highlight-border: #{$o-info};
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
.dropdown,
|
||||
@@ -486,8 +489,8 @@
|
||||
}
|
||||
}
|
||||
&.o_kanban_hover {
|
||||
background-color: #00a09d0d;
|
||||
box-shadow: -1px 0px 0px 0px #00a09d inset, 1px 0px 0px 0px #00a09d inset;
|
||||
background-color: var(--KanbanColumn__highlight-background);
|
||||
box-shadow: -1px 0px 0px 0px var(--KanbanColumn__highlight-border) inset, 1px 0px 0px 0px var(--KanbanColumn__highlight-border) inset;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -63,8 +63,14 @@ export class KanbanRenderer extends Component {
|
||||
}
|
||||
element.classList.add("o_dragged", "shadow");
|
||||
},
|
||||
onGroupEnter: (group) => group.classList.add("o_kanban_hover"),
|
||||
onGroupLeave: (group) => group.classList.remove("o_kanban_hover"),
|
||||
onGroupEnter: (group) => {
|
||||
group.classList.add("o_kanban_hover");
|
||||
group.classList.remove("bg-100");
|
||||
},
|
||||
onGroupLeave: (group) => {
|
||||
group.classList.remove("o_kanban_hover");
|
||||
group.classList.add("bg-100");
|
||||
},
|
||||
onStop: (group, element) => {
|
||||
group && group.classList && group.classList.remove("o_kanban_hover");
|
||||
element.classList.remove("o_dragged", "shadow");
|
||||
|
||||
Reference in New Issue
Block a user