earhert
This commit is contained in:
parent
cc6ad77b1e
commit
3108a1924e
@ -16,6 +16,23 @@ function ghLoadCSS() {
|
||||
}
|
||||
}
|
||||
|
||||
/* ── Gründen-Button Status ───────────────────────────────── */
|
||||
function ghUpdateCreateBtn() {
|
||||
const btn = document.getElementById('gh-create-toggle-btn');
|
||||
if (!btn) return;
|
||||
if (gh_isGuildLeader) {
|
||||
btn.disabled = true;
|
||||
btn.title = 'Gildenmeister und Stellv. Gildenmeister können keine weitere Gilde gründen';
|
||||
btn.style.opacity = '0.4';
|
||||
btn.style.cursor = 'not-allowed';
|
||||
} else {
|
||||
btn.disabled = false;
|
||||
btn.title = '';
|
||||
btn.style.opacity = '';
|
||||
btn.style.cursor = '';
|
||||
}
|
||||
}
|
||||
|
||||
/* ── Popup sicherstellen ────────────────────────────────── */
|
||||
function ghEnsurePopup() {
|
||||
if (document.getElementById('gildenhalle-popup')) return;
|
||||
@ -131,22 +148,6 @@ function ghEnsurePopup() {
|
||||
});
|
||||
|
||||
/* Gründen-Toggle */
|
||||
function ghUpdateCreateBtn() {
|
||||
const btn = document.getElementById('gh-create-toggle-btn');
|
||||
if (!btn) return;
|
||||
if (gh_isGuildLeader) {
|
||||
btn.disabled = true;
|
||||
btn.title = 'Gildenmeister können keine weitere Gilde gründen';
|
||||
btn.style.opacity = '0.4';
|
||||
btn.style.cursor = 'not-allowed';
|
||||
} else {
|
||||
btn.disabled = false;
|
||||
btn.title = '';
|
||||
btn.style.opacity = '';
|
||||
btn.style.cursor = '';
|
||||
}
|
||||
}
|
||||
|
||||
document.getElementById('gh-create-toggle-btn').addEventListener('click', () => {
|
||||
if (gh_isGuildLeader) return;
|
||||
document.getElementById('gh-create-form-wrap').style.display = 'block';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user