diff --git a/app/static/css/gt_table.css b/app/static/css/gt_table.css index 9d04b0de..2e8253e6 100644 --- a/app/static/css/gt_table.css +++ b/app/static/css/gt_table.css @@ -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; } \ No newline at end of file diff --git a/app/static/css/scodoc.css b/app/static/css/scodoc.css index 2e759722..7fede43e 100644 --- a/app/static/css/scodoc.css +++ b/app/static/css/scodoc.css @@ -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) { } */ diff --git a/app/static/js/table_recap.js b/app/static/js/table_recap.js index 031d791f..8b861b75 100644 --- a/app/static/js/table_recap.js +++ b/app/static/js/table_recap.js @@ -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, ...) diff --git a/app/tables/table_builder.py b/app/tables/table_builder.py index d7e01358..cec24081 100644 --- a/app/tables/table_builder.py +++ b/app/tables/table_builder.py @@ -565,6 +565,8 @@ class RowGroupsHeader(Row): ): idx += 1 colspan += 1 - elements.append(f"""