.
This commit is contained in:
parent
706cfe57a8
commit
68f12b0661
@ -384,7 +384,7 @@ body::before{content:'';position:fixed;inset:0;background-image:radial-gradient(
|
||||
<div style="font-family:'Share Tech Mono',monospace;font-size:9px;letter-spacing:3px;color:var(--muted);text-transform:uppercase;margin-top:5px;">Danksagungen · Partner · Community</div>
|
||||
</div>
|
||||
<div id="credits-admin-btn" style="display:none;">
|
||||
<button class="btn-accent" id="btn-add-credit">+ Eintrag hinzufügen</button>
|
||||
<button class="btn-accent" id="btn-add-credit" onclick="openCreditForm(null)">+ Eintrag hinzufügen</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="credits-partners-section">
|
||||
@ -501,7 +501,7 @@ body::before{content:'';position:fixed;inset:0;background-image:radial-gradient(
|
||||
<!-- Credits Editor Modal -->
|
||||
<div class="modal-bg" id="credits-modal">
|
||||
<div class="modal-box" style="max-width:600px;">
|
||||
<button class="modal-close" id="close-credits-modal">✕</button>
|
||||
<button class="modal-close" id="close-credits-modal" onclick="closeModal('credits-modal')">✕</button>
|
||||
<div class="modal-hd">
|
||||
<div class="modal-title" id="cm-title">Eintrag hinzufügen</div>
|
||||
<div class="modal-sub">Admin · Credits Editor</div>
|
||||
@ -560,8 +560,8 @@ body::before{content:'';position:fixed;inset:0;background-image:radial-gradient(
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-footer">
|
||||
<button class="btn-sm" id="btn-cancel-credits">Abbrechen</button>
|
||||
<button class="btn-accent" id="btn-save-credit">Speichern</button>
|
||||
<button class="btn-sm" id="btn-cancel-credits" onclick="closeModal('credits-modal')">Abbrechen</button>
|
||||
<button class="btn-accent" id="btn-save-credit" onclick="saveCreditEntry()">Speichern</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -1019,13 +1019,7 @@ function renderCredits() {
|
||||
const adminBtn = document.getElementById('credits-admin-btn');
|
||||
if (adminBtn) {
|
||||
adminBtn.style.display = currentUser?.isAdmin ? 'block' : 'none';
|
||||
// Event listener neu setzen (sicher mit clone-replace trick)
|
||||
const oldBtn = document.getElementById('btn-add-credit');
|
||||
if (oldBtn) {
|
||||
const newBtn = oldBtn.cloneNode(true);
|
||||
newBtn.addEventListener('click', () => openCreditForm(null));
|
||||
oldBtn.parentNode.replaceChild(newBtn, oldBtn);
|
||||
}
|
||||
// onclick is set directly in HTML
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user