diff --git a/htdocs/core/js/lib_head.js.php b/htdocs/core/js/lib_head.js.php index 2027c7a7441..7ab8c4e898e 100644 --- a/htdocs/core/js/lib_head.js.php +++ b/htdocs/core/js/lib_head.js.php @@ -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: "" }, - context: document.body + context: document.body, + success: function() { + if (newColumn.hasClass('kanbancollapsed')) { + item.hide(); + } + } }); item.data('original-column', newColumn); } diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index a75f9fe6e42..2e53dec280a 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -1764,7 +1764,7 @@ while ($i < $imaxinloop) { if (in_array($tmpcursor, $groupofcollpasedvalues)) { print ' kanbancollapsed'; } - print '" data-groupbyid="'.preg_replace('/[^a-z0-9]/', '', $tmpcursor).'">'; + print '" data-groupbyid="'.preg_replace('/[^a-z0-9]/', '', $tmpcursor).'" data-groupbyfield="'.$groupbyfield.'">'; print '