* code for task#1657.
This commit is contained in:
@@ -551,10 +551,25 @@ class testtask extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function unlinkCase($rowID)
|
||||
public function unlinkCase($rowID, $confirm = 'no')
|
||||
{
|
||||
$this->dao->delete()->from(TABLE_TESTRUN)->where('id')->eq((int)$rowID)->exec();
|
||||
die(js::reload('parent'));
|
||||
if($confirm == 'no')
|
||||
{
|
||||
die(js::confirm($this->lang->testtask->confirmUnlinkCase, $this->createLink('testtask', 'unlinkCase', "rowID=$rowID&confirm=yes")));
|
||||
}
|
||||
else
|
||||
{
|
||||
$response['result'] = 'success';
|
||||
$response['message'] = '';
|
||||
|
||||
$this->dao->delete()->from(TABLE_TESTRUN)->where('id')->eq((int)$rowID)->exec();
|
||||
if(dao::isError())
|
||||
{
|
||||
$response['result'] = 'fail';
|
||||
$response['message'] = dao::getError();
|
||||
}
|
||||
$this->send($response);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -68,11 +68,13 @@ $lang->testtask->unlinkedCases = 'Unlinked';
|
||||
$lang->testtask->linkedCases = 'Linked';
|
||||
$lang->testtask->linkByStory = 'Link by story';
|
||||
$lang->testtask->linkByBug = 'Link by bug';
|
||||
$lang->testtask->confirmDelete = 'Are you sure to delete this test task?';
|
||||
$lang->testtask->passAll = 'Pass all';
|
||||
$lang->testtask->pass = 'Pass';
|
||||
$lang->testtask->fail = 'Fail';
|
||||
|
||||
$lang->testtask->confirmDelete = 'Are you sure to delete this test task?';
|
||||
$lang->testtask->confirmUnlinkCase = 'Are you sure to unlink this case?';
|
||||
|
||||
$lang->testtask->byModule = 'By module';
|
||||
$lang->testtask->assignedToMe = 'Assgined to me';
|
||||
$lang->testtask->allCases = 'All Cases';
|
||||
|
||||
@@ -68,11 +68,13 @@ $lang->testtask->unlinkedCases = '未关联';
|
||||
$lang->testtask->linkedCases = '已关联';
|
||||
$lang->testtask->linkByStory = '按需求关联';
|
||||
$lang->testtask->linkByBug = '按Bug关联';
|
||||
$lang->testtask->confirmDelete = '您确认要删除该测试任务吗?';
|
||||
$lang->testtask->passAll = '全部通过';
|
||||
$lang->testtask->pass = '通过';
|
||||
$lang->testtask->fail = '失败';
|
||||
|
||||
$lang->testtask->confirmDelete = '您确认要删除该测试任务吗?';
|
||||
$lang->testtask->confirmUnlinkCase = '您确认要移除该用例吗?';
|
||||
|
||||
$lang->testtask->byModule = '按模块';
|
||||
$lang->testtask->assignedToMe = '指派给我';
|
||||
$lang->testtask->allCases = '所有用例';
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/treeview.html.php';?>
|
||||
<?php include '../../common/view/colorize.html.php';?>
|
||||
<?php js::set('confirmUnlink', $lang->testtask->confirmUnlinkCase)?>
|
||||
<script language="Javascript">
|
||||
var browseType = '<?php echo $browseType;?>';
|
||||
var moduleID = '<?php echo $moduleID;?>';
|
||||
@@ -46,7 +48,7 @@ var moduleID = '<?php echo $moduleID;?>';
|
||||
<td class='divider <?php echo $treeClass;?>'></td>
|
||||
<td>
|
||||
<?php $vars = "taskID=$task->id&browseType=$browseType¶m=$param&orderBy=%s&recToal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
|
||||
<table class='table-1 tablesorter datatable mb-zero fixed'>
|
||||
<table class='table-1 colored tablesorter datatable mb-zero fixed' id='caseList'>
|
||||
<thead>
|
||||
<tr class='colhead'>
|
||||
<th class='w-id'><nobr><?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></nobr></th>
|
||||
@@ -88,7 +90,10 @@ var moduleID = '<?php echo $moduleID;?>';
|
||||
<?php
|
||||
common::printIcon('testtask', 'runCase', "id=$run->id", '', 'list', '', '', 'iframe');
|
||||
common::printIcon('testtask', 'results', "id=$run->id", '', 'list', '', '', 'iframe');
|
||||
common::printIcon('testtask', 'unlinkCase', "id=$run->id", '', 'list', '', 'hiddenwin');
|
||||
|
||||
$unlinkURL = $this->createLink('testtask', 'unlinkCase', "caseID=$run->id&confirm=yes");
|
||||
echo html::a("javascript:ajaxDelete(\"$unlinkURL\",\"caseList\",confirmUnlink)", ' ', '', "class='icon-green-testtask-unlinkCase' title='{$lang->testtask->unlinkCase}'");
|
||||
|
||||
common::printIcon('testcase', 'createBug', "product=$productID&extra=projectID=$task->project,buildID=$task->build,caseID=$run->case,runID=$run->id", $run, 'list', 'createBug');
|
||||
?>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user