This commit is contained in:
tianshujie98
2020-09-29 08:26:13 +08:00
parent fd0a11a8b1
commit 456dbffd68
2 changed files with 6 additions and 10 deletions
+5 -9
View File
@@ -97,11 +97,10 @@ function loadBranch()
*Load all builds of one project or product.
*
* @param that $that
* @param bool $resolvedBuildBox
* @access public
* @return void
*/
function loadAllBuilds(that, resolvedBuildBox)
function loadAllBuilds(that)
{
that = (typeof that == undefined) ? undefined : that;
resolvedBuildBox = (typeof resolvedBuildBox == undefined) ? false : resolvedBuildBox;
@@ -118,15 +117,13 @@ function loadAllBuilds(that, resolvedBuildBox)
projectID = $('#project').val();
if(page == 'edit') buildBox = $(that).closest('.input-group').attr('id');
if(resolvedBuildBox) loadAllProductBuilds(productID, 'resolvedBuildBox');
if(projectID)
{
loadAllProjectBuilds(projectID, productID);
}
else
{
loadAllProductBuilds(productID, 'openedBuildBox');
loadAllProductBuilds(productID);
}
}
}
@@ -166,7 +163,7 @@ function loadAllProjectBuilds(projectID, productID)
}
if(buildBox == 'resolvedBuildBox')
{
link = createLink('build', 'ajaxGetProjectBuilds', 'projectID=' + projectID + '&productID=' + productID + '&varName=resolvedBuild&build=' + oldResolvedBuild + '&branch=0&index=0&needCreate=true&type=all');
link = createLink('build', 'ajaxGetProductBuilds', 'productID=' + productID + '&varName=resolvedBuild&build=' + oldResolvedBuild + '&branch=' + branch + '&index=0&type=all');
$('#resolvedBuildBox').load(link, function(){$(this).find('select').chosen()});
}
}
@@ -176,11 +173,10 @@ function loadAllProjectBuilds(projectID, productID)
* Load all builds of the product.
*
* @param int $productID
* @param string $buildBox
* @access public
* @return void
*/
function loadAllProductBuilds(productID, buildBox)
function loadAllProductBuilds(productID)
{
branch = $('#branch').val();
if(typeof(branch) == 'undefined') branch = 0;
@@ -206,7 +202,7 @@ function loadAllProductBuilds(productID, buildBox)
}
if(buildBox == 'resolvedBuildBox')
{
link = createLink('build', 'ajaxGetProductBuilds', 'productID=' + productID + '&varName=resolvedBuild&build=' + oldResolvedBuild + '&branch' + branch);
link = createLink('build', 'ajaxGetProductBuilds', 'productID=' + productID + '&varName=resolvedBuild&build=' + oldResolvedBuild + '&branch' + branch + '&index=0&type=all');
$('#resolvedBuildBox').load(link, function(){$(this).find('select').chosen()});
}
}
+1 -1
View File
@@ -220,7 +220,7 @@ js::set('oldResolvedBuild' , $bug->resolvedBuild);
<td>
<div id='resolvedBuildBox' class='input-group'>
<?php echo html::select('resolvedBuild', $resolvedBuilds, $bug->resolvedBuild, "class='form-control chosen'");?>
<span class='input-group-btn'><?php echo html::commonButton($lang->bug->allBuilds, "class='btn' onclick='loadAllBuilds(this, true)'")?></span>
<span class='input-group-btn'><?php echo html::commonButton($lang->bug->allBuilds, "class='btn' onclick='loadAllBuilds(this)'")?></span>
</div>
</td>
</tr>