Scroll table pour avoir l'étudiant selectionné visible - à tester sur d'autres navigateurs?

This commit is contained in:
Emmanuel Viennet 2023-02-12 04:20:08 +01:00
parent 58ecc52440
commit 211054a9af

View File

@ -219,7 +219,8 @@ $(function () {
buttons: buttons,
"drawCallback": function (settings) {
// permet de conserver l'ordre de tri des colonnes
let order_info = JSON.stringify($('table.table_recap').DataTable().order());
let table = $('table.table_recap').DataTable();
let order_info = JSON.stringify(table.order());
if (formsemestre_id) {
localStorage.setItem(order_info_key, order_info);
}
@ -259,8 +260,8 @@ $(function () {
$(function () {
let row_selected = document.querySelector(".row_selected");
if (row_selected) {
/*row_selected.scrollIntoView();
window.scrollBy(0, -50);*/
row_selected.scrollIntoView();
window.scrollBy(0, -125);
row_selected.classList.add("selected");
}
});