1
0
mirror of https://git.topisto.net/tibo/template.git synced 2026-03-31 15:09:10 +00:00
This commit is contained in:
Thibaud
2025-06-02 13:40:19 +02:00
parent d3ac06439b
commit c225f20923
5 changed files with 63 additions and 57 deletions

View File

@@ -1,7 +1,7 @@
window.addEventListener('load', function() { window.scrollTo(0,0); }, false);
/*
* Personnalisation
* Personnalisation HEADER visibility
* Que se passe-t-il lorsque la bannière est invisible ?
*/
function setLogoVisiblity(visibilityFlag) {
@@ -11,31 +11,24 @@
element.style.visibility = value;
}
function setNavbarStickOnTop(topFlag) {
let element = document.querySelector("#nav");
if (topFlag) element.style.setProperty('top', '0px');
else element.style.removeProperty('top');
function setSynthesisTopHeight(hauteur) {
let element = document.querySelector("#synthesis_top");
element.style.height = hauteur+'px';
}
function setDataGridFootSticky(stickyFlag) {
let element = null;
if (stickyFlag) {
//
// Mettre le tfoot sticky au bottom
//
element = document.querySelector("#datagrid>table>tfoot");
element.style.setProperty('position', 'sticky');
element.style.setProperty('bottom', '0px');
element.style.setProperty('z-index', '30');
} else {
element = document.querySelector("#datagrid>table>tfoot");
element.style.setProperty('position', 'relative');
element.style.setProperty('z-index', '10');
}
function headerIsNowVisible(header) {
setLogoVisiblity(false);
setSynthesisTopHeight(6);
}
function headerIsNowInvisible(header) {
setLogoVisiblity(true);
setSynthesisTopHeight(80);
scrollToElement('#synthesis_top');
}
/*
* Personnalisation
* Personnalisation SYNTHESIS visibility
* Que se passe-t-il lorsque la synthèse est invisible ?
*/
function setDatagridFirstColSticky(stickyFlag) {
@@ -92,6 +85,46 @@
}
}
function setDataGridFootSticky(stickyFlag) {
let element = document.querySelector("#datagrid>table>tfoot");;
if (stickyFlag) {
//
// Mettre le tfoot sticky au bottom
//
element.style.setProperty('position', 'sticky');
element.style.setProperty('bottom', '0px');
element.style.setProperty('z-index', '30');
setDataGridHeadSticky(stickyFlag);
} else {
element.style.setProperty('position', 'relative');
element.style.setProperty('z-index', '10');
}
}
function synthesisIsNowVisible(entry) {
setDatagridHeadSticky(false);
setDataGridFootSticky(false);
/*
setDatagridFirstColSticky(true);
*/
myLog('Trigger synthesis is visible');
}
function synthesisIsNowInvisible(entry) {
setDatagridHeadSticky(true);
setDataGridFootSticky(true);
/*
setDatagridFirstColSticky(true);
*/
myLog('Trigger synthesis is invisible');
}
function smoothJump(hash) {
location.replace("#" + hash);
}
@@ -128,36 +161,6 @@
window.scrollTo(0, element.offsetHeight + 1);
}
function headerIsNowVisible(header) {
setLogoVisiblity(false);
}
function headerIsNowInvisible(header) {
setLogoVisiblity(true);
}
function synthesisIsNowVisible(entry) {
setDatagridHeadSticky(false);
setDataGridFootSticky(false);
/*
setDatagridFirstColSticky(true);
*/
myLog('Trigger synthesis is visible');
}
function synthesisTopIsNowInvisible(entry) {
setDatagridHeadSticky(true);
setDataGridFootSticky(true);
/*
setDatagridFirstColSticky(true);
*/
myLog('Trigger synthesis is invisible');
}
function initDatagrid()
{
let fonctionAffichageDataGrid = datagrid_hooks['random'];
@@ -191,6 +194,7 @@
}
function activeMenu(element) {
scrollToElement('#synthesis_top');
activeMode(element.innerText);
}