From 46d447246a61baa8f138e9a9202474909763b58f Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Sun, 8 Oct 2023 13:09:46 +0800 Subject: [PATCH] * Finish task #103981. --- module/project/js/testtask.js | 24 ++++++++++++++++++++++++ module/project/view/testtask.html.php | 24 +++++++++++++++++++++++- 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 module/project/js/testtask.js diff --git a/module/project/js/testtask.js b/module/project/js/testtask.js new file mode 100644 index 0000000000..7b904e5b23 --- /dev/null +++ b/module/project/js/testtask.js @@ -0,0 +1,24 @@ +$(function() +{ + $('#testtaskForm').table( + { + replaceId: 'taskIdList', + statisticCreator: function(table) + { + var $table = table.getTable(); + var $checkedRows = $table.find('tbody>tr.checked'); + var checkedTotal = $checkedRows.length; + var checkedWait = $checkedRows.filter("[data-status=wait]").length; + var checkedTesting = $checkedRows.filter("[data-status=doing]").length; + var checkedBlocked = $checkedRows.filter("[data-status=blocked]").length; + var checkedDone = $checkedRows.filter("[data-status=done]").length; + var checkedStatistics = checkedAllSummary.replace('%total%', checkedTotal) + .replace('%wait%', checkedWait) + .replace('%testing%', checkedTesting) + .replace('%blocked%', checkedBlocked) + .replace('%done%', checkedDone); + + return checkedTotal ? checkedStatistics : pageSummary; + } + }); +}); diff --git a/module/project/view/testtask.html.php b/module/project/view/testtask.html.php index d10933f067..6e5dc61285 100644 --- a/module/project/view/testtask.html.php +++ b/module/project/view/testtask.html.php @@ -36,6 +36,7 @@ +
@@ -47,7 +48,7 @@

-
+ recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?> @@ -55,6 +56,11 @@ '> @@ -88,7 +94,11 @@
'>testtask->product);?> + +
+ +
+ idAB);?>
testtask->name);?> + + id => sprintf('%03d', $task->id)));?> + id);?> + createLink('testtask', 'cases', "taskID=$task->id"), $task->name, '', "data-app='project'");?> @@ -139,10 +149,22 @@
+testtask->allSummary, $total, $waitCount, $testingCount, $blockedCount, $doneCount));?> +testtask->checkedAllSummary);?>