From e3e68e7ead28d9486eeb76d7bcc99a8522148cbd Mon Sep 17 00:00:00 2001 From: wangyuting Date: Mon, 21 Apr 2025 16:39:42 +0800 Subject: [PATCH] * [task#142101,done,1h,0h] Finish progranplan gantt critical path. --- lib/zin/wg/gantt/js/v1.js | 4 ++-- module/programplan/ui/gantt.html.php | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/zin/wg/gantt/js/v1.js b/lib/zin/wg/gantt/js/v1.js index 506e9504fc..36e93384e0 100644 --- a/lib/zin/wg/gantt/js/v1.js +++ b/lib/zin/wg/gantt/js/v1.js @@ -225,11 +225,11 @@ function getByIdForGantt(list, id) * @access public * @return void */ -function updateCriticalPath() +window.updateCriticalPath = function() { let showCriticalPath = !gantt.config.highlight_critical_path; - $('#criticalPath').html(showCriticalPath ? ganttLang.hideCriticalPath : ganttLang.showCriticalP); + $('#criticalPath').html(showCriticalPath ? ganttLang.hideCriticalPath : ganttLang.showCriticalPath); gantt.config.highlight_critical_path = showCriticalPath; gantt.render(); diff --git a/module/programplan/ui/gantt.html.php b/module/programplan/ui/gantt.html.php index fdc172a423..36c190dfe7 100644 --- a/module/programplan/ui/gantt.html.php +++ b/module/programplan/ui/gantt.html.php @@ -31,6 +31,7 @@ if($app->rawModule == 'programplan') } featureBar ( + btn(setID('criticalPath'), setClass('ghost mr-2'), $lang->execution->gantt->showCriticalPath, set::url('javascript:updateCriticalPath()')), btn(setClass('ghost mr-2', ($browseType != 'bysearch' ? 'active' : '')), $lang->programplan->gantt, set::url($this->createLink('programplan', 'browse', "projectID=$projectID&productID=$productID&type=gantt"))), $productDropdown, $hasSearch ? li(searchToggle(set::module('projectTask'), set::open($browseType == 'bysearch'))) : null