This commit is contained in:
holan20180123
2021-04-07 16:33:03 +08:00
parent 04068cd52f
commit d0aeb07ac2
4 changed files with 24 additions and 5 deletions
+1 -1
View File
@@ -542,7 +542,7 @@ class bug extends control
/* Get executions. */
$executions = array('' => '');
if(isset($projects[$projectID])) $executions += $this->product->getExecutionPairsByProduct($productID, $branch ? "0,$branch" : 0, 'id_desc', $projectID);
if(isset($projects[$projectID]) or $this->config->systemMode == 'classic') $executions += $this->product->getExecutionPairsByProduct($productID, $branch ? "0,$branch" : 0, 'id_desc', $projectID);
/* Set custom. */
foreach(explode(',', $this->config->bug->list->customCreateFields) as $field) $customFields[$field] = $this->lang->bug->$field;
+10 -3
View File
@@ -2,6 +2,7 @@ $(function()
{
var page = window.page || '';
var flow = window.flow;
if(typeof(systemMode) == undefined) var systemMode = '';
$('#subNavbar a[data-toggle=dropdown]').parent().addClass('dropdown dropdown-hover');
@@ -240,6 +241,12 @@ function loadProductStories(productID)
*/
function loadProductProjects(productID)
{
if(systemMode == 'classic')
{
loadProductExecutions(productID);
return true;
}
branch = $('#branch').val();
if(typeof(branch) == 'undefined') branch = 0;
@@ -262,8 +269,8 @@ function loadProductProjects(productID)
*/
function loadProductExecutions(productID, projectID = 0)
{
if(!projectID) projectID = $('#project').find("option:selected").val();
if(!projectID) productID = 0;
if(!projectID && systemMode != 'classic') projectID = $('#project').find("option:selected").val();
if(!projectID && systemMode != 'classic') productID = 0;
required = $('#execution_chosen').hasClass('required');
branch = $('#branch').val();
if(typeof(branch) == 'undefined') branch = 0;
@@ -272,7 +279,7 @@ function loadProductExecutions(productID, projectID = 0)
$('#executionIdBox').load(link, function()
{
$(this).find('select').chosen();
if(typeof(bugExecution) == 'string') $('#executionIdBox').prepend("<span class='input-group-addon' style='border-left-width: 0px;'>" + bugExecution + "</span>");
if(typeof(bugExecution) == 'string' && systemMode != 'classic') $('#executionIdBox').prepend("<span class='input-group-addon' style='border-left-width: 0px;'>" + bugExecution + "</span>");
if(required) $(this).addClass('required');
});
}
+12 -1
View File
@@ -73,7 +73,10 @@ js::set('blockID', $blockID);
</tr>
<?php $showExecution = (strpos(",$showFields,", ',execution,') !== false);?>
<tr>
<th><?php echo ($showExecution) ? $lang->bug->project : $lang->bug->type;?></th>
<th>
<?php if($config->systemMode == 'classic') $lang->bug->project = $lang->bug->execution;?>
<?php echo ($showExecution) ? $lang->bug->project : $lang->bug->type;?>
</th>
<?php if(!$showExecution):?>
<?php $showOS = strpos(",$showFields,", ',os,') !== false;?>
@@ -94,6 +97,7 @@ js::set('blockID', $blockID);
<?php endif;?>
<?php if($showExecution):?>
<td>
<?php if($config->systemMode == 'new'):?>
<div class='table-row'>
<div class='table-col' id='projectBox'>
<?php echo html::select('project', $projects, $projectID, "class='form-control chosen' onchange='loadProductExecutions({$productID}, this.value)'");?>
@@ -104,6 +108,12 @@ js::set('blockID', $blockID);
<?php echo html::select('execution', $executions, $executionID, "class='form-control chosen' onchange='loadExecutionRelated(this.value)'");?>
</div>
</div>
</div>
<?php else:?>
<div class='input-group' id='executionIdBox'>
<?php echo html::select('execution', $executions, $executionID, "class='form-control chosen' onchange='loadExecutionRelated(this.value)'");?>
</div>
<?php endif;?>
</td>
<?php endif;?>
<td>
@@ -327,6 +337,7 @@ js::set('blockID', $blockID);
</div>
<?php js::set('bugModule', $lang->bug->module);?>
<?php js::set('bugExecution', $lang->bug->execution);?>
<?php js::set('systemMode', $config->systemMode);?>
<script>
$(function(){parent.$('body.hide-modal-close').removeClass('hide-modal-close');})
</script>
+1
View File
@@ -24,6 +24,7 @@ js::set('oldStoryID' , $bug->story);
js::set('oldTaskID' , $bug->task);
js::set('oldOpenedBuild' , $bug->openedBuild);
js::set('oldResolvedBuild' , $bug->resolvedBuild);
js::set('systemMode' , $config->systemMode);
?>
<div class='main-content' id='mainContent'>