* update kanban lib and refactor usage of it.

This commit is contained in:
Hao Sun
2021-12-02 16:54:56 +08:00
parent 012d5f7465
commit 62efd53edb
6 changed files with 24 additions and 12 deletions
+1 -1
View File
@@ -22,7 +22,7 @@
#kanbanList .kanban-card {display: grid;}
#kanbanList .kanban-card > .title {white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
#kanbanList .kanban-card.has-progress {padding-right: 40px; position: relative;}
#kanbanList .kanban-card.has-progress > .progress-pie {position: absolute; right: 7px; top: 7px}
#kanbanList .kanban-card.has-progress > .progress-pie {position: absolute; right: 7px; top: 7px; width: 24px; height: 24px;}
#kanbanList .kanban-card.has-left-border {border-left: 2px solid #838a9d;}
#kanbanList .kanban-card.has-left-border.border-left-green {border-left-color: #0bd986;}
#kanbanList .kanban-card.has-left-border.border-left-red {border-left-color: #ff5d5d;}
+2 -2
View File
@@ -159,13 +159,13 @@ $(function()
{
data: processKanbanData(),
laneNameWidth: 5,
virtualize: true,
droppable:
{
selector: '.kanban-item:not(.kanban-item-span)',
target: findDropColumns,
finish: handleFinishDrop,
mouseButton: 'left'
},
virtualize: true
}
});
});
+13 -1
View File
@@ -115,6 +115,13 @@ function processKanbanData(key, programsData)
return {id: kanbanId, columns: columns, lanes: lanes};
}
/** Calculate column height */
function calcColHeight(col, lane, colCards, colHeight)
{
if (col.type !== 'doingProject') return colHeight;
return colCards.length * 62;
}
$(function()
{
/* Init all kanbans */
@@ -122,6 +129,11 @@ $(function()
{
var $kanban = $('#kanban-' + key);
if(!$kanban.length) return;
$kanban.kanban({data: processKanbanData(key, programsData), virtualize: true});
$kanban.kanban(
{
data: processKanbanData(key, programsData),
virtualize: true,
calcColHeight: calcColHeight
});
});
});
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+4 -4
View File
File diff suppressed because one or more lines are too long