* refactor pages with kanban lib.

This commit is contained in:
Hao Sun
2021-11-30 14:21:24 +08:00
parent 152b3e03bc
commit 39a2d7296b
9 changed files with 89 additions and 46 deletions
+18 -3
View File
@@ -12,10 +12,25 @@ function processKanbanData(key, programsData)
var columns = [];
$.each(kanbanColumns, function(_, column)
{
var colType = column.type;
if(colType === 'doingProject')
{
columns.push(
{
kanban: kanbanId,
id: kanbanId + '-doing',
type: 'doing',
asParent: true,
name: doingText,
count: ''
});
}
columns.push($.extend({}, column,
{
kanban: kanbanId,
id: kanbanId + '-' + column.type,
kanban: kanbanId,
id: kanbanId + '-' + column.type,
parentType: (colType === 'doingProject' || colType === 'doingExecution') ? 'doing' : false,
}));
});
@@ -107,6 +122,6 @@ $(function()
{
var $kanban = $('#kanban-' + key);
if(!$kanban.length) return;
$kanban.kanban({data: processKanbanData(key, programsData)});
$kanban.kanban({data: processKanbanData(key, programsData), virtualize: true});
});
});
+1 -1
View File
@@ -43,7 +43,7 @@ $userPrivs['productplan'] = common::hasPriv('productplan', 'view');
$userPrivs['project'] = common::hasPriv('project', 'index');
$userPrivs['execution'] = common::hasPriv('execution', 'task');
$userPrivs['release'] = common::hasPriv('release', 'view');
js::set('kanbanColumns', $kanbanColumns);
js::set('kanbanColumns', array_values($kanbanColumns));
js::set('userPrivs', $userPrivs);
js::set('kanbanGroup', $kanbanGroup);
js::set('doingText', $lang->program->statusList['doing']);