forked from Wavyzz/dolibarr
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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 '<div class="kanbanlabel">'.$langs->trans($tmpgroupbyvalue).'</div>';
|
||||
print '</div>'; // Start and end the new column
|
||||
}
|
||||
@@ -1803,7 +1803,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 '<div class="kanbanlabel">'.$langs->trans(empty($tmpgroupbyvalue) ? 'Undefined' : $tmpgroupbyvalue).'</div>';
|
||||
print '</div>'; // Start and end the new column
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user