From 74c651c76fd884b4be7a74ed8d1250744130d7e7 Mon Sep 17 00:00:00 2001 From: Yagami Date: Mon, 15 May 2023 16:24:00 +0800 Subject: [PATCH] * Fix gantt click event bug. --- module/programplan/view/gantt.html.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/programplan/view/gantt.html.php b/module/programplan/view/gantt.html.php index 50a4906ad8..9223f3fa2b 100755 --- a/module/programplan/view/gantt.html.php +++ b/module/programplan/view/gantt.html.php @@ -765,11 +765,12 @@ $(function() var taskModalTrigger = new $.zui.ModalTrigger({type: 'iframe', width: '95%'}); gantt.attachEvent('onTaskClick', function(id, e) { + if($(e.srcElement).hasClass('gantt_close') || $(e.srcElement).hasClass('gantt_open')) return false; + var task = gantt.getTask(id); if(task.type == 'point' && task.rawStatus) location.href = createLink('review', 'view', 'reviewID=' + task.reviewID); if(task.type == 'plan') window.parent.$.apps.open(createLink('execution', 'task', 'id=' + task.id), 'execution'); - if($(e.srcElement).hasClass('gantt_close') || $(e.srcElement).hasClass('gantt_open')) return false; if($(e.srcElement).hasClass('icon-confirm')) { var pointAttr = JSON.parse(reviewPoints);