#34417 [GroupByKanban] add: fix drag and drop for lead (#34493)

This commit is contained in:
Nicolas Domenech
2025-06-14 01:45:50 +02:00
committed by GitHub
parent c23d673780
commit 6b2050d34d
2 changed files with 13 additions and 7 deletions

View File

@@ -1627,10 +1627,10 @@ if (getDolGlobalString('MAIN_USE_JQUERY_JEDITABLE')) {
// Code to manage drag and drop inside kanban group by view - handles sortable columns and item movement between status columns
$(document).ready(function() {
if ($('.kanban .column:not(.kanbancollapsed)').length > 0) {
$('.kanban .column:not(.kanbancollapsed)').sortable({
if ($('.kanban .column').length > 0) {
$('.kanban .column').sortable({
items: '.kanban-draggable',
connectWith: '.kanban .column:not(.kanbancollapsed)',
connectWith: '.kanban .column',
cursor: 'move',
opacity: 0.8,
tolerance: 'pointer',
@@ -1664,9 +1664,15 @@ if (getDolGlobalString('MAIN_USE_JQUERY_JEDITABLE')) {
element: item.data('element'),
table_element: item.data('tableelement'),
fk_element: item.data('itemid'),
value: newColumn.data('groupbyid')
value: newColumn.data('groupbyid'),
token: "<?php echo currentToken() ?>"
},
context: document.body
context: document.body,
success: function() {
if (newColumn.hasClass('kanbancollapsed')) {
item.hide();
}
}
});
item.data('original-column', newColumn);
}