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-releases.git
The following commit(s) were added to refs/heads/main by this push:
new 32bfd76 Fix small issues in a few script files
32bfd76 is described below
commit 32bfd763e6486900fe215cc604aaefddbdcb81f9
Author: Sean B. Palmer <[email protected]>
AuthorDate: Thu Dec 11 20:47:12 2025 +0000
Fix small issues in a few script files
---
atr/static/js/src/admin-update-form.js | 8 ++++----
atr/static/js/src/projects-add-form.js | 8 ++++----
atr/static/js/src/projects-directory.js | 12 ++++++------
3 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/atr/static/js/src/admin-update-form.js
b/atr/static/js/src/admin-update-form.js
index e7a9b7c..9f4ef65 100644
--- a/atr/static/js/src/admin-update-form.js
+++ b/atr/static/js/src/admin-update-form.js
@@ -50,10 +50,10 @@ function addStatusMessage(parentElement, message, category)
{
if (category === "error") {
const prefixElement = document.createElement("strong");
const textElement = document.createTextNode("Error: ");
- prefixElement.appendChild(textElement);
- divElement.appendChild(prefixElement);
+ prefixElement.append(textElement);
+ divElement.append(prefixElement);
}
const textNode = document.createTextNode(message);
- divElement.appendChild(textNode);
- parentElement.appendChild(divElement);
+ divElement.append(textNode);
+ parentElement.append(divElement);
}
diff --git a/atr/static/js/src/projects-add-form.js
b/atr/static/js/src/projects-add-form.js
index b77518e..c2b1b21 100644
--- a/atr/static/js/src/projects-add-form.js
+++ b/atr/static/js/src/projects-add-form.js
@@ -8,12 +8,12 @@ document.addEventListener("DOMContentLoaded", () => {
const formTexts = document.querySelectorAll(".form-text, .text-muted");
formTexts.forEach((element) => {
- element.textContent = element.textContent.replace(
- /Example/g,
+ element.textContent = element.textContent.replaceAll(
+ "Example",
committeeDisplayName,
);
- element.textContent = element.textContent.replace(
- /example/g,
+ element.textContent = element.textContent.replaceAll(
+ "example",
committeeName.toLowerCase(),
);
});
diff --git a/atr/static/js/src/projects-directory.js
b/atr/static/js/src/projects-directory.js
index 46135ac..b947927 100644
--- a/atr/static/js/src/projects-directory.js
+++ b/atr/static/js/src/projects-directory.js
@@ -5,14 +5,14 @@ function filter() {
for (const card of cards) {
const nameElement = card.querySelector(".card-title");
const name = nameElement.innerHTML;
- if (!projectFilter) {
- card.parentElement.hidden = false;
- visibleCount++;
- } else {
- card.parentElement.hidden = !name.match(new
RegExp(projectFilter, "i"));
+ if (projectFilter) {
+ card.parentElement.hidden = !new RegExp(projectFilter,
"i").test(name);
if (!card.parentElement.hidden) {
visibleCount++;
}
+ } else {
+ card.parentElement.hidden = false;
+ visibleCount++;
}
}
document.getElementById("project-count").textContent = visibleCount;
@@ -36,7 +36,7 @@
document.querySelectorAll(".page-project-card").forEach((card) => {
if (event.target.closest("form")) {
return;
}
- window.location.href = this.getAttribute("data-project-url");
+ window.location.href = this.dataset.projectUrl;
});
});
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]