From 1aeb9befa69f25179d5d0c6c36080a1c93386d68 Mon Sep 17 00:00:00 2001 From: "jakub.salavec" Date: Thu, 19 Jun 2025 15:08:30 +0200 Subject: [PATCH] Modified - Nicer display of wc queues and events --- .../src/main/web/css/gemp-001/hall.css | 4 +++ .../src/main/web/js/gemp-022/hallUi.js | 26 +++++++++++++------ 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/gemp-lotr/gemp-lotr-async/src/main/web/css/gemp-001/hall.css b/gemp-lotr/gemp-lotr-async/src/main/web/css/gemp-001/hall.css index eb0926655..a55badde3 100644 --- a/gemp-lotr/gemp-lotr-async/src/main/web/css/gemp-001/hall.css +++ b/gemp-lotr/gemp-lotr-async/src/main/web/css/gemp-001/hall.css @@ -889,3 +889,7 @@ form#queueSpawnerForm input { .italic { font-style: italic; } + +.bold { + font-weight: bold; + } diff --git a/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/hallUi.js b/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/hallUi.js index e84bccd3c..acb965ff7 100644 --- a/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/hallUi.js +++ b/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/hallUi.js @@ -1144,7 +1144,7 @@ var GempLotrHallUI = Class.extend({ tablesRow.append("" + queue.getAttribute("format") + ""); let htmlTd = ""; if (isWC) { - htmlTd += "WC"; + htmlTd += "World Championship"; } else { // For system, ignore all after ',' (min players) htmlTd += queue.getAttribute("system").split(',')[0] + " Tournament"; @@ -1160,8 +1160,9 @@ var GempLotrHallUI = Class.extend({ tablesRow.append(actionsField); if (joined == "true") { tablesRow.addClass("played"); - } else if (isWC) { - tablesRow.addClass("wc-events"); + } + if (isWC) { + tablesRow.addClass("bold"); } if (action == "add") { @@ -1391,7 +1392,11 @@ var GempLotrHallUI = Class.extend({ } var tablesRow = $(""); tablesRow.append("" + tournament.getAttribute("format") + ""); - tablesRow.append("" + tournament.getAttribute("system") + " Tournament - " + displayType + " - " + tournament.getAttribute("name") + ""); + if (isWC) { + tablesRow.append("World Championship - " + displayType + " - " + tournament.getAttribute("name") + ""); + } else { + tablesRow.append("" + tournament.getAttribute("system") + " Tournament - " + displayType + " - " + tournament.getAttribute("name") + ""); + } if (tournament.hasAttribute("timeRemaining")) { tablesRow.append("" + tournament.getAttribute("stage") + " - " + tournament.getAttribute("timeRemaining") + ""); } else if (tournament.getAttribute("stage") === "Playing Games") { @@ -1399,12 +1404,17 @@ var GempLotrHallUI = Class.extend({ } else { tablesRow.append("" + tournament.getAttribute("stage") + ""); } - tablesRow.append("" + tournament.getAttribute("playerList") + ""); + if (tournament.getAttribute("playerCount") <= 8) { + tablesRow.append("" + tournament.getAttribute("playerList") + ""); + } else { + tablesRow.append("
" + tournament.getAttribute("playerCount") + "
"); + } tablesRow.append(actionsField); if (joined == "true") { - tablesRow.addClass("played"); // red highlight - } else if (isWC) { - tablesRow.addClass("wc-events"); // yellow highlight + tablesRow.addClass("played"); + } + if (isWC) { + tablesRow.addClass("bold"); } if (action == "add") {