forked from ScoDoc/ScoDoc
Fix détails sur tables recap avec nouvelle version de datatables.
This commit is contained in:
parent
ad8bb5aace
commit
3cecfbb697
@ -46,4 +46,14 @@ table.dataTable tr.gt_lastrow th {
|
||||
table.dataTable td.etudinfo,
|
||||
table.dataTable td.group {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
div.dt-container div.dt-search {
|
||||
display: inline-block;
|
||||
margin-left: 16px;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
div.dt-container div.dt-search input {
|
||||
margin-left: 0.5em;
|
||||
}
|
@ -4367,7 +4367,7 @@ div.table_recap {
|
||||
}
|
||||
|
||||
.table_recap .but_on {
|
||||
background-color: rgb(177, 238, 162);
|
||||
background-color: rgb(177, 238, 162) !important;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
@ -4381,17 +4381,17 @@ button.unselect {
|
||||
.table_recap div.but_on:hover:not(.disabled),
|
||||
.table_recap a.but_on:hover:not(.disabled),
|
||||
.table_recap input.but_on:hover:not(.disabled) {
|
||||
background: linear-gradient(to bottom, lightgray 0%, rgb(51, 255, 0) 100%);
|
||||
background: linear-gradient(to bottom, lightgray 0%, rgb(255, 0, 0) 100%) !important;
|
||||
}
|
||||
|
||||
.table_recap button.but_off:hover:not(.disabled),
|
||||
.table_recap div.but_off:hover:not(.disabled),
|
||||
.table_recap a.but_off:hover:not(.disabled),
|
||||
.table_recap input.but_off:hover:not(.disabled) {
|
||||
background: linear-gradient(to bottom, rgb(51, 255, 0) 0%, lightgray 100%);
|
||||
background: linear-gradient(to bottom, rgb(51, 255, 0) 0%, lightgray 100%) !important;
|
||||
}
|
||||
|
||||
/* Non supproté par les navigateurs (en Fev. 2023)
|
||||
/* Non supporté par les navigateurs (en Fev. 2023)
|
||||
.table_recap button:has(span a.clearreaload) {
|
||||
}
|
||||
*/
|
||||
|
@ -206,11 +206,22 @@ $(function () {
|
||||
fixedColumns: { // fige les 3 colonnes de gauche
|
||||
start: 3
|
||||
},
|
||||
initComplete: function (settings, json) {
|
||||
// fixe la largeur de la table (évite décalages colonnes)
|
||||
document.getElementById("DataTables_Table_0").style.width =
|
||||
document.querySelector(
|
||||
"#DataTables_Table_0_wrapper .dt-scroll-head .dt-scroll-headInner"
|
||||
).style.width;
|
||||
// déplace champ recherche à côté des boutons
|
||||
let div_search = document.querySelector('div.dt-search');
|
||||
let div_buttons = document.querySelector('div.dt-buttons');
|
||||
div_buttons.appendChild(div_search);
|
||||
},
|
||||
fixedHeader: { // fige les lignes de titre
|
||||
header: true,
|
||||
footer: false,
|
||||
},
|
||||
orderCellsTop: true, // cellules ligne 1 pour tri
|
||||
ordering: true, // bouton tri
|
||||
aaSorting: [], // Prevent initial sorting
|
||||
colReorder: true,
|
||||
stateSave: true, // enregistre état de la table (tris, ...)
|
||||
|
@ -565,6 +565,8 @@ class RowGroupsHeader(Row):
|
||||
):
|
||||
idx += 1
|
||||
colspan += 1
|
||||
elements.append(f"""<th colspan="{colspan}">{group_title or ""}</th>""")
|
||||
elements.append(
|
||||
f"""<th data-dt-order="disable" colspan="{colspan}">{group_title or ""}</th>"""
|
||||
)
|
||||
|
||||
return "\n".join(elements) if len(elements) > 1 else ""
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- mode: python -*-
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
SCOVERSION = "9.7.R000"
|
||||
SCOVERSION = "9.7.R001"
|
||||
|
||||
SCONAME = "ScoDoc"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user