* change for export template and adjust create,edit page.
This commit is contained in:
@@ -866,6 +866,10 @@ class testcase extends control
|
||||
$fields['stage'] = $this->lang->testcase->stage;
|
||||
$fields['precondition'] = $this->lang->testcase->precondition;
|
||||
|
||||
$fields[''] = '';
|
||||
$fields['typeValue'] = $this->lang->testcase->lblTypeValue;
|
||||
$fields['stageValue'] = $this->lang->testcase->lblStageValue;
|
||||
|
||||
$modules = $this->loadModel('tree')->getOptionMenu($productID, 'case');
|
||||
$rows = array();
|
||||
foreach($modules as $moduleID => $module)
|
||||
@@ -874,6 +878,12 @@ class testcase extends control
|
||||
$row->module = $module . "(#$moduleID)";
|
||||
$row->stepDesc = "1. \n2. \n3.";
|
||||
$row->stepExpect = "1. \n2. \n3.";
|
||||
|
||||
if(empty($rows))
|
||||
{
|
||||
$row->typeValue = join("\n", $this->lang->testcase->typeList);
|
||||
$row->stageValue = join("\n", $this->lang->testcase->stageList);
|
||||
}
|
||||
$rows[] = $row;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
.delbutton{font-size:12px; color:red; width:80px; padding:0}
|
||||
.addbutton{font-size:12px; color:darkgreen; width:80px; padding:0}
|
||||
.table-form > tbody > tr > td .btn-group-vertical > .btn {margin-left: 0!important; padding: 2px 8px}
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
.col-side .chosen-container .chosen-drop {width: 216px!important}
|
||||
.col-side .chosen-container {width: 218px!important}
|
||||
.table-form > tbody > tr > td .btn.addbutton {display:block; margin:1px 0px; width:40px; padding:1px 6px;}
|
||||
.table-form > tbody > tr > td .btn.delbutton {display:block; margin:1px 0px; width:40px; padding:1px 6px;}
|
||||
|
||||
@@ -111,13 +111,13 @@ function createRow()
|
||||
newRowID ++;
|
||||
var newRow = "<tr class='text-center' id='row" + newRowID + "'>";
|
||||
newRow += "<td class='stepID strong'></td>";
|
||||
newRow += "<td class='w-p50'><textarea name='steps[]' rows=3 class='form-control'></textarea></td>";
|
||||
newRow += "<td><textarea name='steps[]' rows=3 class='form-control'></textarea></td>";
|
||||
newRow += "<td><textarea name='expects[]' rows=3 class='form-control'></textarea></td>";
|
||||
newRow += "<td class='text-left w-100px'><div class='btn-group-vertical'>";
|
||||
newRow += "<input type='button' tabindex='-1' class='addbutton btn' value='" + lblBefore + "' onclick='preInsert(" + newRowID + ")' />";
|
||||
newRow += "<input type='button' tabindex='-1' class='addbutton btn' value='" + lblAfter + "' onclick='postInsert(" + newRowID + ")' />";
|
||||
newRow += "<input type='button' tabindex='-1' class='delbutton btn' value='" + lblDelete + "' onclick='deleteRow(" + newRowID + ")' />";
|
||||
newRow += "</div></td>";
|
||||
newRow += "<td class='text-left'>";
|
||||
newRow += "<button type='button' tabindex='-1' class='addbutton btn' title='" + lblBefore + "' onclick='preInsert(" + newRowID + ")' ><i class='icon icon-double-angle-up'></i></button>";
|
||||
newRow += "<button type='button' tabindex='-1' class='addbutton btn' title='" + lblAfter + "' onclick='postInsert(" + newRowID + ")' ><i class='icon icon-double-angle-down'></i></button>";
|
||||
newRow += "<button type='button' tabindex='-1' class='delbutton btn' title='" + lblDelete + "' onclick='deleteRow(" + newRowID + ")' ><i class='icon icon-remove'></i></button>";
|
||||
newRow += "</td>";
|
||||
return newRow;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,13 +21,13 @@ function createRow()
|
||||
newRowID ++;
|
||||
var newRow = "<tr class='text-center' id='row" + newRowID + "'>";
|
||||
newRow += "<td class='stepID strong'></td>";
|
||||
newRow += "<td class='w-p40'><textarea name='steps[]' rows=1 class='form-control'></textarea></td>";
|
||||
newRow += "<td><textarea name='steps[]' rows=1 class='form-control'></textarea></td>";
|
||||
newRow += "<td><textarea name='expects[]' rows=1 class='form-control'></textarea></td>";
|
||||
newRow += "<td class='text-left w-140px text-top'><div class='btn-group'>";
|
||||
newRow += "<input type='button' tabindex='-1' class='addbutton btn' value='" + lblBefore + "' onclick='preInsert(" + newRowID + ")' />";
|
||||
newRow += "<input type='button' tabindex='-1' class='addbutton btn' value='" + lblAfter + "' onclick='postInsert(" + newRowID + ")' />";
|
||||
newRow += "<input type='button' tabindex='-1' class='delbutton btn' value='" + lblDelete + "' onclick='deleteRow(" + newRowID + ")' />";
|
||||
newRow += "</div></td>";
|
||||
newRow += "<td class='text-left text-top'>";
|
||||
newRow += "<button type='button' tabindex='-1' class='addbutton btn' title='" + lblBefore + "' onclick='preInsert(" + newRowID + ")' ><i class='icon icon-double-angle-up'></i></button>";
|
||||
newRow += "<button type='button' tabindex='-1' class='addbutton btn' title='" + lblAfter + "' onclick='postInsert(" + newRowID + ")' ><i class='icon icon-double-angle-down'></i></button>";
|
||||
newRow += "<button type='button' tabindex='-1' class='delbutton btn' title='" + lblDelete + "' onclick='deleteRow(" + newRowID + ")' ><i class='icon icon-remove'></i></button>";
|
||||
newRow += "</td>";
|
||||
return newRow;
|
||||
}
|
||||
|
||||
|
||||
@@ -98,6 +98,8 @@ $lang->testcase->lblSystemBrowserAndHardware = 'OS & browser';
|
||||
$lang->testcase->lblAssignAndMail = 'Assigned & mailto';
|
||||
$lang->testcase->lblStory = 'Story';
|
||||
$lang->testcase->lblLastEdited = 'Last edited';
|
||||
$lang->testcase->lblTypeValue = 'List of type';
|
||||
$lang->testcase->lblStageValue = 'List of stage';
|
||||
|
||||
$lang->testcase->legendRelated = 'Related info';
|
||||
$lang->testcase->legendBasicInfo = 'Basic info';
|
||||
|
||||
@@ -98,6 +98,8 @@ $lang->testcase->lblSystemBrowserAndHardware = '系统::浏览器';
|
||||
$lang->testcase->lblAssignAndMail = '指派给::抄送给';
|
||||
$lang->testcase->lblStory = '相关需求';
|
||||
$lang->testcase->lblLastEdited = '最后编辑';
|
||||
$lang->testcase->lblTypeValue = '类型可选值列表';
|
||||
$lang->testcase->lblStageValue = '阶段可选值列表';
|
||||
|
||||
$lang->testcase->legendRelated = '相关信息';
|
||||
$lang->testcase->legendBasicInfo = '基本信息';
|
||||
|
||||
@@ -88,10 +88,10 @@
|
||||
<table class='table table-form mg-0' style='border: 1px solid #ddd'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='w-30px'><?php echo $lang->testcase->stepID;?></th>
|
||||
<th><?php echo $lang->testcase->stepDesc;?></th>
|
||||
<th class='w-200px'><?php echo $lang->testcase->stepExpect;?></th>
|
||||
<th class='w-100px'><?php echo $lang->actions;?></th>
|
||||
<th class='w-40px'><?php echo $lang->testcase->stepID;?></th>
|
||||
<th width="45%"><?php echo $lang->testcase->stepDesc;?></th>
|
||||
<th><?php echo $lang->testcase->stepExpect;?></th>
|
||||
<th class='w-140px'><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php
|
||||
@@ -100,13 +100,13 @@
|
||||
$stepID += 1;
|
||||
echo "<tr id='row$stepID' class='text-center'>";
|
||||
echo "<td class='stepID strong'>$stepID</td>";
|
||||
echo '<td class="w-p40">' . html::textarea('steps[]', $step->desc, "rows='1' class='form-control'") . '</td>';
|
||||
echo '<td>' . html::textarea('steps[]', $step->desc, "rows='1' class='form-control'") . '</td>';
|
||||
echo '<td>' . html::textarea('expects[]', $step->expect, "rows='1' class='form-control'") . '</td>';
|
||||
echo "<td class='text-left w-140px text-top'><div class='btn-group'>";
|
||||
echo "<input type='button' tabindex='-1' class='addbutton btn btn-xs' onclick='preInsert($stepID)' value='{$lang->testcase->insertBefore}' />";
|
||||
echo "<input type='button' tabindex='-1' class='addbutton btn btn-xs' onclick='postInsert($stepID)' value='{$lang->testcase->insertAfter}' />";
|
||||
echo "<input type='button' tabindex='-1' class='delbutton btn btn-xs' onclick='deleteRow($stepID)' value='{$lang->testcase->deleteStep}' />";
|
||||
echo "</div></td>";
|
||||
echo "<td class='text-left text-top'>";
|
||||
echo "<button type='button' tabindex='-1' class='addbutton btn btn-xs' onclick='preInsert($stepID)' title='{$lang->testcase->insertBefore}'><i class=\"icon icon-double-angle-up\"></i></button>";
|
||||
echo "<button type='button' tabindex='-1' class='addbutton btn btn-xs' onclick='postInsert($stepID)' title='{$lang->testcase->insertAfter}'><i class=\"icon icon-double-angle-down\"></i></button>";
|
||||
echo "<button type='button' tabindex='-1' class='delbutton btn btn-xs' onclick='deleteRow($stepID)' title='{$lang->testcase->deleteStep}'><i class=\"icon icon-remove\"></i></button>";
|
||||
echo "</td>";
|
||||
echo '</tr>';
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<?php js::set('lblDelete', $lang->testcase->deleteStep);?>
|
||||
<?php js::set('lblBefore', $lang->testcase->insertBefore);?>
|
||||
<?php js::set('lblAfter', $lang->testcase->insertAfter);?>
|
||||
<form class='form-condensed' method='post' enctype='multipart/form-data' target='hiddenwin' id='dataform'>
|
||||
<form method='post' enctype='multipart/form-data' target='hiddenwin' id='dataform'>
|
||||
<div id='titlebar'>
|
||||
<div class='heading'>
|
||||
<span class='prefix'><?php echo html::icon($lang->icons['testcase']);?> <strong><?php echo $case->id;?></strong></span>
|
||||
@@ -43,9 +43,9 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='w-40px'><?php echo $lang->testcase->stepID;?></th>
|
||||
<th><?php echo $lang->testcase->stepDesc;?></th>
|
||||
<th width="45%"><?php echo $lang->testcase->stepDesc;?></th>
|
||||
<th><?php echo $lang->testcase->stepExpect;?></th>
|
||||
<th class='w-100px'><?php echo $lang->actions;?></th>
|
||||
<th class='w-60px'><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php
|
||||
@@ -54,13 +54,13 @@
|
||||
$stepID += 1;
|
||||
echo "<tr id='row$stepID' class='text-center'>";
|
||||
echo "<td class='stepID strong'>$stepID</td>";
|
||||
echo '<td class="w-p50">' . html::textarea('steps[]', $step->desc, "rows='3' class='form-control'") . '</td>';
|
||||
echo '<td>' . html::textarea('steps[]', $step->desc, "rows='3' class='form-control'") . '</td>';
|
||||
echo '<td>' . html::textarea('expects[]', $step->expect, "rows='3' class='form-control'") . '</td>';
|
||||
echo "<td class='text-left w-100px'><div class='btn-group-vertical'>";
|
||||
echo "<input type='button' tabindex='-1' class='addbutton btn' onclick='preInsert($stepID)' value='{$lang->testcase->insertBefore}' />";
|
||||
echo "<input type='button' tabindex='-1' class='addbutton btn' onclick='postInsert($stepID)' value='{$lang->testcase->insertAfter}' /> ";
|
||||
echo "<input type='button' tabindex='-1' class='delbutton btn' onclick='deleteRow($stepID)' value='{$lang->testcase->deleteStep}' /> ";
|
||||
echo "</div></td>";
|
||||
echo "<td class='text-left'>";
|
||||
echo "<button type='button' tabindex='-1' class='addbutton btn' onclick='preInsert($stepID)' title='{$lang->testcase->insertBefore}'><i class='icon icon-double-angle-up'></i></button>";
|
||||
echo "<button type='button' tabindex='-1' class='addbutton btn' onclick='postInsert($stepID)' title='{$lang->testcase->insertAfter}' ><i class='icon icon-double-angle-down'></i></button>";
|
||||
echo "<button type='button' tabindex='-1' class='delbutton btn' onclick='deleteRow($stepID)' title='{$lang->testcase->deleteStep}' ><i class='icon icon-remove'></i></button>";
|
||||
echo "</td>";
|
||||
echo '</tr>';
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -17,9 +17,6 @@
|
||||
<th><?php echo $lang->testcase->precondition?></th>
|
||||
<th class='w-300px'>
|
||||
<table class='w-p100 table-borderless'>
|
||||
<tr>
|
||||
<th colspan='2'><?php echo $lang->testcase->steps?></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->testcase->stepDesc?></th>
|
||||
<th><?php echo $lang->testcase->stepExpect?></th>
|
||||
|
||||
Reference in New Issue
Block a user