* [perf story #59018] Render gantt.
This commit is contained in:
@@ -644,6 +644,25 @@ function initGantt()
|
||||
|
||||
resizeGanttView();
|
||||
$(window).off('resize').on('resize', function(){resizeGanttView()});
|
||||
|
||||
gantt.init(ganttID);
|
||||
gantt.parse(ganttData);
|
||||
gantt.showDate(new Date());
|
||||
|
||||
zoomTasks(zooming);
|
||||
|
||||
// Make folder can open or close by click
|
||||
$('#' + ganttID).on('click', '.gantt_close,.gantt_open', function()
|
||||
{
|
||||
let $task = $(this).closest('.gantt_row_task');
|
||||
let task = gantt.getTask($task.attr('task_id'));
|
||||
if(task) gantt[task.$open ? 'close' : 'open'](task.id);
|
||||
});
|
||||
|
||||
$('#ganttContainer').off('mouseleave').on('mouseleave', function()
|
||||
{
|
||||
setTimeout(function(){$('.gantt_tooltip').remove()}, 100);
|
||||
});
|
||||
}
|
||||
|
||||
$(function()
|
||||
|
||||
Reference in New Issue
Block a user