* adjust view file of batchRun method: merge td for step group.
This commit is contained in:
@@ -2,3 +2,5 @@
|
||||
.table-bordered thead th {border-top: none}
|
||||
.table-form > tbody > tr > th, .table-form > tbody > tr > td {border-bottom: 1px solid #ddd}
|
||||
.outer .table.table-form tbody > tr:last-child td{border:1px solid #ddd;}
|
||||
|
||||
.step-item{padding-left: 20px;}
|
||||
|
||||
@@ -42,15 +42,26 @@
|
||||
<td>
|
||||
<?php if(!empty($steps[$caseID])):?>
|
||||
<table class='table table-fixed'>
|
||||
<?php $i = 1;?>
|
||||
<?php $stepId = $childId = 0;?>
|
||||
<?php foreach($steps[$caseID] as $stepID => $step):?>
|
||||
<?php
|
||||
if($step->type == 'group' or $step->type == 'step')
|
||||
{
|
||||
$stepId ++;
|
||||
$childId = 0;
|
||||
}
|
||||
$ID = $step->type == 'item' ? "{$stepId}.{$childId}" : $stepId;
|
||||
$stepClass = $step->type == 'item' ? 'step-item' : 'step-group';
|
||||
?>
|
||||
<tr>
|
||||
<td class='text-left w-p30'><?php echo "<span title='$step->desc'>" . $i . "、" . $step->desc . '</span>'?></td>
|
||||
<td class='text-left w-p30' <?php if($step->type == 'group') echo "colspan='2'"?>><?php echo "<span title='$step->desc' class='$stepClass'>" . $ID . "、" . $step->desc . '</span>'?></td>
|
||||
<?php if($step->type != 'group'):?>
|
||||
<td class='text-left w-p30'><?php echo "<span title='$step->expect'>" . $lang->testcase->stepExpect . ":" . $step->expect . '</span>'?></td>
|
||||
<td class='w-80px hidden action<?php echo $caseID?>'><?php echo html::select("steps[$caseID][$stepID]", $lang->testcase->resultList, 'pass', "class='form-control'")?></td>
|
||||
<td class='hidden action<?php echo $caseID?>'><?php echo html::input("reals[$caseID][$stepID]", '', "class='form-control'");?></td>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
<?php $i++?>
|
||||
<?php $childId ++;?>
|
||||
<?php endforeach?>
|
||||
</table>
|
||||
<?php else:?>
|
||||
@@ -68,10 +79,18 @@ function showAction(value, obj)
|
||||
if(value == 'pass')
|
||||
{
|
||||
$(obj).addClass('hidden');
|
||||
$(obj).closest('tbody').children('tr').each(function(){
|
||||
var $td = $(this).children('td:first');
|
||||
if($td.attr('colspan') != undefined) $td.attr('colspan', 2);
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
$(obj).removeClass('hidden');
|
||||
$(obj).closest('tbody').children('tr').each(function(){
|
||||
var $td = $(this).children('td:first');
|
||||
if($td.attr('colspan') != undefined) $td.attr('colspan', 4);
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user