* adjust code and fix bugs.

This commit is contained in:
wyd621
2013-08-06 16:11:11 +08:00
parent 0fdf9dd1ec
commit 500858eb5e
4 changed files with 22 additions and 11 deletions
+10 -8
View File
@@ -163,18 +163,20 @@ class common extends control
if(empty($method)) $method = $app->getMethodName();
$className = 'header';
if(strpos($orderBy, $fieldName) !== false)
$order = explode('_', $orderBy);
$order[0] = trim($order[0], '`');
if($order[0] == $fieldName)
{
if(stripos($orderBy, 'desc') !== false)
if(isset($order[1]) and $order[1] == 'asc')
{
$orderBy = str_ireplace('desc', 'asc', $orderBy);
$className = 'headerSortUp';
}
elseif(stripos($orderBy, 'asc') !== false)
{
$orderBy = str_ireplace('asc', 'desc', $orderBy);
$orderBy = "`{$order[0]}`_desc";
$className = 'headerSortDown';
}
else
{
$orderBy = "`{$order[0]}`_asc";
$className = 'headerSortUp';
}
}
else
{
+10 -1
View File
@@ -45,9 +45,18 @@ class productplan extends control
$this->commonAction($product);
$lastPlan = $this->productplan->getLast($product);
if($lastPlan)
{
$timestamp = strtotime($lastPlan->end);
$weekday = date('w', $timestamp);
$delta = 1;
if($weekday == '5' or $weekday == '6') $delta = 8 - $weekday;
$begin = date('Y-m-d', strtotime("+$delta days", $timestamp));
}
$this->view->begin = $lastPlan ? $begin : '';
$this->view->title = $this->view->product->name . $this->lang->colon . $this->lang->productplan->create;
$this->view->begin = $lastPlan ? $lastPlan->end : '';
$this->display();
}
+1 -1
View File
@@ -121,7 +121,7 @@ $(function ()
series: {lines:{show: true, lineWidth: 2}, points: {show: true},hoverable: true},
legend: {noColumns: 1},
grid: { hoverable: true, clickable: true },
xaxis: { ticks:ticks, tickFormatter: function(val) {tick = new Date(dateList[val]);;if(dateList[val] != undefined){return (tick.getMonth() + 1) + '-' + tick.getDate()}else{return ''}}},
xaxis: { ticks:ticks, tickFormatter: function(val) {tick = new Date(dateList[val]);;if(dateList[val] != undefined){return tick.getDate() + '/' + (tick.getMonth() + 1)}else{return ''}}},
yaxis: {mode: null, min: 0, minTickSize: [1, "day"]}};
var placeholder = $("#placeholder");
+1 -1
View File
@@ -1,7 +1,7 @@
<?php include '../../common/view/header.lite.html.php';?>
<form method='post' enctype='multipart/form-data' target='hiddenwin'>
<table class='table-1 mt-10px'>
<caption><?php echo $lang->testcase->importCase?></caption>
<caption><?php echo $lang->testcase->import?></caption>
<tr>
<td align='center'>
<input type='file' name='file'/>