From ea0500a20caf48afe90ed7284e52be152977f354 Mon Sep 17 00:00:00 2001 From: mayue Date: Mon, 11 Jul 2022 15:26:14 +0800 Subject: [PATCH] * Finish task #60641. --- module/execution/control.php | 5 +++-- module/execution/js/cfd.js | 7 +++++++ module/execution/view/cfd.html.php | 3 +++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/module/execution/control.php b/module/execution/control.php index 74884ff20c..e88c933b03 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -1365,7 +1365,7 @@ class execution extends control * @access public * @return void */ - public function cfd($executionID = 0, $type = 'story') + public function cfd($executionID = 0, $type = 'story', $withWeekend = 'false') { $execution = $this->commonAction($executionID); $executionID = $execution->id; @@ -1374,7 +1374,7 @@ class execution extends control $this->app->loadClass('date'); list($begin, $end) = $this->execution->getBeginEnd4CFD($execution); - $dateList = date::getDateList($begin, $end, 'Y-m-d', ''); + $dateList = date::getDateList($begin, $end, 'Y-m-d', $withWeekend == 'false'? 'noweekend' : ''); //list($cycleTimeAvg, $throughput) = $this->execution->getCFDStatistics($executionID, $dateList, $type); @@ -1384,6 +1384,7 @@ class execution extends control $this->view->title = $this->lang->execution->CFD; $this->view->type = $type; $this->view->execution = $execution; + $this->view->withWeekend = $withWeekend; $this->view->executionName = $execution->name; $this->view->executionID = $executionID; $this->view->chartData = $chartData; diff --git a/module/execution/js/cfd.js b/module/execution/js/cfd.js index 59e87d8f80..51637d3120 100644 --- a/module/execution/js/cfd.js +++ b/module/execution/js/cfd.js @@ -127,4 +127,11 @@ $(function() { location.href = createLink('execution', 'cfd', 'executionID=' + executionID + '&type=' + $(this).val()); }); + + $('#weekend').click(function() + { + var type = $('#type').val(); + withWeekend = withWeekend == 'true' ? 'false' : 'true'; + location.href = createLink('execution', 'cfd', 'executionID=' + executionID + '&type=' + type + '&withWeekend=' + withWeekend); + }); }); diff --git a/module/execution/view/cfd.html.php b/module/execution/view/cfd.html.php index f8f5b4127e..bdefa324ba 100644 --- a/module/execution/view/cfd.html.php +++ b/module/execution/view/cfd.html.php @@ -14,6 +14,7 @@ + execution->count); ?> execution->burnXUnit); ?> @@ -25,6 +26,8 @@ common::printLink('execution', 'computeCFD', "reload=yes&executionID=$executionID", ' ' . $lang->execution->computeCFD, 'hiddenwin', "title='{$lang->execution->computeCFD}' class='btn btn-primary' id='computeCFD'"); echo '
'; } + $weekend = $withWeekend == 'true' ? 'noweekend' : 'withweekend'; + echo html::a('#', $lang->execution->$weekend, '', "class='btn btn-link' id='weekend'"); ?>
execution->cfdTypeList, $type, "class='form-control chosen'");?>