* now ie6 suport auto width.

This commit is contained in:
wangchunsheng
2009-12-25 13:10:37 +00:00
parent f8bea3e563
commit af3ccff283
3 changed files with 10 additions and 6 deletions

View File

@@ -36,7 +36,7 @@ class index extends control
public function index()
{
$this->loadModel('report');
$header['title'] = $this->lang->index->common;
$this->view->header->title = $this->lang->index->common;
$products = array_values($this->product->getList());
$burns = array();
@@ -44,14 +44,14 @@ class index extends control
foreach($projects as $project)
{
$dataXML = $this->report->createSingleXML($this->project->getBurnData($project->id), $this->lang->project->charts->burn->graph);
$burns[$project->id] = $this->report->createJSChart('line', $dataXML, 300, 200);
$burns[$project->id] = $this->report->createJSChart('line', $dataXML, 'auto', 200);
}
$projectGroups = array_chunk($projects, 3);
$this->assign('header', $header);
$this->assign('projectGroups', $projectGroups);
$this->assign('products', $products);
$this->assign('burns', $burns);
$this->view->projectGroups = $projectGroups;
$this->view->products = $products;
$this->view->burns = $burns;
$this->view->counts = count($project);
$this->display();
}

View File

@@ -79,4 +79,5 @@
</div>
</div>
-->
<script language='Javascript'><?php for($i = 1; $i <= $counts; $i ++) echo "createChart$i();"; ?></script>
<?php include '../../common/footer.html.php';?>

View File

@@ -58,11 +58,14 @@ EOT;
$js
<div id="$divID"></div>
<script language="JavaScript">
function createChart$count()
{
chartWidth = "$width";
if(chartWidth == 'auto') chartWidth = $('#$divID').width();
var $chartID = new FusionCharts("$chartRoot$swfFile", "{$chartID}id", chartWidth, "$height");
$chartID.setDataXML("$dataXML");
$chartID.render("$divID");
}
</script>
EOT;
}