From 0b2d10e7b75e8682660d5424b421a06a3638b0ad Mon Sep 17 00:00:00 2001 From: MaxJa4 <74194322+MaxJa4@users.noreply.github.com> Date: Wed, 24 Jan 2024 10:48:28 +0100 Subject: [PATCH] Enhanced icons and tooltips. --- static/index.js | 8 ++++++-- templates/components/bottom_controls.html | 12 ++++++------ templates/components/home_clan_bar.html | 20 ++++++++++++++------ templates/components/home_player_list.html | 15 ++++++++------- templates/components/opp_clan_bar.html | 15 +++++++++------ templates/components/opp_player_list.html | 20 +++++++++++++------- templates/index.html | 4 ++-- templates/login.html | 2 +- templates/modals/add_player.html | 1 + templates/modals/settings.html | 2 +- templates/register.html | 2 +- templates/shards/player_list_item.html | 12 ++++++------ 12 files changed, 68 insertions(+), 45 deletions(-) diff --git a/static/index.js b/static/index.js index a1009b0..f1e8fe9 100644 --- a/static/index.js +++ b/static/index.js @@ -1,9 +1,13 @@ document.addEventListener('DOMContentLoaded', function() { - const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]'); + initTooltips(document); +}); + +function initTooltips(elementRoot) { + const tooltipTriggerList = elementRoot.querySelectorAll('[data-bs-action="tooltip"]'); tooltipTriggerList.forEach((elem) => { new bootstrap.Tooltip(elem); }); -}); +} function setupClanButtons(dropdownId, delBtnId, editBtnId) { const dropdown = document.getElementById(dropdownId); diff --git a/templates/components/bottom_controls.html b/templates/components/bottom_controls.html index 78d3ebb..04d6f0d 100644 --- a/templates/components/bottom_controls.html +++ b/templates/components/bottom_controls.html @@ -3,12 +3,12 @@