* Finish task #78647.

This commit is contained in:
tanghucheng
2022-12-15 10:00:48 +08:00
parent e5ad70caca
commit ef3f7a32d2
9 changed files with 81 additions and 23 deletions
+7 -1
View File
@@ -37,7 +37,13 @@
<td class='text-left'><?php echo "<span title='" . $moduleOptionMenu[$case->module] . "'>" . $moduleOptionMenu[$case->module] . "</span>"?></td>
<td class='text-left wordwrap'><?php echo "<span title='{$case->title}'>{$case->title}</span>"?></td>
<td class='text-left precondition wordwrap'><?php echo "<span title='{$case->precondition}'>{$case->precondition}</span>"?></td>
<td class='text-left'><?php echo html::radio("results[$caseID]", $this->lang->testcase->resultList, 'pass', "onclick='showAction(this.value,\".action$caseID\")'", 'block')?></td>
<td class='text-left'>
<?php if($confirm == 'yes'):?>
<?php echo html::hidden("results[$caseID]", '');?>
<?php else:?>
<?php echo html::radio("results[$caseID]", $this->lang->testcase->resultList, 'pass', "onclick='showAction(this.value,\".action$caseID\")'", 'block')?>
<?php endif;?>
</td>
<td>
<?php if(!empty($steps[$caseID])):?>
<table class='table table-fixed'>
+19 -2
View File
@@ -17,6 +17,10 @@
<?php js::set('taskCaseBrowseType', ($browseType == 'bymodule' and $this->session->taskCaseBrowseType == 'bysearch') ? 'all' : $this->session->taskCaseBrowseType);?>
<?php js::set('browseType', $browseType);?>
<?php js::set('moduleID', $moduleID);?>
<?php $this->app->loadLang('zanode');?>
<?php js::set('runCaseConfirm', $lang->zanode->runCaseConfirm);?>
<?php js::set('confirmURL', $this->createLink('testtask', 'batchRun', "productID=$productID&orderBy=id_desc&from=testcase&taskID=$taskID&confirm=yes"));?>
<?php js::set('cancelURL', $this->createLink('testtask', 'batchRun', "productID=$productID&orderBy=id_desc&from=testcase&taskID=$taskID&confirm=no"));?>
<div id='mainContent' class='main-row fade'>
<div class='side-col' id='sidebar'>
<div class="sidebar-toggle"><i class="icon icon-angle-left"></i></div>
@@ -131,8 +135,7 @@
<?php
if($canBatchRun)
{
$actionLink = inLink('batchRun', "productID=$productID&orderBy=id_desc&from=testtask&taskID=$taskID");
echo html::commonButton($lang->testtask->runCase, "onclick=\"setFormAction('$actionLink')\"");
echo html::commonButton($lang->testtask->runCase, "onclick=\"confirmAction()\"");
}
?>
</div>
@@ -163,5 +166,19 @@ if($shortcut.size() > 0)
$(function(){$('#casesForm').table();})
<?php endif;?>
$("thead").find('.c-assignedTo').attr('class', '');
function confirmAction()
{
if(confirm(runCaseConfirm))
{
setFormAction(confirmURL, '', '#caseList');
}
else
{
setFormAction(cancelURL, '', '#caseList');
}
return false;
}
</script>
</script>
<?php include '../../common/view/footer.html.php';?>