From 8333de56783266305ea65b01eb6c274be38b490b Mon Sep 17 00:00:00 2001 From: "shiyangyangwork@yahoo.cn" Date: Sun, 18 Sep 2011 09:07:44 +0000 Subject: [PATCH] + adjust code for burn by flot. --- module/project/model.php | 3 +- module/project/view/burn.html.php | 1 - module/report/model.php | 7 +- www/js/jquery/flot/jquery.flot.js | 2599 -------- www/js/jquery/flot/jquery.flot.min.js | 6 + www/js/jquery/flot/jquery.js | 8316 ------------------------- 6 files changed, 11 insertions(+), 10921 deletions(-) delete mode 100755 www/js/jquery/flot/jquery.flot.js create mode 100755 www/js/jquery/flot/jquery.flot.min.js delete mode 100755 www/js/jquery/flot/jquery.js diff --git a/module/project/model.php b/module/project/model.php index 6810d04af2..c928479bd5 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -293,7 +293,8 @@ class projectModel extends model $hour->totalEstimate = round($hour->totalEstimate, 1); $hour->totalConsumed = round($hour->totalConsumed, 1); $hour->totalLeft = round($hour->totalLeft, 1); - $hour->progress = round($hour->totalConsumed / ($hour->totalConsumed + $hour->totalLeft), 3) * 100; + $hour->totalReal = $hour->totalConsumed + $hour->totalLeft; + $hour->progress = $hour->totalReal ? round($hour->totalConsumed / $hour->totalReal, 3) * 100 : 0; } /* Get tasks stats group by status. */ diff --git a/module/project/view/burn.html.php b/module/project/view/burn.html.php index 7769725e8c..aa7b12e30d 100644 --- a/module/project/view/burn.html.php +++ b/module/project/view/burn.html.php @@ -18,5 +18,4 @@ printf($lang->project->howToUpdateBurn, $this->createLink('help', 'field', 'module=project&method-burn&field=updateburn')); ?> - diff --git a/module/report/model.php b/module/report/model.php index e8bd96211e..f91537813a 100644 --- a/module/report/model.php +++ b/module/report/model.php @@ -85,14 +85,13 @@ EOT; $height = $height . 'px'; return << - - +

$projectName {$this->lang->project->burn}