- Raids: "Max. Spieler" only whole numbers up to groups x 5 (max. 10 groups / 50), gearscore only a number; fixed +1 Lumipunkt per participation, other values only with the new raids.points permission; pick an existing premade per group when creating a raid; unchanged legacy values no longer block editing - Raid page updates itself every 15 s while visible (raids_live.php, cards rendered by includes/raid_card.php), open editors and confirm dialogs are kept - Restore takes the new raid_id from the bot (archived messages are now deleted in Discord) and moves settings, attendance and awards; website signups send the server display name - Premades: dissolve by leadership needs a reason, lead gets DMs on join/assign/decline/remove (source/actor_id sent to the bot), transfer picker skips players who already lead a group, website accept keeps the one-group rule, no commas in names - Site-wide Lumina dialog (assets/js/confirm-dialog.js) replaces confirm/prompt/alert via data-confirm; error flashes are a dialog you confirm with OK - Calendar: audience per entry (all / leadership takes part / internal) with the new calendar.leadership permission; day cells list all entries and scroll - Gear planner: main-hand picker filtered by the set's class, mismatches marked, "keine Klasse" option, link to an external skill/Daevanion plan per set - Map: correct kisk icons (Elyos on Verteron/Abyss, Altgard fixed), per-map max zoom and bounded panning, German texts, data source note - Tactics: toolbar as a uniform grid, whole-tactic copy, automatic versions with restore and a 90-day trash, official tactics protected - Global thin gold scrollbars, readable hover colours, "Sedes Luminis" spelling, patch notes and README, schema version 34 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
50 lines
2.2 KiB
JavaScript
50 lines
2.2 KiB
JavaScript
/**
|
|
* Suche auf der Raid-Seite: blendet Raids aus, die nicht passen (Titel, Termin, Anforderungen,
|
|
* Gruppen, Spieler, Klassen), und hebt passende Spieler in den Gruppen hervor. Der Suchbegriff
|
|
* wandert beim Wechsel der Kategorie (Aktiv / Archiviert / Alle) mit.
|
|
*/
|
|
(function () {
|
|
'use strict';
|
|
|
|
var input = document.getElementById('raid-search');
|
|
if (!input) return;
|
|
|
|
var count = document.getElementById('raid-search-count');
|
|
var empty = document.getElementById('raid-search-empty');
|
|
var tabs = document.querySelectorAll('.filter-tabs .filter-tab');
|
|
|
|
function apply() {
|
|
var q = input.value.trim().toLowerCase();
|
|
var shown = 0;
|
|
// Jedes Mal neu suchen - die Live-Aktualisierung ersetzt einzelne Karten.
|
|
var cards = Array.prototype.slice.call(document.querySelectorAll('.raid-card[data-search]'));
|
|
|
|
cards.forEach(function (card) {
|
|
var match = !q || card.dataset.search.indexOf(q) !== -1;
|
|
card.hidden = !match;
|
|
if (match) shown++;
|
|
card.querySelectorAll('.raid-signup-item').forEach(function (item) {
|
|
var hit = q && ((item.dataset.name || '').toLowerCase().indexOf(q) !== -1
|
|
|| (item.dataset.class || '').toLowerCase().indexOf(q) !== -1);
|
|
item.classList.toggle('search-hit', !!hit);
|
|
});
|
|
});
|
|
|
|
count.textContent = q ? shown + ' von ' + cards.length + ' Raids' : cards.length + (cards.length === 1 ? ' Raid' : ' Raids');
|
|
empty.hidden = shown > 0;
|
|
|
|
// Suchbegriff in der Adresse und in den Kategorie-Links merken
|
|
tabs.forEach(function (tab) {
|
|
var url = new URL(tab.href, location.href);
|
|
if (q) url.searchParams.set('q', input.value.trim()); else url.searchParams.delete('q');
|
|
tab.href = url.pathname + url.search;
|
|
});
|
|
var here = new URL(location.href);
|
|
if (q) here.searchParams.set('q', input.value.trim()); else here.searchParams.delete('q');
|
|
history.replaceState(null, '', here.pathname + here.search + here.hash);
|
|
}
|
|
|
|
input.addEventListener('input', apply);
|
|
document.addEventListener('raids:updated', apply);
|
|
apply();
|
|
})();
|