Implement scrollback modal

This commit is contained in:
2022-08-09 07:20:30 +01:00
parent e335bdf722
commit 703f36751d
10 changed files with 338 additions and 127 deletions

View File

@@ -122,7 +122,7 @@ $(document).ready(function(){
// Show table content and hide spiner
var show_table_content = function($table_class_container){
$table_class_container.find("#loader").hide();
$table_class_container.find(".table-container").show();
$table_class_container.find("#table-container").show();
const event = new Event('restore-scroll');
document.dispatchEvent(event);
};
@@ -222,7 +222,7 @@ $(document).ready(function(){
if(idx==undefined) {
idx = 0;
}
return $('.table-container').eq(idx).find('.btn-shift-column').filter(function(z) {
return $('#table-container').eq(idx).find('.btn-shift-column').filter(function(z) {
return $(this).data('state')=='off'
}).map(function(z) {
return $(this).data('td-class')

View File

@@ -2,12 +2,20 @@
var modal = document.getElementById("modal");
var html = document.querySelector('html');
var disableModal = function() {
modal.classList.remove('is-active');
html.classList.remove('is-clipped');
var modal_refresh = document.getElementsByClassName("modal-refresh");
for(var i = 0; i < modal_refresh.length; i++) {
modal_refresh[i].remove();
}
}
var elements = document.querySelectorAll('.modal-background');
for(var i = 0; i < elements.length; i++) {
elements[i].addEventListener('click', function(e) {
// elements[i].preventDefault();
modal.classList.remove('is-active');
html.classList.remove('is-clipped');
disableModal();
});
}
@@ -15,8 +23,7 @@ var elements = document.querySelectorAll('.modal-close');
for(var i = 0; i < elements.length; i++) {
elements[i].addEventListener('click', function(e) {
// elements[i].preventDefault();
modal.classList.remove('is-active');
html.classList.remove('is-clipped');
disableModal();
});
}
@@ -25,8 +32,7 @@ function activateButtons() {
for(var i = 0; i < elements.length; i++) {
elements[i].addEventListener('click', function(e) {
// elements[i].preventDefault();
modal.classList.remove('is-active');
html.classList.remove('is-clipped');
disableModal();
});
}
}