* Refactor button for the build list page.

This commit is contained in:
tianshujie
2023-10-25 09:02:35 +08:00
parent 9053ed73da
commit 8a55e6ce68
3 changed files with 10 additions and 10 deletions
+4 -3
View File
@@ -35,9 +35,10 @@ $config->build->actionList['linkStory']['url'] = helper::createLink('build', 'v
$config->build->actionList['linkProjectStory'] = $config->build->actionList['linkStory'];
$config->build->actionList['linkProjectStory']['url'] = helper::createLink('projectbuild', 'view', 'buildID={id}&type=story&link=true');
$config->build->actionList['createTest']['icon'] = 'bullhorn';
$config->build->actionList['createTest']['hint'] = $lang->build->createTest;
$config->build->actionList['createTest']['url'] = helper::createLink('testtask', 'create', 'product={product}&execution={execution}&build={id}&projectID={project}');
$config->build->actionList['createTest']['icon'] = 'bullhorn';
$config->build->actionList['createTest']['hint'] = $lang->build->createTest;
$config->build->actionList['createTest']['url'] = helper::createLink('testtask', 'create', 'product={product}&execution={execution}&build={id}&projectID={project}');
$config->build->actionList['createTest']['data-app'] = $app->tab;
$config->build->actionList['viewBug']['icon'] = 'bug';
$config->build->actionList['viewBug']['hint'] = $lang->build->viewBug;
+2 -2
View File
@@ -52,9 +52,9 @@ window.renderCell = function(result, {col, row})
* @access public
* @return void
*/
window.changeProduct = function()
window.changeProduct = function(e)
{
const link = changeProductLink.replace('{productID}', $(this).val());
const link = changeProductLink.replace('{productID}', $(e.target).val());
loadPage(link);
}
+4 -5
View File
@@ -14,8 +14,8 @@ $changeProductBox = '';
if($project->hasProduct)
{
$changeProductBox = div(
set::className('select-product-box'),
select
setClass('select-product-box mx-2'),
picker
(
set::name('product'),
set::value($productID),
@@ -43,9 +43,7 @@ toolbar
!empty($createItem) ? item(set($createItem)) : null,
);
jsVar('orderBy', $orderBy);
jsVar('projectID', $project->id);
jsVar('sortLink', helper::createLink($app->rawModule, $app->rawMethod, "projectID={$project->id}&type={$type}&param={$param}&orderBy={orderBy}&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}"));
jsVar('changeProductLink', helper::createLink($app->rawModule, $app->rawMethod, "projectID={$project->id}&type=product&param={productID}&orderBy={$orderBy}&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}"));
jsVar('scmPathTip', $lang->build->scmPath);
jsVar('filePathTip', $lang->build->filePath);
@@ -57,7 +55,8 @@ dtable
set::cols($config->build->dtable->fieldList),
set::data($builds),
set::plugins(array('cellspan')),
set::sortLink(jsRaw('createSortLink')),
set::orderBy($orderBy),
set::sortLink(createLink($app->rawModule, $app->rawMethod, "projectID={$project->id}&type={$type}&param={$param}&orderBy={name}_{sortType}&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}")),
set::onRenderCell(jsRaw('window.renderCell')),
set::getCellSpan(jsRaw('window.getCellSpan')),
set::footPager(