Merge branch 'master' of github.com:easysoft/zentaopms

This commit is contained in:
wangyidong
2014-06-18 03:03:47 +00:00
9 changed files with 27 additions and 12 deletions
+3 -2
View File
@@ -213,12 +213,13 @@ class bugModel extends model
/**
* getActiveBugs
*
* @param object $pager
* @param array $products
* @param int $projectID
* @param object $pager
* @access public
* @return array
*/
public function getActiveBugs($pager, $projectID, $products)
public function getActiveBugs($products, $projectID, $pager = null)
{
return $this->dao->select('*')->from(TABLE_BUG)
->where('status')->eq('active')
+2 -1
View File
@@ -96,6 +96,7 @@ class gitModel extends model
$this->printLog("start from revision $savedRevision");
$logs = $this->getRepoLogs($repo, $savedRevision);
$this->printLog("get " . count($logs) . " logs");
if(empty($logs)) continue;
$this->printLog('begin parsing logs');
$latestRevision = $logs[0]->revision;
@@ -253,7 +254,7 @@ class gitModel extends model
exec($cmd, $list, $return);
if(!$list and $return) die("Some error occers: \nThe command is $cmd\n");
if(!$list and !$return) exit;
if(!$list and !$return) return array();
/* Process logs. */
$logs = array();
+1 -1
View File
@@ -352,7 +352,7 @@ class productplan extends control
{
$projects = $this->loadModel('project')->getPairs();
$projects[0] = '';
$allBugs= $this->loadModel('bug')->getAllBugs($this->view->product->id, $projects, 'id_desc');
$allBugs= $this->bug->getActiveBugs($this->view->product->id, $projects);
}
$this->view->title = $plan->title . $this->lang->colon . $this->lang->productplan->linkBug;
+1 -3
View File
@@ -30,7 +30,6 @@
<tr class='colhead'>
<th class='w-id {sorter:"currency"}'><?php echo $lang->idAB;?></th>
<th class='w-pri'> <?php echo $lang->priAB;?></th>
<th class='w-200px'> <?php echo $lang->bug->plan;?></th>
<th> <?php echo $lang->bug->title;?></th>
<th class='w-user'> <?php echo $lang->openedByAB;?></th>
<th class='w-user'> <?php echo $lang->assignedToAB;?></th>
@@ -49,7 +48,6 @@
<?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), $bug->id);?>
</td>
<td><span class='<?php echo 'pri' . $bug->pri;?>'><?php echo $bug->pri?></span></td>
<td><?php echo $bug->planTitle;?></td>
<td class='text-left nobr'><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), $bug->title);?></td>
<td><?php echo $users[$bug->openedBy];?></td>
<td><?php echo $users[$bug->assignedTo];?></td>
@@ -59,7 +57,7 @@
</tbody>
<tfoot>
<tr>
<td colspan='7' class='text-left'>
<td colspan='6' class='text-left'>
<?php if(count($allBugs)) echo "<div class='table-actions clearfix'><div class='btn-group'>" . html::selectAll('unlinkedBugsForm') . html::selectReverse('unlinkedBugsForm') . '</div>' . html::submitButton($lang->productplan->linkBug) . '</div>';?>
</td>
</tr>
+1 -1
View File
@@ -417,7 +417,7 @@ class project extends control
$bugs = array();
if($browseType != "bysearch")
{
$bugs = $this->bug->getActiveBugs($pager, $projectID, array_keys($products));
$bugs = $this->bug->getActiveBugs(array_keys($products), $projectID, $pager);
}
else
{
+1 -1
View File
@@ -87,7 +87,7 @@
<th><?php echo $lang->task->mailto;?></th>
<td colspan='2'>
<?php
echo html::select('mailto[]', $users, str_replace(' ', '', $task->mailto), "multiple class='form-control'");
echo html::select('mailto[]', $members, str_replace(' ', '', $task->mailto), "multiple class='form-control'");
if($contactLists) echo html::select('', $contactLists, '', "class='form-control' onchange=\"setMailto('mailto', this.value)\"");
?>
</td>
+14
View File
@@ -12,3 +12,17 @@ function updateAction(date)
link = createLink('todo', 'batchCreate', 'date=' + date);
location.href=link;
}
function switchDateList(number)
{
if($('#switchDate' + number).attr('checked') == 'checked')
{
$('#begins' + number).attr('disabled', 'disabled');
$('#ends' + number).attr('disabled', 'disabled');
}
else
{
$('#begins' + number).removeAttr('disabled');
$('#ends' + number).removeAttr('disabled');
}
}
+2 -2
View File
@@ -71,8 +71,8 @@ class todoModel extends model
$todo->pri = $todos->pris[$i];
$todo->name = isset($todos->names[$i]) ? htmlspecialchars($todos->names[$i]) : '';
$todo->desc = htmlspecialchars($todos->descs[$i]);
$todo->begin = $todos->begins[$i];
$todo->end = $todos->ends[$i];
$todo->begin = isset($todos->begins[$i]) ? $todos->begins[$i] : 2400;
$todo->end = isset($todos->ends[$i]) ? $todos->ends[$i] : 2400;
$todo->status = "wait";
$todo->private = 0;
$todo->idvalue = 0;
+2 -1
View File
@@ -32,7 +32,7 @@
<th class='w-80px'><?php echo $lang->todo->pri;?></th>
<th class='w-p40 red'><?php echo $lang->todo->name;?></th>
<th><?php echo $lang->todo->desc;?></th>
<th class='w-200px'><?php echo $lang->todo->beginAndEnd;?></th>
<th class='w-300ox'><?php echo $lang->todo->beginAndEnd;?></th>
</tr>
</thead>
<?php $pri = 3;?>
@@ -49,6 +49,7 @@
<td>
<div class='input-group'>
<?php echo html::select("begins[$i]", $times, $time, "onchange=\"setBeginsAndEnds($i, 'begin');\" class='form-control' style='width: 50%'") . html::select("ends[$i]", $times, '', "onchange=\"setBeginsAndEnds($i, 'end');\" class='form-control' style='width: 50%'");?>
<span class='input-group-addon'><input type='checkbox' name="switchDate[<?php echo $i?>]" id="switchDate<?php echo $i?>" onclick='switchDateList(<?php echo $i?>);'><?php echo $lang->todo->periods['future'];?></span>
</div>
</td>
</tr>