From 9eda0f6a7ba4eab2b4338484e322a1561c84c047 Mon Sep 17 00:00:00 2001 From: Frank Weinberg Date: Thu, 30 Dec 2021 20:26:08 +0100 Subject: [PATCH 01/40] Move automation settings from rules to settings redesign settings window/tab and add some settings that were missing --- html/components/igrf-tab.css | 5 +- html/components/igrf-tab.js | 18 +- html/components/settings-tab.css | 9 +- html/components/settings-tab.js | 234 +++++++++++------- html/components/team-time-tab.css | 2 +- html/components/team-time-tab.js | 31 ++- html/views/common.js | 2 +- html/views/overlay/index.html | 6 +- .../scoreboard/core/admin/SettingsImpl.java | 18 +- .../scoreboard/core/game/GameImpl.java | 22 +- .../scoreboard/core/game/TeamImpl.java | 6 +- .../scoreboard/core/interfaces/Game.java | 2 +- .../core/interfaces/ScoreBoard.java | 8 + .../scoreboard/core/interfaces/Team.java | 5 +- .../core/prepared/PreparedTeamImpl.java | 6 +- .../scoreboard/rules/Rule.java | 23 +- .../scoreboard/utils/StatsbookExporter.java | 3 +- .../scoreboard/core/game/GameImplTests.java | 20 +- .../scoreboard/core/game/TeamImplTests.java | 5 +- .../core/prepared/RulesetsImplTests.java | 3 +- .../json/ScoreBoardJSONListenerTests.java | 3 +- 21 files changed, 274 insertions(+), 157 deletions(-) diff --git a/html/components/igrf-tab.css b/html/components/igrf-tab.css index c6576d394..b2f4b46f7 100644 --- a/html/components/igrf-tab.css +++ b/html/components/igrf-tab.css @@ -6,8 +6,9 @@ #Igrf .Hide { display: none; } -#Igrf tr.Name > td { background: #ccc; border-radius: 12px 12px 0px 0px; font-size: 200%; font-weight: bold; } -#Igrf tr.Name > td > button { font-size: 50%; margin-left: 5px; } +#Igrf tr.Name > td { background: #ccc; border-radius: 12px 12px 0px 0px; } +#Igrf tr.Name > td > span.Name { font-size: 200%; font-weight: bold; } +#Igrf tr.Name > td > button { margin-left: 5px; } #Igrf tr.Files > td { background: #ddd; } #Igrf tr.Files .ui-button { margin: 1px 5px; } diff --git a/html/components/igrf-tab.js b/html/components/igrf-tab.js index 55676529c..2522377bd 100644 --- a/html/components/igrf-tab.js +++ b/html/components/igrf-tab.js @@ -16,7 +16,23 @@ function createIgrfTab(tab, gameId) { .append($('').addClass('NSOs')) .append($('
').addClass('Separator')) .append($('').addClass('Refs')); - var gameName = $('').appendTo(table.find('tr.Name>td')); + var gameName = $('') + .addClass('Name') + .appendTo(table.find('tr.Name>td')) + .on('click', function () { + gameName.addClass('Hide'); + nameFormatLabel.removeClass('Hide'); + nameFormat.removeClass('Hide').focus(); + }); + var nameFormatLabel = $('').addClass('Hide').text('Name Format: ').appendTo(table.find('tr.Name>td')); + var nameFormat = WSControl(gamePrefix + '.NameFormat', $('')) + .addClass('Hide') + .appendTo(table.find('tr.Name>td')) + .on('focusout', function () { + nameFormat.addClass('Hide'); + nameFormatLabel.addClass('Hide'); + gameName.removeClass('Hide'); + }); var endButton = $('