Skip to content

Commit

Permalink
scroll test table tbody
Browse files Browse the repository at this point in the history
  • Loading branch information
schefbi authored Aug 29, 2024
1 parent edc3e46 commit 7bac89c
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions public/apps/MasterExcel/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ function insertButtonsTest() {

setTimeout(function(){
document.getElementById('hide-published').addEventListener("click", (e) => {
$('#overlay-toggle-embedded-test div').empty();
$('#overlay-toggle-embedded-test div').empty();
});
},3000);

Expand All @@ -118,7 +118,14 @@ const observer = new MutationObserver(mutationList =>
setTimeout(function(){
insertButtonsGrading();
insertButtonsTest();

if(document.getElementById('scrollTestTable') != null) {
var addOffset = screen.width > 1920 ? 390 : 194;
if( document.body.offsetHeight > screen.height-document.getElementsByTagName('bkd-tests-header')[0].offsetHeight-addOffset) {
document.getElementById('scrollTestTable').style.height = screen.height-document.getElementsByTagName('bkd-tests-header')[0].offsetHeight-addOffset +'px';
}
}
},200);

}));
observer.observe(window.document,{childList: true, subtree: true});
observer.observe(window.document,{childList: true, subtree: true});

0 comments on commit 7bac89c

Please sign in to comment.