* Render execution field with icon on the product plan list page.

This commit is contained in:
chentao
2023-06-13 11:00:31 +08:00
parent 9efe1e830b
commit 6a1e76ec1f
2 changed files with 16 additions and 2 deletions
+14 -1
View File
@@ -1,4 +1,4 @@
window.footerInfo = function(checkedIdList)
window.footerSummary = function(checkedIdList)
{
if(!checkedIdList.length)
{
@@ -12,3 +12,16 @@ window.footerInfo = function(checkedIdList)
return {html: summary};
}
window.renderProductPlanList = function(result, {col, row, value})
{
if(col.name === 'execution')
{
if(result[0])
{
result[0] = {html: '<a class="btn ghost toolbar-item text-primary square size-sm" title="' + result[0] + '"><i class="icon icon-run"></i></a>'};
}
}
return result;
}
+2 -1
View File
@@ -226,6 +226,7 @@ dtable
set::customCols(true),
set::nested(true),
set::checkable(true),
set::onRenderCell(jsRaw('window.renderProductPlanList')),
set::sortLink(createLink('product', 'all', "browseType={$browseType}&orderBy={name}_{sortType}&recTotal={$recTotal}&recPerPage={$recPerPage}")),
set::footToolbar(array
(
@@ -256,7 +257,7 @@ dtable
set::recTotal($pager->recTotal),
set::linkCreator(inlink('browse', "productID=$productID&branch=$branch&browseType=$browseType&queryID=$queryID&orderBy={$orderBy}&recTotal={$recTotal}&recPerPage={$recPerPage}&pageID={page}"))
),
set::checkInfo(jsRaw("function(checkedIDList){ return footerInfo(checkedIDList);}"))
set::checkInfo(jsRaw("function(checkedIDList){ return window.footerSummary(checkedIDList);}"))
);
jsVar('pageSummary', $summary);