This commit is contained in:
wangyidong
2022-12-01 14:15:35 +08:00
parent 283b37b65e
commit 22081a43de
2 changed files with 9 additions and 7 deletions

View File

@@ -203,8 +203,8 @@ function loadAllExecutionBuilds(executionID, productID, buildBox)
$('#openedBuild').replaceWith(data);
$('#pickerDropMenu-pk_openedBuild').remove();
$('#openedBuild').next('.picker').remove();
$("#openedBuild").picker({optionRender: markReleasedBuilds});
notice();
$("#openedBuild").picker({optionRender: markReleasedBuilds});
})
}
if(page == 'edit')
@@ -243,8 +243,8 @@ function loadAllProductBuilds(productID, buildBox)
$('#openedBuild').replaceWith(data);
$('#pickerDropMenu-pk_openedBuild').remove();
$('#openedBuild').next('.picker').remove();
$("#openedBuild").picker({optionRender: markReleasedBuilds});
notice();
$("#openedBuild").picker({optionRender: markReleasedBuilds});
})
}
if(page == 'edit')
@@ -460,8 +460,8 @@ function loadProductBuilds(productID)
$('#openedBuild').replaceWith(data);
$('#pickerDropMenu-pk_openedBuild').remove();
$('#openedBuild').next('.picker').remove();
$("#openedBuild").picker({optionRender: markReleasedBuilds});
notice();
$("#openedBuild").picker({optionRender: markReleasedBuilds});
})
}
else
@@ -616,8 +616,8 @@ function loadProjectBuilds(projectID)
$('#openedBuild').val(oldOpenedBuild);
$('#pickerDropMenu-pk_openedBuild').remove();
$('#openedBuild').next('.picker').remove();
$("#openedBuild").picker({optionRender: markReleasedBuilds});
notice();
$("#openedBuild").picker({optionRender: markReleasedBuilds});
})
}
else
@@ -659,8 +659,8 @@ function loadExecutionBuilds(executionID, num)
$('#openedBuild').val(oldOpenedBuild);
$('#pickerDropMenu-pk_openedBuild').remove();
$('#openedBuild').next('.picker').remove();
$("#openedBuild").picker({optionRender: markReleasedBuilds});
notice();
$("#openedBuild").picker({optionRender: markReleasedBuilds});
})
}
else
@@ -830,7 +830,9 @@ function notice()
if(page == 'edit') return;
$('#buildBoxActions').empty().hide();
if($('#openedBuild').find('option').length <= 1)
var itemCount = $('#openedBuild').find('option').length;
if($('#openedBuild').attr('data-items') != undefined) var itemCount = $('#openedBuild').attr('data-items');
if(itemCount <= 1)
{
var html = '';
if($('#execution').length == 0 || $('#execution').val() == 0)

View File

@@ -130,7 +130,7 @@ if($this->app->tab == 'project') js::set('objectID', $projectID);
<td>
<div class='input-group' id='buildBox'>
<span class="input-group-addon"><?php echo $lang->bug->openedBuild?></span>
<?php echo html::select('openedBuild[]', $builds, empty($buildID) ? '' : $buildID, "multiple=multiple class='picker-select form-control'");?>
<?php echo html::select('openedBuild[]', $builds, empty($buildID) ? '' : $buildID, "multiple=multiple class='picker-select form-control' data-items='" . count($builds) . "'");?>
<span class='input-group-addon fix-border' id='buildBoxActions'></span>
<div class='input-group-btn'><?php echo html::commonButton($lang->bug->allBuilds, "class='btn' id='all' data-toggle='tooltip' onclick='loadAllBuilds()'")?></div>
</div>