Add wait cursor during ajax

This commit is contained in:
2023-05-29 22:37:05 +02:00
parent 007c419979
commit 1b362f2110
3 changed files with 33 additions and 15 deletions

View File

@@ -10,21 +10,24 @@
crossorigin="anonymous"
/>
<style>
body {
font-family: Courier;
}
#file-table tbody tr.selected td {
background-color: #0dcaf0;
color: white;
}
#report-table tbody tr.selected td {
background-color: #0dcaf0;
color: white;
}
.btn-small {
padding: 0.25rem 0.5rem;
font-size: 0.75rem;
}
body {
font-family: Courier;
}
#file-table tbody tr.selected td {
background-color: #0dcaf0;
color: white;
}
#report-table tbody tr.selected td {
background-color: #0dcaf0;
color: white;
}
.btn-small {
padding: 0.25rem 0.5rem;
font-size: 0.75rem;
}
.ajaxLoading {
cursor: progress !important;
}
</style>
{% else %}
<link
@@ -39,6 +42,9 @@
.tag {
cursor: pointer;
}
.ajaxLoading {
cursor: progress !important;
}
</style>
{% endif %}
<link

View File

@@ -8,6 +8,12 @@ $(document).ready(function () {
$(this).addClass('{{ selected }}');
}
});
$(document).ajaxStart(function(){
$("body").addClass('ajaxLoading');
});
$(document).ajaxStop(function(){
$("body").removeClass('ajaxLoading');
});
});
function excelFile() {
var selectedFiles = ["{{ file }}"];

View File

@@ -23,6 +23,12 @@ $(document).ready(function () {
$(this).addClass('{{ selected }}');
}
});
$(document).ajaxStart(function(){
$("body").addClass('ajaxLoading');
});
$(document).ajaxStop(function(){
$("body").removeClass('ajaxLoading');
});
});
function showFile(selectedFile) {
var form = $('<form action="/show" method="post">' +