From e6bef8b54269e31feac374f78fcb664c739f8292 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Thu, 3 May 2018 16:05:44 +0800 Subject: [PATCH] * adjust for task #3947. --- module/project/css/burn.css | 10 ++++-- module/project/js/burn.js | 3 -- module/project/lang/en.php | 2 +- module/project/lang/zh-cn.php | 13 ++------ module/project/model.php | 2 +- module/project/view/burn.html.php | 53 ++++++++++++++++++++++--------- 6 files changed, 50 insertions(+), 33 deletions(-) diff --git a/module/project/css/burn.css b/module/project/css/burn.css index 8f8e93dccf..92309bad0f 100644 --- a/module/project/css/burn.css +++ b/module/project/css/burn.css @@ -1,3 +1,7 @@ -.mw-220px {max-width: 220px!important} -#interval{margin-right:10px;} -.canvas-wrapper {padding: 15px; border: 1px solid #ddd;} +.main-content > h2 {font-size: 18px;} +#burnWrapper {max-width: 1200px; margin: 0 auto; padding: 25px 100px 10px; position: relative;} +#burnYUnit {position: absolute; color: #CBD0DB; top: 0; left: 90px;} +#burnLegend {position: absolute; right: 0; width: 80px; height: 60px; top: 50%; margin-top: -30px; line-height: 30px; color: #838A9D; font-size: 12px;} +#burnLegend > div {position: relative; padding-left: 30px;} +#burnLegend > div:before {content: ' '; display: block; position: absolute; width: 20px; left: 0; top: 13px; height: 3px; background: #EEEEEE;} +#burnLegend > div.line-real:before {background: #006AF1;} diff --git a/module/project/js/burn.js b/module/project/js/burn.js index 346943a368..856d8f544f 100644 --- a/module/project/js/burn.js +++ b/module/project/js/burn.js @@ -1,9 +1,6 @@ $(function() { initBurnChar(); - - $('#burnTab').addClass('active'); - $('#interval').change(function() { location.href = createLink('project', 'burn', 'projectID=' + projectID + '&type=' + type + '&interval=' + $(this).val()); diff --git a/module/project/lang/en.php b/module/project/lang/en.php index 611cf69ad7..19275e8fc9 100644 --- a/module/project/lang/en.php +++ b/module/project/lang/en.php @@ -199,7 +199,7 @@ $lang->project->timeSummary = '
Tasks %s
Wait %s   Doing %s
Est. %s
Cost %s   Left %s
"; $lang->project->wbs = "Decompose Task"; $lang->project->batchWBS = "Batch Decompose"; -$lang->project->howToUpdateBurn = "Help"; +$lang->project->howToUpdateBurn = "Help "; $lang->project->whyNoStories = "No Story can be linked. Please check whether there is Story in {$lang->projectCommon} linked {$lang->productCommon} and make sure it has been reviewed."; $lang->project->productStories = "{$lang->projectCommon} linked story is the subeset of {$lang->productCommon}, which can only be linked after review. Please Link Story。"; $lang->project->doneProjects = 'Done'; diff --git a/module/project/lang/zh-cn.php b/module/project/lang/zh-cn.php index b5fe491801..4620adaa74 100644 --- a/module/project/lang/zh-cn.php +++ b/module/project/lang/zh-cn.php @@ -205,7 +205,7 @@ $lang->project->timeSummary = '
总任务 %s
未开始 %s   进行中 %s
总预计 %s
已消耗 %s   剩余 %s
"; $lang->project->wbs = "分解任务"; $lang->project->batchWBS = "批量分解"; -$lang->project->howToUpdateBurn = "帮助"; +$lang->project->howToUpdateBurn = "帮助 "; $lang->project->whyNoStories = "看起来没有需求可以关联。请检查下{$lang->projectCommon}关联的{$lang->productCommon}中有没有需求,而且要确保它们已经审核通过。"; $lang->project->productStories = "{$lang->projectCommon}关联的需求是{$lang->productCommon}需求的子集,并且只有评审通过的需求才能关联。请关联需求。"; $lang->project->doneProjects = '已结束'; @@ -244,15 +244,8 @@ $lang->project->fixFirstWithLeft = '修改剩余工时'; /* 统计。*/ $lang->project->charts = new stdclass(); $lang->project->charts->burn = new stdclass(); -$lang->project->charts->burn->graph = new stdclass(); -$lang->project->charts->burn->graph->caption = "燃尽图"; -$lang->project->charts->burn->graph->xAxisName = "日期"; -$lang->project->charts->burn->graph->yAxisName = "HOUR"; -$lang->project->charts->burn->graph->baseFontSize = 12; -$lang->project->charts->burn->graph->formatNumber = 0; -$lang->project->charts->burn->graph->animation = 0; -$lang->project->charts->burn->graph->rotateNames = 1; -$lang->project->charts->burn->graph->showValues = 0; +$lang->project->charts->burn->real = '实际'; +$lang->project->charts->burn->ref = '参考'; $lang->project->placeholder = new stdclass(); $lang->project->placeholder->code = '团队内部的简称'; diff --git a/module/project/model.php b/module/project/model.php index 477d5a3f06..53fad017dc 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -2457,7 +2457,7 @@ class projectModel extends model $days = count($dateList) - 1; $rate = $firstTime / $days; $baselineJSON = '['; - foreach($dateList as $i => $date) $baselineJSON .= ($days - $i) * $rate . ','; + foreach($dateList as $i => $date) $baselineJSON .= round(($days - $i) * $rate, 1) . ','; $baselineJSON = rtrim($baselineJSON, ',') . ']'; $chartData['labels'] = $this->report->convertFormat($dateList, 'j/n'); diff --git a/module/project/view/burn.html.php b/module/project/view/burn.html.php index 97787a6295..f3d57ea44d 100644 --- a/module/project/view/burn.html.php +++ b/module/project/view/burn.html.php @@ -18,7 +18,8 @@
project->computeBurn, 'hiddenwin', "title='{$lang->project->computeBurn}{$lang->project->burn}' class='btn btn-primary' id='computeBurn'"); + common::printLink('project', 'computeBurn', 'reload=yes', ' ' . $lang->project->computeBurn, 'hiddenwin', "title='{$lang->project->computeBurn}{$lang->project->burn}' class='btn btn-primary' id='computeBurn'"); + echo '
'; echo html::a($this->createLink('project', 'burn', "projectID=$projectID&type=$weekend&interval=$interval"), $lang->project->$weekend, '', "class='btn btn-link'"); common::printLink('project', 'fixFirst', "project=$project->id", $lang->project->fixFirst, '', "class='btn btn-link iframe' data-width='600'"); echo $lang->project->howToUpdateBurn; @@ -30,9 +31,18 @@
-
-

lang->project->burn;?>

-
+
+

lang->project->burn;?>

+
+
+ +
+
project->workHour})";?>
+
+
project->charts->burn->ref;?>
+
project->charts->burn->real;?>
+
+