diff --git a/server/fishtest/static/js/application.js b/server/fishtest/static/js/application.js index d1fa8e0f3..f8312c036 100644 --- a/server/fishtest/static/js/application.js +++ b/server/fishtest/static/js/application.js @@ -308,6 +308,7 @@ function handleSortingTables() { const th = target; const table = th.closest("table"); const body = table.querySelector("tbody"); + const headers = table.querySelectorAll("th"); Array.from(body.querySelectorAll("tr")) .sort( comparer( @@ -322,6 +323,11 @@ function handleSortingTables() { } body.append(tr); }); + + headers.forEach((header) => { + header.removeAttribute("aria-sort"); + }); + th.setAttribute("aria-sort", this.asc ? "ascending" : "descending"); } }); } diff --git a/server/fishtest/static/js/live_elo.js b/server/fishtest/static/js/live_elo.js index 0e08590b8..db8f9fe50 100644 --- a/server/fishtest/static/js/live_elo.js +++ b/server/fishtest/static/js/live_elo.js @@ -197,7 +197,9 @@ async function followLive(testId) { async function mainWorker() { while (true) { - if (isTabFocused) { + const switchElement = document.getElementById("auto-refresh-switch"); + const autoRefresh = switchElement.checked; + if (autoRefresh && isTabFocused) { update(); } await asyncSleep(20000); diff --git a/server/fishtest/templates/actions.mak b/server/fishtest/templates/actions.mak index fb08c179b..c5bbd5160 100644 --- a/server/fishtest/templates/actions.mak +++ b/server/fishtest/templates/actions.mak @@ -4,16 +4,16 @@ import datetime %> -