This is an automated email from the ASF dual-hosted git repository.
sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-release.git
The following commit(s) were added to refs/heads/main by this push:
new 54b6f27 Fix striping in the checks table
54b6f27 is described below
commit 54b6f27022a1199c699e409cb1e873932bf9f489
Author: Sean B. Palmer <[email protected]>
AuthorDate: Fri Sep 12 20:21:59 2025 +0100
Fix striping in the checks table
---
atr/templates/report-selected-path.html | 24 ++++++++++++++++++------
1 file changed, 18 insertions(+), 6 deletions(-)
diff --git a/atr/templates/report-selected-path.html
b/atr/templates/report-selected-path.html
index 3db5f84..aae1a66 100644
--- a/atr/templates/report-selected-path.html
+++ b/atr/templates/report-selected-path.html
@@ -100,7 +100,7 @@
<div class="mb-3">
{% if primary_results %}
- <table class="table table-bordered table-striped border mb-3">
+ <table class="table table-bordered border mb-3">
<thead class="table-light">
<tr>
<th scope="col" class="w-15">Check</th>
@@ -381,20 +381,31 @@
}
if (type === "member") {
updateMemberStriping();
+ } else if (type === "primary") {
+ updatePrimaryStriping();
}
}
- function updateMemberStriping() {
+ function restripeVisibleRows(rowSelector, stripeClass) {
let visibleIdx = 0;
- document.querySelectorAll(".atr-result-member").forEach(r => {
- r.classList.remove("page-member-visible-odd");
- if (!r.classList.contains("atr-hide") &&
!r.classList.contains("page-member-path-hide")) {
- if (visibleIdx % 2 === 0)
r.classList.add("page-member-visible-odd");
+ document.querySelectorAll(rowSelector).forEach(row => {
+ row.classList.remove(stripeClass);
+ const hidden = row.classList.contains("atr-hide") ||
row.classList.contains("page-member-path-hide");
+ if (!hidden) {
+ if (visibleIdx % 2 === 0) row.classList.add(stripeClass);
visibleIdx++;
}
});
}
+ function updatePrimaryStriping() {
+ restripeVisibleRows(".atr-result-primary",
"page-member-visible-odd");
+ }
+
+ function updateMemberStriping() {
+ restripeVisibleRows(".atr-result-member", "page-member-visible-odd");
+ }
+
const mpfInput = document.getElementById("member-path-filter");
if (mpfInput) {
mpfInput.addEventListener("input", function() {
@@ -412,6 +423,7 @@
updateMemberStriping();
});
}
+ updatePrimaryStriping();
updateMemberStriping();
</script>
{% endblock javascripts %}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]