* testcase: remove unused code.

This commit is contained in:
liugang
2023-08-08 14:15:00 +08:00
parent 23f28106ea
commit a4e6db6123
2 changed files with 7 additions and 22 deletions
+3 -11
View File
@@ -2565,19 +2565,15 @@ class testcase extends control
}
/**
* Create scene.
* Create a scene.
*
* @param int $productID
* @param int $branch
* @param string $branch
* @param int $moduleID
* @param string $from
* @param string $param
* @param int $storyID
* @param string $extras
* @access public
* @return void
*/
public function createScene($productID, $branch = '', $moduleID = 0, $from = '', $param = 0, $storyID = 0, $extras = '')
public function createScene($productID, $branch = '', $moduleID = 0)
{
if(!empty($_POST))
{
@@ -2642,16 +2638,12 @@ class testcase extends control
}
$this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->testcase->newScene;
$this->view->productID = $productID;
$this->view->currentModuleID = $currentModuleID;
$this->view->currentParentID = $currentParentID;
$this->view->gobackLink = (isset($output['from']) and $output['from'] == 'global') ? $this->createLink('testcase', 'browse', "productID=$productID") : '';
$this->view->showFields = $this->config->testcase->custom->createFields;
$this->view->moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'case', $startModuleID = 0, ($branch === 'all' or !isset($branches[$branch])) ? 0 : $branch);
$this->view->branch = $branch;
$this->view->product = $product;
$this->view->branches = $branches;
$this->view->sceneTitle = '';
$this->view->sceneOptionMenu = $this->testcase->getSceneMenu($productID, $moduleID, $viewType = 'case', $startSceneID = 0, ($branch === 'all' or !isset($branches[$branch])) ? 0 : $branch);
$this->display();
+4 -11
View File
@@ -11,7 +11,6 @@
*/
?>
<?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
<?php include $app->getModuleRoot() . 'common/view/kindeditor.html.php';?>
<?php js::set('page', 'createscene');?>
<?php js::set('lblDelete', $lang->testcase->deleteStep);?>
<?php js::set('lblBefore', $lang->testcase->insertBefore);?>
@@ -26,12 +25,6 @@
<div class='main-header'>
<h2><?php echo $lang->testcase->newScene;?></h2>
</div>
<?php
foreach(explode(',', $config->testcase->createscene->requiredFields) as $field)
{
if($field and strpos($showFields, $field) === false) $showFields .= ',' . $field;
}
?>
<form class='load-indicator main-form form-ajax' method='post' enctype='multipart/form-data' id='dataform' data-type='ajax'>
<table class='table table-form'>
<tbody>
@@ -39,7 +32,7 @@
<th><?php echo $lang->testcase->product;?></th>
<td>
<div class='input-group'>
<?php echo html::select('product', $products, $productID, "onchange='loadAllNew(this.value);' class='form-control chosen'");?>
<?php echo html::select('product', $products, $product->id, "onchange='loadAllNew(this.value);' class='form-control chosen'");?>
<?php if(isset($product->type) and $product->type != 'normal') echo html::select('branch', $branches, $branch, "onchange='loadBranchNew();' class='form-control' style='width:120px'");?>
</div>
</td>
@@ -51,8 +44,8 @@
if(count($moduleOptionMenu) == 1)
{
echo "<span class='input-group-addon'>";
echo html::a($this->createLink('tree', 'browse', "rootID=$productID&view=case&currentModuleID=0&branch=$branch", '', true), $lang->tree->manage, '', "class='text-primary' data-toggle='modal' data-type='iframe' data-width='95%'");
echo html::a("javascript:void(0)", $lang->refresh, '', "class='refresh' onclick='loadProductModulesNew($productID)'");
echo html::a($this->createLink('tree', 'browse', "rootID={$product->id}&view=case&currentModuleID=0&branch={$branch}", '', true), $lang->tree->manage, '', "class='text-primary' data-toggle='modal' data-type='iframe' data-width='95%'");
echo html::a("javascript:void(0)", $lang->refresh, '', "class='refresh' onclick='loadProductModulesNew({$product->id})'");
echo '</span>';
}
?>
@@ -78,7 +71,7 @@
<tr>
<td colspan='3' class='text-center form-actions'>
<?php echo html::submitButton();?>
<?php echo $gobackLink ? html::a($gobackLink, $lang->goback, '', 'class="btn btn-wide"') : html::backButton();?>
<?php echo html::backButton();?>
</td>
</tr>
</tfoot>