mirror of
https://github.com/nfonteyne/octane-website.git
synced 2026-09-03 23:24:48 +02:00
fix: .panel container still visible when empty
This commit is contained in:
parent
6042d92f47
commit
0b4abe5b80
2 changed files with 4 additions and 1 deletions
|
|
@ -31,7 +31,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="rehearsals-section" style="display:none">
|
<div id="rehearsals-section" style="display:none">
|
||||||
<h2 style="margin:1.5rem 0 0.5rem">Répétitions proposées</h2>
|
<h2 id="rehearsals-title" style="margin:1.5rem 0 0.5rem">Répétitions proposées</h2>
|
||||||
<div class="panel" id="rehearsals-list"></div>
|
<div class="panel" id="rehearsals-list"></div>
|
||||||
<details class="rehearsal-voted-section" id="rehearsals-voted-section" style="display:none">
|
<details class="rehearsal-voted-section" id="rehearsals-voted-section" style="display:none">
|
||||||
<summary id="rehearsals-voted-summary">Répétitions traitées</summary>
|
<summary id="rehearsals-voted-summary">Répétitions traitées</summary>
|
||||||
|
|
|
||||||
|
|
@ -454,6 +454,7 @@ function wireRehearsalActions(container) {
|
||||||
|
|
||||||
function renderRehearsals() {
|
function renderRehearsals() {
|
||||||
const section = document.getElementById('rehearsals-section');
|
const section = document.getElementById('rehearsals-section');
|
||||||
|
const title = document.getElementById('rehearsals-title');
|
||||||
const container = document.getElementById('rehearsals-list');
|
const container = document.getElementById('rehearsals-list');
|
||||||
const votedSection = document.getElementById('rehearsals-voted-section');
|
const votedSection = document.getElementById('rehearsals-voted-section');
|
||||||
const votedSummary = document.getElementById('rehearsals-voted-summary');
|
const votedSummary = document.getElementById('rehearsals-voted-summary');
|
||||||
|
|
@ -472,6 +473,8 @@ function renderRehearsals() {
|
||||||
(r) => me && r.votes.some((v) => v.userId === me.id)
|
(r) => me && r.votes.some((v) => v.userId === me.id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
title.style.display = pending.length ? '' : 'none';
|
||||||
|
container.style.display = pending.length ? '' : 'none';
|
||||||
container.innerHTML = pending.map(rehearsalRowTemplate).join('');
|
container.innerHTML = pending.map(rehearsalRowTemplate).join('');
|
||||||
wireRehearsalActions(container);
|
wireRehearsalActions(container);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue