update sco_formsemestre_status : hide tableau-modules on mobile

This commit is contained in:
Iziram 2024-08-23 17:30:23 +02:00
parent 8fd1fa5a25
commit bdc6c90bfc
3 changed files with 49 additions and 1 deletions

View File

@ -1126,6 +1126,18 @@ def formsemestre_status(formsemestre_id=None, check_parcours=True):
]
H += [
f"""
<details id="tableau-modules-details" open>
<!-- script pour fermer automatiquement si mobile -->
<script>
document.addEventListener("DOMContentLoaded", () => {{
if (window.innerWidth < 769) {{
document.getElementById("tableau-modules-details").open = false;
}}
}});
</script>
<summary id="tableau-modules-summary">
<h3 title="cliquer pour afficher ou cacher le tableau">Tableau des Ressources et SAEs</h3>
</summary>
<div class="tableau_modules">
{_TABLEAU_MODULES_HEAD}
<tr class="formsemestre_status_cat">
@ -1155,7 +1167,7 @@ def formsemestre_status(formsemestre_id=None, check_parcours=True):
autres, nt, formsemestre, can_edit=can_edit, show_ues=False
),
]
H += [_TABLEAU_MODULES_FOOT, "</div>"]
H += [_TABLEAU_MODULES_FOOT, "</div></details>"]
else:
# formations classiques: groupe par UE
# élimine les modules BUT qui aurait pu se glisser là suite à un

View File

@ -277,3 +277,35 @@ body {
margin: 0 !important;
height: 100vh !important;
}
/* Tableau des modules */
#tableau-modules-summary {
list-style: none;
}
#tableau-modules-summary::marker {
display: none;
}
#tableau-modules-summary>h3::after {
content: "";
display: inline-block;
width: 0;
height: 0;
margin-left: 4px;
vertical-align: middle;
border-top: 4px dashed;
border-right: 4px solid transparent;
border-left: 4px solid transparent;
}
#tableau-modules-details:not([open])>#tableau-modules-summary>h3::before {
content: "(caché) ";
font-size: smaller;
font-weight: lighter;
font-style: italic;
}
#tableau-modules-details:not([open]) #tableau_modules {
display: none;
}

View File

@ -101,4 +101,8 @@
height: var(--size) !important;
}
div.formsemestre_status {
padding: 0;
}
}