* update kanban lib and refactor usage of it.
This commit is contained in:
@@ -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;}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user