From b047d570634b795c35dc3119a6fa477f34df668f Mon Sep 17 00:00:00 2001 From: chenfeiCF Date: Mon, 20 Mar 2017 15:54:36 +0800 Subject: [PATCH] * adjust view file of batchRun method: merge td for step group. --- module/testtask/css/batchrun.css | 2 ++ module/testtask/view/batchrun.html.php | 25 ++++++++++++++++++++++--- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/module/testtask/css/batchrun.css b/module/testtask/css/batchrun.css index bb517d2c53..a37a9bf56f 100644 --- a/module/testtask/css/batchrun.css +++ b/module/testtask/css/batchrun.css @@ -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;} diff --git a/module/testtask/view/batchrun.html.php b/module/testtask/view/batchrun.html.php index 96781a5933..f01c167439 100644 --- a/module/testtask/view/batchrun.html.php +++ b/module/testtask/view/batchrun.html.php @@ -42,15 +42,26 @@ - + $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'; + ?> - + + type != 'group'):?> + - +
desc'>" . $i . "、" . $step->desc . ''?>type == 'group') echo "colspan='2'"?>>desc' class='$stepClass'>" . $ID . "、" . $step->desc . ''?>expect'>" . $lang->testcase->stepExpect . ":" . $step->expect . ''?>
@@ -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); + }); } }