* change report UI.
This commit is contained in:
@@ -1003,7 +1003,7 @@ class task extends control
|
||||
$chartOption = $this->lang->task->report->$chart;
|
||||
$this->task->mergeChartOption($chart);
|
||||
|
||||
$this->view->charts[$chart] = $this->report->createJSChart($chartOption->swf, $chartXML, $chartOption->width, $chartOption->height);
|
||||
$this->view->charts[$chart] = $chartOption;
|
||||
$this->view->datas[$chart] = $this->report->computePercent($chartData);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
$(function()
|
||||
{
|
||||
var resizeChartTable = function()
|
||||
{
|
||||
$('.table-wrapper').each(function()
|
||||
{
|
||||
var $this = $(this);
|
||||
$this.css('max-height', $this.closest('.table').find('.chart-wrapper').outerHeight());
|
||||
});
|
||||
};
|
||||
resizeChartTable();
|
||||
$(window).resize(resizeChartTable);
|
||||
});
|
||||
|
||||
+4
-15
@@ -182,18 +182,9 @@ $lang->task->report->charts['finishedTasksPerDay'] = 'Finished tasks per day';
|
||||
|
||||
$lang->task->report->options = new stdclass();
|
||||
$lang->task->report->options->graph = new stdclass();
|
||||
$lang->task->report->options->swf = 'pie2d';
|
||||
$lang->task->report->options->width = 'auto';
|
||||
$lang->task->report->options->height = 300;
|
||||
$lang->task->report->options->graph->baseFontSize = 12;
|
||||
$lang->task->report->options->graph->showNames = 1;
|
||||
$lang->task->report->options->graph->formatNumber = 1;
|
||||
$lang->task->report->options->graph->decimalPrecision = 0;
|
||||
$lang->task->report->options->graph->animation = 0;
|
||||
$lang->task->report->options->graph->rotateNames = 0;
|
||||
$lang->task->report->options->graph->yAxisName = 'COUNT';
|
||||
$lang->task->report->options->graph->pieRadius = 100;
|
||||
$lang->task->report->options->graph->showColumnShadow = 0;
|
||||
$lang->task->report->options->type = 'pie';
|
||||
$lang->task->report->options->width = 500;
|
||||
$lang->task->report->options->height = 140;
|
||||
|
||||
$lang->task->report->tasksPerProject = new stdclass();
|
||||
$lang->task->report->tasksPerModule = new stdclass();
|
||||
@@ -250,9 +241,7 @@ $lang->task->report->tasksPerConsumed->graph->xAxisName = 'Time';
|
||||
$lang->task->report->tasksPerFinishedBy->graph->xAxisName = 'User';
|
||||
$lang->task->report->tasksPerClosedReason->graph->xAxisName = 'Closed Reason';
|
||||
|
||||
$lang->task->report->finishedTasksPerDay->swf = 'column2d';
|
||||
$lang->task->report->finishedTasksPerDay->height = 400;
|
||||
$lang->task->report->finishedTasksPerDay->type = 'bar';
|
||||
$lang->task->report->finishedTasksPerDay->graph->xAxisName = 'Date';
|
||||
$lang->task->report->finishedTasksPerDay->graph->rotateNames = '1';
|
||||
|
||||
$lang->task->estimateTip = 'The estimated time for this task';
|
||||
|
||||
@@ -182,18 +182,9 @@ $lang->task->report->charts['finishedTasksPerDay'] = '每天完成统计';
|
||||
|
||||
$lang->task->report->options = new stdclass();
|
||||
$lang->task->report->options->graph = new stdclass();
|
||||
$lang->task->report->options->swf = 'pie2d';
|
||||
$lang->task->report->options->width = 'auto';
|
||||
$lang->task->report->options->height = 300;
|
||||
$lang->task->report->options->graph->baseFontSize = 12;
|
||||
$lang->task->report->options->graph->showNames = 1;
|
||||
$lang->task->report->options->graph->formatNumber = 1;
|
||||
$lang->task->report->options->graph->decimalPrecision = 0;
|
||||
$lang->task->report->options->graph->animation = 0;
|
||||
$lang->task->report->options->graph->rotateNames = 0;
|
||||
$lang->task->report->options->graph->yAxisName = 'COUNT';
|
||||
$lang->task->report->options->graph->pieRadius = 100; // 饼图直径。
|
||||
$lang->task->report->options->graph->showColumnShadow = 0; // 是否显示柱状图阴影。
|
||||
$lang->task->report->options->type = 'pie';
|
||||
$lang->task->report->options->width = 500;
|
||||
$lang->task->report->options->height = 140;
|
||||
|
||||
$lang->task->report->tasksPerProject = new stdclass();
|
||||
$lang->task->report->tasksPerModule = new stdclass();
|
||||
@@ -250,9 +241,7 @@ $lang->task->report->tasksPerConsumed->graph->xAxisName = '时间';
|
||||
$lang->task->report->tasksPerFinishedBy->graph->xAxisName = '用户';
|
||||
$lang->task->report->tasksPerClosedReason->graph->xAxisName = '关闭原因';
|
||||
|
||||
$lang->task->report->finishedTasksPerDay->swf = 'column2d';
|
||||
$lang->task->report->finishedTasksPerDay->height = 400;
|
||||
$lang->task->report->finishedTasksPerDay->type = 'bar';
|
||||
$lang->task->report->finishedTasksPerDay->graph->xAxisName = '日期';
|
||||
$lang->task->report->finishedTasksPerDay->graph->rotateNames = '1';
|
||||
|
||||
$lang->task->estimateTip = '对该任务最初的预计';
|
||||
|
||||
@@ -1113,7 +1113,7 @@ class taskModel extends model
|
||||
$commonOption = $this->lang->task->report->options;
|
||||
|
||||
$chartOption->graph->caption = $this->lang->task->report->charts[$chartType];
|
||||
if(!isset($chartOption->swf)) $chartOption->swf = $commonOption->swf;
|
||||
if(!isset($chartOption->type)) $chartOption->type = $commonOption->type;
|
||||
if(!isset($chartOption->width)) $chartOption->width = $commonOption->width;
|
||||
if(!isset($chartOption->height)) $chartOption->height = $commonOption->height;
|
||||
|
||||
|
||||
@@ -44,23 +44,22 @@
|
||||
<strong><?php echo $lang->task->report->common;?></strong>
|
||||
</div>
|
||||
<table class='table active-disabled'>
|
||||
<?php foreach($charts as $chartType => $chartContent):?>
|
||||
<?php foreach($charts as $chartType => $chartOption):?>
|
||||
<tr class='text-top'>
|
||||
<td>
|
||||
<div class='chart-wrapper text-center'>
|
||||
<h5><?php echo $lang->task->report->charts[$chartType];?></h5>
|
||||
<div class='chart-canvas'><canvas id='chart-<?php echo $chartType ?>' width='500' height='140' data-responsive='true'></canvas></div>
|
||||
<div class='chart-canvas'><canvas id='chart-<?php echo $chartType ?>' width='<?php echo $chartOption->width;?>' height='<?php echo $chartOption->height;?>' data-responsive='true'></canvas></div>
|
||||
</div>
|
||||
</td>
|
||||
<td style='width: 320px'>
|
||||
<?php $height = zget($lang->task->report->$chartType, 'height', $lang->story->report->options->height) . 'px'; ?>
|
||||
<div style="max-height:<?php echo $height;?>; overflow:auto;">
|
||||
<table class='table table-condensed table-hover table-striped table-bordered table-chart' data-chart='pie' data-target='#chart-<?php echo $chartType ?>' data-animation='false'>
|
||||
<div style="overflow:auto;" class='table-wrapper'>
|
||||
<table class='table table-condensed table-hover table-striped table-bordered table-chart' data-chart='<?php echo $chartOption->type; ?>' data-target='#chart-<?php echo $chartType ?>' data-animation='false'>
|
||||
<caption class='text-left'><?php echo $lang->task->report->charts[$chartType];?></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='w-20px'></th>
|
||||
<th><?php echo $lang->task->report->$chartType->item;?></th>
|
||||
<th class='chart-label'><?php echo $lang->task->report->$chartType->item;?></th>
|
||||
<th><?php echo $lang->task->report->value;?></th>
|
||||
<th><?php echo $lang->report->percent;?></th>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user