From a94be3bb59f51afd218a4c4668df0144ecb85b80 Mon Sep 17 00:00:00 2001 From: "jakub.salavec" Date: Thu, 19 Jun 2025 15:26:35 +0200 Subject: [PATCH] Removed - wc events section is gone --- .../src/main/web/css/gemp-001/hall.css | 4 - .../src/main/web/js/gemp-022/hallUi.js | 100 ++---------------- 2 files changed, 6 insertions(+), 98 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 a55badde3..071714a42 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 @@ -294,10 +294,6 @@ table.tables tr.privateForPlayer { background-color: #840000; } -.wc-events { - background-color: #666619; -} - .tableFormatName { text-align: center; 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 acb965ff7..49a6a94dd 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 @@ -118,18 +118,14 @@ var GempLotrHallUI = Class.extend({ var hallSettingsStr = $.cookie("hallSettings"); if (hallSettingsStr == null) - hallSettingsStr = "1|1|0|0|0|0|0|0"; + hallSettingsStr = "1|1|0|0|0|0|0"; var hallSettings = hallSettingsStr.split("|"); this.initTable(hallSettings[0] == "1", "waitingTablesHeader", "waitingTablesContent"); this.initTable(hallSettings[1] == "1", "playingTablesHeader", "playingTablesContent"); this.initTable(hallSettings[2] == "1", "finishedTablesHeader", "finishedTablesContent"); - // Those 3 indexes are applied dynamically if there is some data for those sections -// this.initTable(hallSettings[3] == "1", "wcQueuesHeader", "wcQueuesContent"); -// this.initTable(hallSettings[4] == "1", "wcEventsHeader", "wcEventsContent"); -// this.initTable(hallSettings[5] == "1", "scheduledQueuesHeader", "scheduledQueuesContent"); - this.initTable(hallSettings[6] == "1", "recurringQueuesHeader", "recurringQueuesContent"); - this.initTable(hallSettings[7] == "1", "queueSpawnerHeader", "queueSpawnerContent"); + this.initTable(hallSettings[5] == "1", "recurringQueuesHeader", "recurringQueuesContent"); + this.initTable(hallSettings[6] == "1", "queueSpawnerHeader", "queueSpawnerContent"); $("#deckbuilder-button").button(); $("#bug-button").button(); @@ -197,34 +193,6 @@ var GempLotrHallUI = Class.extend({ this.insertEventSection($header, $content, "wcQueues"); }, - addWcEventsSection: function() { - if ($("#wcEventsHeader").length) return; - - const $header = $("
") - .attr("id", "wcEventsHeader") - .addClass("eventHeader wc-events") - .html(`World Championship Events(0)`); - - const $content = $("
") - .attr("id", "wcEventsContent") - .addClass("visibilityToggle") - .append( - $("").addClass("tables wc-events").append(` - - - - - - - - - - `) - ); - - this.insertEventSection($header, $content, "wcEvents"); - }, - addScheduledQueuesSection: function() { if ($("#scheduledQueuesHeader").length) return; @@ -256,13 +224,11 @@ var GempLotrHallUI = Class.extend({ insertEventSection: function($header, $content, sectionKey) { const sectionOrder = [ "wcQueues", - "wcEvents", "scheduledQueues" ]; const sectionIds = { wcQueues: "wcQueuesContent", - wcEvents: "wcEventsContent", scheduledQueues: "scheduledQueuesContent" }; @@ -300,10 +266,8 @@ var GempLotrHallUI = Class.extend({ if (headerId === "wcQueuesHeader" && contentId === "wcQueuesContent") { settingIndex = 3; - } else if (headerId === "wcEventsHeader" && contentId === "wcEventsContent") { - settingIndex = 4; } else if (headerId === "scheduledQueuesHeader" && contentId === "scheduledQueuesContent") { - settingIndex = 5; + settingIndex = 4; } if (settingIndex !== null) { @@ -316,11 +280,6 @@ var GempLotrHallUI = Class.extend({ $("#wcQueuesContent").remove(); }, - removeWcEventsSection: function() { - $("#wcEventsHeader").remove(); - $("#wcEventsContent").remove(); - }, - removeScheduledQueuesSection: function() { $("#scheduledQueuesHeader").remove(); $("#scheduledQueuesContent").remove(); @@ -713,14 +672,13 @@ var GempLotrHallUI = Class.extend({ "playingTablesContent", "finishedTablesContent", "wcQueuesContent", - "wcEventsContent", "scheduledQueuesContent", "recurringQueuesContent", "queueSpawnerContent" ]; // Load current cookie (or use default if missing) - let hallSettingsStr = $.cookie("hallSettings") || "1|1|0|0|0|0|0|0"; + let hallSettingsStr = $.cookie("hallSettings") || "1|1|0|0|0|0|0"; let currentSettings = hallSettingsStr.split("|"); // Update only if the element exists @@ -1343,36 +1301,6 @@ var GempLotrHallUI = Class.extend({ } } - // Tournament for for tournament table (not in Playing Tables Section) - var rowstr = ""; - rowstr += ""; - if(type === "sealed") { - rowstr += ""; - } - else if (type === "solodraft") { - rowstr += ""; - - } - else if (type === "table_solodraft") { - rowstr += ""; - } - else if (type === "table_draft") { - rowstr += ""; - } - else { - rowstr += ""; - } - rowstr += "" + - ""; - if (tournament.hasAttribute("timeRemaining")) { - rowstr += ""; - } else { - rowstr += ""; - } - rowstr += "" + - ""; - var row = $(rowstr); - // Row for tournament playing table var displayType = type; if(type === "sealed") { @@ -1418,13 +1346,7 @@ var GempLotrHallUI = Class.extend({ } if (action == "add") { - // Right now the only tournament section is for WC events - if (isWC) { - that.addWcEventsSection(); - $("table.wc-events", this.tablesDiv) - .append(row); - } - // Display running tournaments also as playing tables + // Display running tournaments as playing tables $("table.playingTables", this.tablesDiv) .append(tablesRow) @@ -1443,9 +1365,6 @@ var GempLotrHallUI = Class.extend({ } } else if (action == "update") { - // Update row in tournaments sections - $(".tournament" + id, this.tablesDiv).replaceWith(row); - // Update row in playing tables section var existingRow = $(".table" + id, this.tablesDiv); if (existingRow.length > 0) { @@ -1459,15 +1378,9 @@ var GempLotrHallUI = Class.extend({ this.animateRowUpdate(".tournament" + id); } else if (action == "remove") { - // Remove tournament both from playing tables section and tournament sections - $(".tournament" + id, this.tablesDiv).remove(); $(".table" + id, this.tablesDiv).remove(); } } - - if($('.wc-events tr').length <= 1) { - that.removeWcEventsSection(); - } var tables = root.getElementsByTagName("table"); for (var i = 0; i < tables.length; i++) { @@ -1661,7 +1574,6 @@ var GempLotrHallUI = Class.extend({ $(".count", $(".eventHeader.finishedTables")).html("(" + ($("tr", $("table.finishedTables")).length - 1) + ")"); $(".count", $(".eventHeader.wc-queues")).html("(" + ($("tr", $("table.wc-queues")).length - 1) + ")"); - $(".count", $(".eventHeader.wc-events")).html("(" + ($("tr", $("table.wc-events")).length - 1) + ")"); var games = root.getElementsByTagName("newGame"); for (var i=0; i
FormatCollectionEvent NameSystemStageRoundPlayers
" + tournament.getAttribute("format") + "SealedSolo DraftSolo Table DraftTable Draft" + tournament.getAttribute("collection") + "" + tournament.getAttribute("name") + "" + tournament.getAttribute("system") + "" + tournament.getAttribute("stage") + " - " + tournament.getAttribute("timeRemaining") + "" + tournament.getAttribute("stage") + "" + tournament.getAttribute("round") + "
" + tournament.getAttribute("playerCount") + "