mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-18 15:31:28 +01:00
@@ -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
|
// Code to manage drag and drop inside kanban group by view - handles sortable columns and item movement between status columns
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
if ($('.kanban .column:not(.kanbancollapsed)').length > 0) {
|
if ($('.kanban .column').length > 0) {
|
||||||
$('.kanban .column:not(.kanbancollapsed)').sortable({
|
$('.kanban .column').sortable({
|
||||||
items: '.kanban-draggable',
|
items: '.kanban-draggable',
|
||||||
connectWith: '.kanban .column:not(.kanbancollapsed)',
|
connectWith: '.kanban .column',
|
||||||
cursor: 'move',
|
cursor: 'move',
|
||||||
opacity: 0.8,
|
opacity: 0.8,
|
||||||
tolerance: 'pointer',
|
tolerance: 'pointer',
|
||||||
@@ -1664,9 +1664,15 @@ if (getDolGlobalString('MAIN_USE_JQUERY_JEDITABLE')) {
|
|||||||
element: item.data('element'),
|
element: item.data('element'),
|
||||||
table_element: item.data('tableelement'),
|
table_element: item.data('tableelement'),
|
||||||
fk_element: item.data('itemid'),
|
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);
|
item.data('original-column', newColumn);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1764,7 +1764,7 @@ while ($i < $imaxinloop) {
|
|||||||
if (in_array($tmpcursor, $groupofcollpasedvalues)) {
|
if (in_array($tmpcursor, $groupofcollpasedvalues)) {
|
||||||
print ' kanbancollapsed';
|
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 class="kanbanlabel">'.$langs->trans($tmpgroupbyvalue).'</div>';
|
||||||
print '</div>'; // Start and end the new column
|
print '</div>'; // Start and end the new column
|
||||||
}
|
}
|
||||||
@@ -1803,7 +1803,7 @@ while ($i < $imaxinloop) {
|
|||||||
if (in_array($tmpcursor, $groupofcollpasedvalues)) {
|
if (in_array($tmpcursor, $groupofcollpasedvalues)) {
|
||||||
print ' kanbancollapsed';
|
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 class="kanbanlabel">'.$langs->trans(empty($tmpgroupbyvalue) ? 'Undefined' : $tmpgroupbyvalue).'</div>';
|
||||||
print '</div>'; // Start and end the new column
|
print '</div>'; // Start and end the new column
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user