Implement edit-player. Optimizations.

This commit is contained in:
MaxJa4
2024-01-16 20:54:49 +01:00
parent fc084108ac
commit 94e0c178f0
14 changed files with 100 additions and 35 deletions

View File

@@ -44,7 +44,9 @@ function getClanLists(event) {
function getPlayerLists(event) {
const button = event.relatedTarget;
const playerListId = button.getAttribute('data-bs-list');
let playerListId = button.getAttribute('data-bs-list');
if (playerListId === null)
playerListId = '#' + button.closest('ul').parentElement.parentElement.id;
const playerList = document.querySelector(playerListId);
let otherPlayerListId;
@@ -59,7 +61,9 @@ function getPlayerLists(event) {
function getSelectedClan(event) {
const button = event.relatedTarget;
const playerListId = button.getAttribute('data-bs-list');
let playerListId = button.getAttribute('data-bs-list');
if (playerListId === null)
playerListId = '#' + button.closest('ul').parentElement.parentElement.id;
let clanListId;
if (playerListId === '#home-player-list')