* Set hidden status in pages.
This commit is contained in:
@@ -27,14 +27,18 @@
|
||||
<form method='post' enctype='multipart/form-data' target='hiddenwin'>
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th class='w-70px'><?php echo $lang->bug->assignedTo;?></th>
|
||||
<th class='w-80px'><?php echo $lang->bug->assignedTo;?></th>
|
||||
<td class='w-p25-f'><?php echo html::select('assignedTo', $users, $bug->resolvedBy, "class='form-control chosen'");?></td><td></td>
|
||||
</tr>
|
||||
<tr class='hide'>
|
||||
<th><?php echo $lang->bug->status;?></th>
|
||||
<td><?php echo html::hidden('status', 'active');?></td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields($bug, 'table', 'columns=1');?>
|
||||
<tr>
|
||||
<th><?php echo $lang->bug->openedBuild;?></th>
|
||||
<td colspan='2'><?php echo html::select('openedBuild[]', $builds, $bug->openedBuild, 'size=4 multiple=multiple class="form-control chosen"');?></td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields($bug, 'table', 'columns=2');?>
|
||||
<tr>
|
||||
<th><?php echo $lang->comment;?></th>
|
||||
<td colspan='2'><?php echo html::textarea('comment', '', "rows='6' class='form-control'");?></td>
|
||||
|
||||
@@ -34,11 +34,15 @@ js::set('page', 'assignedto');
|
||||
<th class='w-80px'><?php echo $lang->bug->assignBug;?></th>
|
||||
<td class='w-p25-f'><?php echo html::select('assignedTo', $users, $bug->assignedTo, "class='form-control chosen'");?></td><td></td>
|
||||
</tr>
|
||||
<tr class='hide'>
|
||||
<th><?php echo $lang->bug->status;?></th>
|
||||
<td><?php echo html::hidden('status', $bug->status);?></td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields($bug, 'table', 'columns=1');?>
|
||||
<tr>
|
||||
<th><?php echo $lang->bug->mailto;?></th>
|
||||
<td colspan='2'><?php echo html::select('mailto[]', $users, str_replace(' ', '', $bug->mailto), 'class="form-control chosen" multiple');?></td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields($bug, 'table', 'columns=2');?>
|
||||
<tr>
|
||||
<th><?php echo $lang->comment;?></th>
|
||||
<td colspan='2'><?php echo html::textarea('comment', '', "rows='6' class='form-control'");?></td>
|
||||
|
||||
@@ -26,6 +26,10 @@
|
||||
</div>
|
||||
<form method='post' target='hiddenwin'>
|
||||
<table class='table table-form'>
|
||||
<tr class='hide'>
|
||||
<th class='w-60px'><?php echo $lang->bug->status;?></th>
|
||||
<td><?php echo html::hidden('status', 'closed');?></td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields($bug, 'table', 'columns=1');?>
|
||||
<tr>
|
||||
<th class='w-60px'><?php echo $lang->comment;?></th>
|
||||
|
||||
@@ -45,11 +45,16 @@ js::set('page', 'confirmbug');
|
||||
<td><?php echo html::select('pri', $lang->bug->priList, $bug->pri, "class='form-control chosen'");?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class='hide'>
|
||||
<th><?php echo $lang->bug->status;?></th>
|
||||
<td><?php echo html::hidden('status', $bug->status);?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields($bug, 'table', 'columns=1');?>
|
||||
<tr>
|
||||
<th><?php echo $lang->bug->mailto;?></th>
|
||||
<td colspan='2'><?php echo html::select('mailto[]', $users, str_replace(' ' , '', $bug->mailto), 'class="form-control chosen" multiple');?></td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields($bug, 'table', 'columns=2');?>
|
||||
<tr>
|
||||
<th><?php echo $lang->comment;?></th>
|
||||
<td colspan='2'><?php echo html::textarea('comment', '', "rows='6' class='w-p94'");?></td>
|
||||
|
||||
@@ -288,7 +288,11 @@ js::set('flow', $config->global->flow);
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php $this->printExtendFields('', 'table', 'columns=2');?>
|
||||
<tr class='hide'>
|
||||
<th><?php echo $lang->bug->status;?></th>
|
||||
<td><?php echo html::hidden('status');?></td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields('', 'table', 'columns=1');?>
|
||||
<tr>
|
||||
<th><?php echo $lang->bug->files;?></th>
|
||||
<td colspan='2'><?php echo $this->fetch('file', 'buildform', 'fileCount=1&percent=0.85');?></td>
|
||||
|
||||
@@ -73,6 +73,10 @@ js::set('productID' , $bug->product);
|
||||
<th><?php echo $lang->bug->assignedTo;?></th>
|
||||
<td><?php echo html::select('assignedTo', $users, $assignedTo, "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<tr class='hide'>
|
||||
<th><?php echo $lang->bug->status;?></th>
|
||||
<td><?php echo html::hidden('status', 'resolved');?></td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields($bug, 'table', 'columns=1');?>
|
||||
<tr>
|
||||
<th><?php echo $lang->bug->files;?></th>
|
||||
|
||||
@@ -376,7 +376,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php $this->printExtendFields($bug, 'div', "position=right&divCell=true");?>
|
||||
<?php $this->printExtendFields($bug, 'div', "position=right&mode=value");?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -24,7 +24,11 @@
|
||||
</div>
|
||||
<form class='load-indicator main-form' method='post' target='hiddenwin'>
|
||||
<table class='table table-form'>
|
||||
<?php $this->printExtendFields($product, 'table', 'columns=2');?>
|
||||
<tr class='hide'>
|
||||
<th class='w-40px'><?php echo $lang->product->status;?></th>
|
||||
<td><?php echo html::hidden('status', $product->status);?></td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields($product, 'table', 'columns=1');?>
|
||||
<tr>
|
||||
<th class='w-40px'><?php echo $lang->comment;?></th>
|
||||
<td><?php echo html::textarea('comment', '', "rows='6' class='form-control kindeditor' hidefocus='true'");?></td>
|
||||
|
||||
@@ -61,6 +61,12 @@
|
||||
<?php echo html::select('type', $productTypeList, 'normal', "class='form-control'");?>
|
||||
</td><td></td>
|
||||
</tr>
|
||||
<tr class='hide'>
|
||||
<th><?php echo $lang->product->status;?></th>
|
||||
<td><?php echo html::hidden('status', 'normal');?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields('', 'table', 'columns=1');?>
|
||||
<tr>
|
||||
<th><?php echo $lang->product->desc;?></th>
|
||||
<td colspan='2'>
|
||||
@@ -68,7 +74,6 @@
|
||||
<?php echo html::textarea('desc', '', "rows='8' class='form-control kindeditor' hidefocus='true' tabindex=''");?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields('', 'table', 'columns=2');?>
|
||||
<tr>
|
||||
<th><?php echo $lang->product->acl;?></th>
|
||||
<td colspan='2'><?php echo nl2br(html::radio('acl', $lang->product->aclList, 'open', "onclick='setWhite(this.value);'", 'block'));?></td>
|
||||
|
||||
@@ -236,7 +236,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php $this->printExtendFields($product, 'div', "position=right&divCell=false");?>
|
||||
<?php $this->printExtendFields($product, 'div', "position=right&mode=value");?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -10,3 +10,4 @@
|
||||
|
||||
.block-dynamic .panel-body {height: 230px; overflow: auto; position: relative;}
|
||||
.block-team div.col-xs-6{white-space: nowrap; overflow: hidden;}
|
||||
html[lang^='zh-'] .thWidth {width: 80px !important;}
|
||||
|
||||
@@ -49,6 +49,10 @@
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class='hide'>
|
||||
<th><?php echo $lang->project->status;?></th>
|
||||
<td><?php echo html::hidden('status', 'doing');?></td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields($project, 'table', 'columns=5');?>
|
||||
<tr>
|
||||
<th><?php echo $lang->comment;?></th>
|
||||
|
||||
@@ -25,7 +25,11 @@
|
||||
<form class='load-indicator main-form' method='post' target='hiddenwin'>
|
||||
<table class='table table-form'>
|
||||
<tbody>
|
||||
<?php $this->printExtendFields($project, 'table', 'columns=2');?>
|
||||
<tr class='hide'>
|
||||
<th class='w-50px'><?php echo $lang->project->status;?></th>
|
||||
<td><?php echo html::hidden('status', 'closed');?></td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields($project, 'table', 'columns=1');?>
|
||||
<tr>
|
||||
<th class='w-50px'><?php echo $lang->comment;?></th>
|
||||
<td><?php echo html::textarea('comment', '', "rows='6' class='form-control kindeditor' hidefocus='true'");?></td>
|
||||
|
||||
@@ -86,6 +86,13 @@
|
||||
<td><?php echo html::select('type', $lang->project->typeList, '', "class='form-control' onchange='showTypeTips()'");?></td>
|
||||
<td class='muted' colspan='2'><div class='type-tips'><?php echo $lang->project->typeDesc;?></div></td>
|
||||
</tr>
|
||||
<tr class='hide'>
|
||||
<th><?php echo $lang->project->status;?></th>
|
||||
<td><?php echo html::hidden('status', 'wait');?></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields('', 'table', 'columns=1');?>
|
||||
<tr <?php if($config->global->flow == 'onlyTask') echo "class='hidden'";?>>
|
||||
<th><?php echo $lang->project->manageProducts;?></th>
|
||||
<td class='text-left' id='productsBox' colspan="3">
|
||||
@@ -139,7 +146,6 @@
|
||||
<?php echo html::textarea('desc', '', "rows='6' class='form-control kindeditor' hidefocus='true'");?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields('', 'table', 'columns=3');?>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->acl;?></th>
|
||||
<td colspan='3'><?php echo nl2br(html::radio('acl', $lang->project->aclList, $acl, "onclick='setWhite(this.value);'", 'block'));?></td>
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
<th><?php echo $lang->project->desc;?></th>
|
||||
<td colspan='2'><?php echo html::textarea('desc', htmlspecialchars($project->desc), "rows='6' class='form-control kindeditor' hidefocus='true'");?></td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields($project, 'table', 'columns=3');?>
|
||||
<?php $this->printExtendFields($project, 'table', 'columns=1');?>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->acl;?></th>
|
||||
<td colspan='2'><?php echo nl2br(html::radio('acl', $lang->project->aclList, $project->acl, "onclick='setWhite(this.value);'", 'block'));?></td>
|
||||
|
||||
@@ -55,6 +55,10 @@
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class='hide'>
|
||||
<th><?php echo $lang->project->status;?></th>
|
||||
<td><?php echo html::hidden('status', $project->status);?></td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields($project, 'table', 'columns=3');?>
|
||||
<tr>
|
||||
<th><?php echo $lang->comment;?></th>
|
||||
|
||||
@@ -24,7 +24,11 @@
|
||||
</div>
|
||||
<form class='load-indicator main-form' method='post' target='hiddenwin'>
|
||||
<table class='table table-form'>
|
||||
<?php $this->printExtendFields($project, 'table', 'columns=2');?>
|
||||
<tr class='hide'>
|
||||
<th><?php echo $lang->project->status;?></th>
|
||||
<td><?php echo html::hidden('status', 'suspended');?></td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields($project, 'table', 'columns=1');?>
|
||||
<tr>
|
||||
<th class='w-50px'><?php echo $lang->comment;?></th>
|
||||
<td><?php echo html::textarea('comment', '', "rows='6' class='form-control kindeditor' hidefocus='true'");?></td>
|
||||
|
||||
@@ -295,7 +295,7 @@
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<?php $this->printExtendFields($project, 'div', "position=right&divCell=false");?>
|
||||
<?php $this->printExtendFields($project, 'div', "position=right&mode=value");?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -30,20 +30,25 @@
|
||||
</div>
|
||||
<?php if($lastRelease) echo '(' . $lang->release->last . ': ' . $lastRelease->name . ')';?>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->release->build;?></th>
|
||||
<td><?php echo html::select('build', $builds, '', "class='form-control chosen'");?></td><td></td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->release->date;?></th>
|
||||
<td><?php echo html::input('date', helper::today(), "class='form-control form-date' required");?></td><td></td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr class='hide'>
|
||||
<th><?php echo $lang->release->status;?></th>
|
||||
<td><?php echo html::hidden('status', 'normal', "disabled");?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields('', 'table', 'columns=1');?>
|
||||
<tr>
|
||||
<th><?php echo $lang->release->desc;?></th>
|
||||
<td colspan='2'><?php echo html::textarea('desc', '', "rows='10' class='form-control kindeditor' hidefocus='true'");?></td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields('', 'table', 'columns=2');?>
|
||||
<tr>
|
||||
<th><?php echo $lang->files;?></th>
|
||||
<td colspan='2'><?php echo $this->fetch('file', 'buildform');?></td>
|
||||
|
||||
@@ -171,7 +171,7 @@
|
||||
<div class='detail-title'><?php echo $lang->story->legendLifeTime;?></div>
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th class='w-80px'><?php echo $lang->story->openedBy;?></th>
|
||||
<th class='thWidth'><?php echo $lang->story->openedBy;?></th>
|
||||
<td><?php echo zget($users, $story->openedBy);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.thWidth{width:85px !important;}
|
||||
.lifeThWidth{width:120px !important;}
|
||||
html[lang^='zh-'] .thWidth{width:70px !important;}
|
||||
html[lang^='zh-'] .lifeThWidth{width:70px !important;}
|
||||
html[lang^='zh-'] .thWidth{width:80px !important;}
|
||||
html[lang^='zh-'] .lifeThWidth{width:80px !important;}
|
||||
|
||||
@@ -6,3 +6,4 @@
|
||||
.effortThWidth{width:90px !important;}
|
||||
html[lang^='zh-'] #legendLife .thWidth{width:70px !important;}
|
||||
html[lang^='zh-'] .effortThWidth{width:70px !important;}
|
||||
html[lang^='zh-'] .thWidth{width:80px !important;}
|
||||
|
||||
@@ -40,6 +40,10 @@
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class='hide'>
|
||||
<th><?php echo $lang->task->status;?></th>
|
||||
<td><?php echo html::hidden('status', 'doing');?></td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields($task, 'table', 'columns=2');?>
|
||||
<tr>
|
||||
<th><?php echo $lang->comment;?></th>
|
||||
|
||||
@@ -43,6 +43,10 @@
|
||||
<td><div class='input-group'><?php echo html::input('left', $task->left, "class='form-control'");?> <span class='input-group-addon'><?php echo $lang->task->hour;?></span></div></td><td></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr class='hide'>
|
||||
<th><?php echo $lang->task->status;?></th>
|
||||
<td><?php echo html::hidden('status', $task->status);?></td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields($task, 'table', 'columns=2');?>
|
||||
<tr>
|
||||
<th><?php echo $lang->comment;?></th>
|
||||
|
||||
@@ -26,6 +26,10 @@
|
||||
|
||||
<form method='post' target='hiddenwin'>
|
||||
<table class='table table-form'>
|
||||
<tr class='w-50px hide'>
|
||||
<th><?php echo $lang->task->status;?></th>
|
||||
<td><?php echo html::hidden('status', 'cancel');?></td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields($task, 'table', 'columns=1');?>
|
||||
<tr>
|
||||
<th class='w-50px'><?php echo $lang->comment;?></th>
|
||||
|
||||
@@ -26,6 +26,10 @@
|
||||
|
||||
<form method='post' target='hiddenwin'>
|
||||
<table class='table table-form'>
|
||||
<tr class='hide'>
|
||||
<th><?php echo $lang->task->status;?></th>
|
||||
<td><?php echo html::hidden('status', 'closed');?></td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields($task, 'table', 'columns=1');?>
|
||||
<tr>
|
||||
<th class='w-50px'><?php echo $lang->comment;?></th>
|
||||
|
||||
@@ -59,6 +59,11 @@
|
||||
<button id='selectAllUser' type="button" class="btn btn-link<?php if($task->type !== 'affair') echo ' hidden';?>"><?php echo $lang->task->selectAllUser;?></button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class='hide'>
|
||||
<th><?php echo $lang->task->status;?></th>
|
||||
<td><?php echo html::hidden('status', 'wait');?></td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields('', 'table', 'columns=1');?>
|
||||
<?php if(strpos(",$showFields,", ',story,') !== false and $config->global->flow != 'onlyTask' and $project->type != 'ops'):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->task->story;?></th>
|
||||
@@ -205,7 +210,6 @@
|
||||
<?php echo html::textarea('desc', $task->desc, "rows='10' class='form-control'");?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields('', 'table', 'columns=3');?>
|
||||
<tr>
|
||||
<th><?php echo $lang->files;?></th>
|
||||
<td colspan='3'><?php echo $this->fetch('file', 'buildform');?></td>
|
||||
|
||||
@@ -69,6 +69,10 @@
|
||||
<th><?php echo $lang->task->finishedDate;?></th>
|
||||
<td><div class='datepicker-wrapper'><?php echo html::input('finishedDate', helper::today(), "class='form-control form-date'");?></div></td><td></td>
|
||||
</tr>
|
||||
<tr class='hide'>
|
||||
<th><?php echo $lang->task->status;?></th>
|
||||
<td><?php echo html::hidden('status', 'done');?></td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields($task, 'table', 'columns=2');?>
|
||||
<tr>
|
||||
<th><?php echo $lang->files;?></th>
|
||||
|
||||
@@ -34,6 +34,10 @@
|
||||
|
||||
<form method='post' target='hiddenwin'>
|
||||
<table class='table table-form'>
|
||||
<tr class='hide'>
|
||||
<th><?php echo $lang->task->status;?></th>
|
||||
<td><?php echo html::hidden('status', 'pause');?></td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields($task, 'table', 'columns=1');?>
|
||||
<tr>
|
||||
<th class='w-60px'><?php echo $lang->comment;?></th>
|
||||
|
||||
@@ -61,6 +61,10 @@
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class='hide'>
|
||||
<th><?php echo $lang->task->status;?></th>
|
||||
<td><?php echo html::hidden('status', 'doing');?></td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields($task, 'table', 'columns=2');?>
|
||||
<tr>
|
||||
<th><?php echo $lang->comment;?></th>
|
||||
|
||||
@@ -376,7 +376,7 @@
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
<?php $this->printExtendFields($task, 'div', "position=right&divCell=true");?>
|
||||
<?php $this->printExtendFields($task, 'div', "position=right&mode=value");?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1665,4 +1665,19 @@ class testcase extends control
|
||||
$moduleID = !empty($story) ? $story->module : 0;
|
||||
die(json_encode(array('moduleID'=> $moduleID)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get status by ajax.
|
||||
*
|
||||
* @param string $methodName
|
||||
* @param int $caseID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxGetStatus($methodName, $caseID = 0)
|
||||
{
|
||||
$status = $this->testcase->getStatus($methodName, $caseID);
|
||||
|
||||
die($status);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,4 +144,9 @@ $(function()
|
||||
var value = $select.val();
|
||||
$selector.find('.pri-text').html('<span class="label-pri label-pri-' + value + '" title="' + value + '">' + value + '</span>');
|
||||
});
|
||||
|
||||
$.get(createLink('testcase', 'ajaxGetStatus', 'methodName=create'), function(status)
|
||||
{
|
||||
$('#status').val(status).change();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -16,6 +16,21 @@ function getList()
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("#story").chosen();
|
||||
|
||||
$(document).on('change', '[name^=steps], [name^=expects]', function()
|
||||
{
|
||||
var steps = [];
|
||||
var expects = [];
|
||||
var status = $('#status').val();
|
||||
|
||||
$('[name^=steps]').each(function(){ steps.push($(this).val()); });
|
||||
$('[name^=expects]').each(function(){ expects.push($(this).val()); });
|
||||
|
||||
$.post(createLink('testcase', 'ajaxGetStatus', 'methodName=update&caseID=' + caseID), {status : status, steps : steps, expects : expects}, function(status)
|
||||
{
|
||||
$('#status').val(status).change();
|
||||
});
|
||||
});
|
||||
|
||||
initSteps();
|
||||
});
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
$(function()
|
||||
{
|
||||
$('#result').change(function()
|
||||
{
|
||||
$.post(createLink('testcase', 'ajaxGetStatus', 'methodName=review&caseID=' + caseID), {result : $(this).val()}, function(status)
|
||||
{
|
||||
$('#status').val(status).change();
|
||||
});
|
||||
});
|
||||
})
|
||||
+40
-10
@@ -183,9 +183,10 @@ class testcaseModel extends model
|
||||
*/
|
||||
function create($bugID)
|
||||
{
|
||||
$now = helper::now();
|
||||
$case = fixer::input('post')
|
||||
->add('status', $this->forceNotReview() || $this->post->forceNotReview ? 'normal' : 'wait')
|
||||
$now = helper::now();
|
||||
$status = $this->getStatus('create');
|
||||
$case = fixer::input('post')
|
||||
->add('status', $status)
|
||||
->add('version', 1)
|
||||
->add('fromBug', $bugID)
|
||||
->setDefault('openedBy', $this->app->user->account)
|
||||
@@ -608,12 +609,13 @@ class testcaseModel extends model
|
||||
* Update a case.
|
||||
*
|
||||
* @param int $caseID
|
||||
* @param bool $getStatus
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function update($caseID)
|
||||
public function update($caseID, $getStatus = false)
|
||||
{
|
||||
$oldCase = $this->getById($caseID);
|
||||
$oldCase = $this->getById($caseID);
|
||||
if(!empty($_POST['lastEditedDate']) and $oldCase->lastEditedDate != $this->post->lastEditedDate)
|
||||
{
|
||||
dao::$errors[] = $this->lang->error->editedByOther;
|
||||
@@ -659,12 +661,16 @@ class testcaseModel extends model
|
||||
->setIF($this->post->story != false and $this->post->story != $oldCase->story, 'storyVersion', $this->loadModel('story')->getVersion($this->post->story))
|
||||
->setDefault('lastEditedBy', $this->app->user->account)
|
||||
->add('lastEditedDate', $now)
|
||||
->setDefault('story,branch', 0)
|
||||
->setDefault('story,branch', 0)
|
||||
->join('stage', ',')
|
||||
->join('linkCase', ',')
|
||||
->remove('comment,steps,expects,files,labels,stepType')
|
||||
->get();
|
||||
if(!$this->forceNotReview() and $stepChanged) $case->status = 'wait';
|
||||
|
||||
/* Get status by ajax. */
|
||||
if($getStatus) return $case->status;
|
||||
|
||||
$this->dao->update(TABLE_CASE)->data($case)->autoCheck()->batchCheck($this->config->testcase->edit->requiredFields, 'notempty')->where('id')->eq((int)$caseID)->exec();
|
||||
if(!$this->dao->isError())
|
||||
{
|
||||
@@ -721,14 +727,14 @@ class testcaseModel extends model
|
||||
{
|
||||
if($this->post->result == false) die(js::alert($this->lang->testcase->mustChooseResult));
|
||||
|
||||
$oldCase = $this->dao->findById($caseID)->from(TABLE_CASE)->fetch();
|
||||
$now = helper::now();
|
||||
$case = fixer::input('post')
|
||||
$now = helper::now();
|
||||
$status = $this->getStatus('review', $caseID);
|
||||
$case = fixer::input('post')
|
||||
->remove('result,comment')
|
||||
->setDefault('reviewedDate', substr($now, 0, 10))
|
||||
->setDefault('lastEditedBy', $this->app->user->account)
|
||||
->setDefault('lastEditedDate', $now)
|
||||
->setIF($this->post->result == 'pass', 'status', 'normal')
|
||||
->setForce('status', $status)
|
||||
->join('reviewedBy', ',')
|
||||
->get();
|
||||
|
||||
@@ -1571,4 +1577,28 @@ class testcaseModel extends model
|
||||
|
||||
return sprintf($this->lang->testcase->summary, count($cases), $executed);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get status for different method.
|
||||
*
|
||||
* @param string $methodName
|
||||
* @param int $caseID
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getStatus($methodName, $caseID = 0)
|
||||
{
|
||||
$status = '';
|
||||
|
||||
if($methodName == 'create') $status = ($this->forceNotReview() || $this->post->forceNotReview) ? 'normal' : 'wait';
|
||||
if($methodName == 'update') $status = $this->update($caseID, $getStatus = true);
|
||||
if($methodName == 'review')
|
||||
{
|
||||
$case = $this->dao->findById($caseID)->from(TABLE_CASE)->fetch();
|
||||
if($case) $status = $case->status;
|
||||
if($this->post->result == 'pass') $status = 'normal';
|
||||
}
|
||||
|
||||
return $status;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -206,7 +206,11 @@
|
||||
<td colspan='2'><?php echo html::input('keywords', $keywords, "class='form-control'");?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php $this->printExtendFields('', 'table', 'columns=2');?>
|
||||
<tr class='hide'>
|
||||
<th><?php echo $lang->testcase->status;?></th>
|
||||
<td><?php echo html::hidden('status', 'normal');?></td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields('', 'table', 'columns=1');?>
|
||||
<tr>
|
||||
<th><?php echo $lang->testcase->files;?></th>
|
||||
<td colspan='2'><?php echo $this->fetch('file', 'buildform');?></td>
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
<?php js::set('lblDelete', $lang->testcase->deleteStep);?>
|
||||
<?php js::set('lblBefore', $lang->testcase->insertBefore);?>
|
||||
<?php js::set('lblAfter', $lang->testcase->insertAfter);?>
|
||||
<?php js::set('caseID', $case->id);?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
<?php include '../../common/view/chosen.html.php';?>
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<?php include '../../common/view/datepicker.html.php';?>
|
||||
<?php js::set('caseID', $case->id);?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
@@ -31,11 +32,15 @@
|
||||
<th><?php echo $lang->testcase->reviewResultAB;?></th>
|
||||
<td><?php echo html::select('result', $lang->testcase->reviewResultList, '', 'class=form-control');?></td><td></td>
|
||||
</tr>
|
||||
<tr class='hide'>
|
||||
<th><?php echo $lang->testcase->status;?></th>
|
||||
<td><?php echo html::hidden('status', $case->status);?></td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields($case, 'table', 'columns=1');?>
|
||||
<tr>
|
||||
<th><?php echo $lang->testcase->reviewedByAB;?></th>
|
||||
<td colspan='2'><?php echo html::select('reviewedBy[]', $users, $app->user->account, "class='form-control chosen' multiple");?></td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields($case, 'table', 'columns=2');?>
|
||||
<tr>
|
||||
<th><?php echo $lang->comment;?></th>
|
||||
<td colspan='2'><?php echo html::textarea('comment', '', "rows='8' class='form-control'");?></td>
|
||||
|
||||
@@ -230,7 +230,6 @@ class testtask extends control
|
||||
$this->view->build = $build;
|
||||
$this->view->stories = $stories;
|
||||
$this->view->bugs = $bugs;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -499,8 +498,6 @@ class testtask extends control
|
||||
*/
|
||||
public function start($taskID)
|
||||
{
|
||||
$actions = $this->loadModel('action')->getList('testtask', $taskID);
|
||||
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$changes = $this->testtask->start($taskID);
|
||||
@@ -529,7 +526,8 @@ class testtask extends control
|
||||
$this->view->title = $testtask->name . $this->lang->colon . $this->lang->testtask->start;
|
||||
$this->view->position[] = $this->lang->testtask->common;
|
||||
$this->view->position[] = $this->lang->testtask->start;
|
||||
$this->view->actions = $actions;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('nodeleted', $testtask->owner);
|
||||
$this->view->actions = $this->loadModel('action')->getList('testtask', $taskID);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -542,8 +540,6 @@ class testtask extends control
|
||||
*/
|
||||
public function activate($taskID)
|
||||
{
|
||||
$actions = $this->loadModel('action')->getList('testtask', $taskID);
|
||||
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$changes = $this->testtask->activate($taskID);
|
||||
@@ -572,7 +568,8 @@ class testtask extends control
|
||||
$this->view->title = $testtask->name . $this->lang->colon . $this->lang->testtask->start;
|
||||
$this->view->position[] = $this->lang->testtask->common;
|
||||
$this->view->position[] = $this->lang->testtask->activate;
|
||||
$this->view->actions = $actions;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('nodeleted', $testtask->owner);
|
||||
$this->view->actions = $this->loadModel('action')->getList('testtask', $taskID);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -585,8 +582,6 @@ class testtask extends control
|
||||
*/
|
||||
public function close($taskID)
|
||||
{
|
||||
$actions = $this->loadModel('action')->getList('testtask', $taskID);
|
||||
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$changes = $this->testtask->close($taskID);
|
||||
@@ -615,7 +610,7 @@ class testtask extends control
|
||||
$this->view->title = $testtask->name . $this->lang->colon . $this->lang->close;
|
||||
$this->view->position[] = $this->lang->testtask->common;
|
||||
$this->view->position[] = $this->lang->close;
|
||||
$this->view->actions = $actions;
|
||||
$this->view->actions = $this->loadModel('action')->getList('testtask', $taskID);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noclosed|nodeleted|qdfirst');
|
||||
$this->view->contactLists = $this->user->getContactLists($this->app->user->account, 'withnote');
|
||||
$this->display();
|
||||
@@ -630,8 +625,6 @@ class testtask extends control
|
||||
*/
|
||||
public function block($taskID)
|
||||
{
|
||||
$actions = $this->loadModel('action')->getList('testtask', $taskID);
|
||||
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$changes = $this->testtask->block($taskID);
|
||||
@@ -660,7 +653,8 @@ class testtask extends control
|
||||
$this->view->title = $testtask->name . $this->lang->colon . $this->lang->testtask->start;
|
||||
$this->view->position[] = $this->lang->testtask->common;
|
||||
$this->view->position[] = $this->lang->testtask->block;
|
||||
$this->view->actions = $actions;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('nodeleted', $testtask->owner);
|
||||
$this->view->actions = $this->loadModel('action')->getList('testtask', $taskID);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,11 @@
|
||||
</div>
|
||||
<form class='load-indicator main-form' method='post' id='activateForm'>
|
||||
<table class='table table-form'>
|
||||
<?php $this->printExtendFields($task, 'table', 'columns=1');?>
|
||||
<tr class='hide'>
|
||||
<th class='w-45px'><?php echo $lang->testtask->status;?></th>
|
||||
<td><?php echo html::hidden('status', 'doing');?></td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields($testtask, 'table', 'columns=1');?>
|
||||
<tr>
|
||||
<th class='w-45px'><?php echo $lang->comment;?></th>
|
||||
<td><?php echo html::textarea('comment', '', "rows='6' class='form-control kindeditor' hidefocus='true'");?></td>
|
||||
|
||||
@@ -24,7 +24,11 @@
|
||||
</div>
|
||||
<form class='load-indicator main-form' method='post' id='blockForm'>
|
||||
<table class='table table-form'>
|
||||
<?php $this->printExtendFields($task, 'table', 'columns=1');?>
|
||||
<tr class='hide'>
|
||||
<th class='w-45px'><?php echo $lang->testtask->status;?></th>
|
||||
<td><?php echo html::hidden('status', 'blocked');?></td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields($testtask, 'table', 'columns=1');?>
|
||||
<tr>
|
||||
<th class='w-45px'><?php echo $lang->comment;?></th>
|
||||
<td><?php echo html::textarea('comment', '', "rows='6' class='form-control kindeditor' hidefocus='true'");?></td>
|
||||
|
||||
@@ -23,7 +23,11 @@
|
||||
</div>
|
||||
<form class='load-indicator main-form' method='post' id='closeForm'>
|
||||
<table class='table table-form'>
|
||||
<?php $this->printExtendFields($task, 'table', 'columns=1');?>
|
||||
<tr class='hide'>
|
||||
<th class='w-60px'><?php echo $lang->testtask->status;?></th>
|
||||
<td><?php echo html::hidden('status', 'done');?></td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields($testtask, 'table', 'columns=1');?>
|
||||
<tr>
|
||||
<th class='w-60px'><?php echo $lang->comment;?></th>
|
||||
<td><?php echo html::textarea('comment', '', "rows='6' class='form-control kindeditor' hidefocus='true'");?></td>
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields('', 'table', 'columns=2');?>
|
||||
<?php $this->printExtendFields('', 'table', 'columns=1');?>
|
||||
<tr>
|
||||
<td class='text-center form-actions' colspan='3'>
|
||||
<?php echo html::submitButton();?>
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields($task, 'table', 'columns=2');?>
|
||||
<?php $this->printExtendFields($task, 'table', 'columns=1');?>
|
||||
<tr>
|
||||
<td class='text-center form-actions' colspan='3'>
|
||||
<?php echo html::submitButton();?>
|
||||
|
||||
@@ -25,7 +25,11 @@
|
||||
</div>
|
||||
<form class='load-indicator main-form' method='post' id='startForm'>
|
||||
<table class='table table-form'>
|
||||
<?php $this->printExtendFields($task, 'table', 'columns=1');?>
|
||||
<tr class='hide'>
|
||||
<th class='w-45px'><?php echo $lang->testtask->status;?></th>
|
||||
<td><?php echo html::hidden('status', 'doing');?></td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields($testtask, 'table', 'columns=1');?>
|
||||
<tr>
|
||||
<th class='w-45px'><?php echo $lang->comment;?></th>
|
||||
<td><?php echo html::textarea('comment', '', "rows='6' class='form-control kindeditor' hidefocus='true'");?></td>
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php $this->printExtendFields($task, 'div', "position=right&divCell=true");?>
|
||||
<?php $this->printExtendFields($task, 'div', "position=right&mode=value");?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user