* [refac bug #52768] Adjust tooltop text.
This commit is contained in:
@@ -501,7 +501,11 @@ function initGantt()
|
||||
|
||||
gantt.templates.tooltip_text = function (start, end, task)
|
||||
{
|
||||
if(task.type != 'point') return task.text;
|
||||
if(task.type == 'point') return '';
|
||||
|
||||
let $text = $(task.text);
|
||||
if($text.length == 0) return task.text;
|
||||
if($text[2]) return $text[2].innerHTML;
|
||||
};
|
||||
|
||||
gantt.templates.task_end_date = function(data)
|
||||
@@ -620,7 +624,7 @@ function initGantt()
|
||||
if(!isNaN(taskID) && taskID > 0)
|
||||
{
|
||||
if(!canViewTask) return false;
|
||||
zui.Modal.open({url: $.createLink('task', 'view', 'taskID=' + taskID, 'html', true), 'size': 'lg'});
|
||||
zui.Modal.open({url: $.createLink('task', 'view', 'taskID=' + taskID), 'size': 'lg'});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -661,6 +665,7 @@ function initGantt()
|
||||
$(window).off('resize').on('resize', function(){resizeGanttView()});
|
||||
|
||||
gantt.init(ganttID);
|
||||
gantt.clearAll();
|
||||
gantt.parse(ganttData);
|
||||
gantt.showDate(new Date());
|
||||
|
||||
|
||||
@@ -84,7 +84,6 @@ class gantt extends wg
|
||||
jsVar('reviewPoints', $reviewPoints),
|
||||
jsVar('ganttType', $ganttType),
|
||||
jsVar('showFields', $showFields),
|
||||
jsVar('colsWidth', $colsWidth),
|
||||
jsVar('showChart', $showChart),
|
||||
jsVar('colResize', $colResize),
|
||||
jsVar('userList', $this->getUserList()),
|
||||
@@ -94,7 +93,8 @@ class gantt extends wg
|
||||
jsVar('ganttFields', $this->prop('ganttFields')),
|
||||
jsVar('zooming', $this->prop('zooming')),
|
||||
jsVar('options', $this->prop('options')),
|
||||
jsVar('height', (int)$this->prop('height')),
|
||||
jsVar('colsWidth', (float)$colsWidth),
|
||||
jsVar('height', (float)$this->prop('height')),
|
||||
jsVar('canViewReview', common::hasPriv('review', 'view')),
|
||||
jsVar('canViewTaskList', common::hasPriv('execution', 'task')),
|
||||
jsVar('canViewTask', common::hasPriv('task', 'view')),
|
||||
|
||||
Reference in New Issue
Block a user