This commit is contained in:
mayue
2022-11-14 13:02:02 +08:00
5 changed files with 10 additions and 12 deletions
+6 -1
View File
@@ -311,11 +311,16 @@ class buildModel extends model
$build->stories = '';
$build->bugs = '';
if($projectID)
if($projectID && !$executionID)
{
$project = $this->loadModel('project')->getByID($projectID);
if(!$project->multiple) $executionID = $this->dao->select('id')->from(TABLE_EXECUTION)->where('project')->eq($projectID)->fetch('id');
}
else if($executionID && !$projectID)
{
$execution = $this->loadModel('execution')->getByID($executionID);
$projectID = $execution->project;
}
$build = fixer::input('post')
->setDefault('project', $projectID)
-8
View File
@@ -930,13 +930,6 @@ class docModel extends model
{
$this->loadModel('product');
/* Fixed search modal for doc view. */
if($this->app->getMethodName() == 'objectlibs')
{
$queryName = $type . 'Doc';
$type = 'objectLibs';
}
if($this->app->rawMethod == 'contribute')
{
$this->config->doc->search['module'] = 'contributeDoc';
@@ -960,7 +953,6 @@ class docModel extends model
}
else
{
if(isset($queryName)) $this->config->doc->search['module'] = $queryName;
$products = $this->product->getPairs('nocode', $this->session->project);
$this->config->doc->search['params']['execution']['values'] = array('' => '') + $this->loadModel('execution')->getPairs($this->session->project, 'all', 'noclosed') + array('all' => $this->lang->doc->allExecutions);
$this->config->doc->search['params']['lib']['values'] = array('' => '', $libID => ($libID ? $libs[$libID] : 0), 'all' => $this->lang->doclib->all);
+1 -1
View File
@@ -49,7 +49,7 @@ class projectrelease extends control
$this->view->products = $this->products;
$this->view->product = $product;
$this->view->branches = (isset($product->type) and $product->type == 'normal') ? array() : $this->loadModel('branch')->getPairs($productID, 'active');
$this->view->branches = (isset($product->type) and $product->type == 'normal') ? array() : $this->loadModel('branch')->getPairs($productID, 'active', $projectID);
$this->view->branch = $branch;
$this->view->project = $this->project->getByID($projectID);
}
+2 -1
View File
@@ -45,9 +45,10 @@ function loadBranches(productID)
if(data)
{
$inputGroup.append(data);
$inputGroup.find('#branch').attr('onchange', 'loadBuilds()');
$('#branch').css('width', '120px').chosen();
loadBuilds();
}
loadBuilds();
$inputGroup.fixInputGroup();
})
}
+1 -1
View File
@@ -38,7 +38,7 @@
<td>
<div class='input-group'>
<?php echo html::select('product', $products, $product->id, "onchange='loadBranches(this.value)' class='form-control chosen'");?>
<?php if($product->type != 'normal') echo html::select('branch', $branches, $branch, "class='form-control chosen control-branch' onchange='loadBuilds()'");?>
<?php if($product->type != 'normal') echo html::select('branch', $branches, $branch, "class='form-control chosen control-branch'");?>
</div>
</td>
<td></td>