This commit is contained in:
hufangzhou
2021-03-29 10:57:12 +08:00
parent 5e0d13b050
commit 52aab18643
4 changed files with 35 additions and 3 deletions
+5
View File
@@ -56,6 +56,11 @@ class build extends control
$this->execution->setMenu($executionID);
$this->session->set('project', $execution->project);
}
elseif($this->app->openApp == 'qa')
{
$execution = $this->execution->getByID($executionID);
$executions = $this->execution->getPairs($execution->project);
}
$productGroups = $this->execution->getProducts($executionID);
$productID = $productID ? $productID : key($productGroups);
+4 -1
View File
@@ -211,6 +211,10 @@ class testtask extends control
{
$this->loadModel('execution')->setMenu($executionID);
}
elseif($this->app->openApp == 'qa')
{
$this->loadModel('qa')->setMenu($this->products, $productID);
}
/* Create testtask from testtask of test.*/
$productID = $productID ? $productID : key($this->products);
@@ -219,7 +223,6 @@ class testtask extends control
/* Set menu. */
$productID = $this->product->saveState($productID, $this->products);
$this->loadModel('qa')->setMenu($this->products, $productID);
$this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->testtask->create;
$this->view->position[] = html::a($this->createLink('testtask', 'browse', "productID=$productID"), $this->products[$productID]);
+25 -1
View File
@@ -6,7 +6,31 @@
*/
function loadProductRelated()
{
loadExecutionBuilds(parseInt($('#execution').val()));
loadExecutions($('#product').val());
data = '<select id="build" name="build" class="form-control"></select>';
$('#build').replaceWith(data);
$('#build_chosen').remove();
$("#build").chosen();
$('#build').trigger("chosen:updated");
}
/**
* Load executions.
*
* @param int productID
* @access public
* @return void
*/
function loadExecutions(productID)
{
link = createLink('product', 'ajaxGetExecutions', 'productID=' + productID + '&projectID=' + projectID);
$.get(link, function(data)
{
if(!data) data = '<select id="execution" name="execution" class="form-control"></select>';
$('#execution').replaceWith(data);
$('#execution_chosen').remove();
$("#execution").chosen();
});
}
/* If the mouse hover over the manage contacts button, give tip. */
+1 -1
View File
@@ -14,7 +14,7 @@
<?php include '../../common/view/datepicker.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php js::import($jsRoot . 'misc/date.js');?>
<?php js::set('projectID', $this->session->project);?>
<?php js::set('projectID', $projectID);?>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>