Message d'attente

This commit is contained in:
Fred Tempez 2020-08-09 18:32:16 +02:00
parent 7c956dd919
commit 74787dffbc
3 changed files with 22 additions and 12 deletions

View File

@ -23,7 +23,7 @@
for themselves. Background we set to 80% white with
our animation centered, and no-repeating */
.modal {
display: none;
display: none;
position: fixed;
z-index: 1000;
top: 0;
@ -32,18 +32,26 @@ display: none;
width: 100%;
background: rgba( 0, 0, 0, .9 )
url('core/vendor/zwiico/img/ajax-loader.png')
50% 50%
50% 45%
no-repeat;
}
.alertMessage {
color: lightgrey;
display: none;
display: flex;
align-items: center;
justify-content: center;
}
/* When the body has the loading class, we turn
the scrollbar off with overflow:hidden */
body.loading .modal {
body.loading .modal .alertMessage {
overflow: hidden;
}
/* Anytime the body has the loading class, our
modal element will be visible */
body.loading .modal {
body.loading .modal .alertMessage {
display: block;
}

View File

@ -15,6 +15,7 @@ $( document).ready(function() {
$("#configBackupSubmit").addClass("disabled").prop("disabled", true);
e.preventDefault();
$("body").addClass("loading");
$(".modal").addClass("alertMessage");
var url = "<?php echo helper::baseUrl() . $this->getUrl(0); ?>/backup";
$.ajax({
type: "POST",
@ -30,6 +31,7 @@ $( document).ready(function() {
},
complete: function(){
$("#configBackupSubmit").removeClass("disabled").prop("disabled", false);
$(".modal").removeClass("alertMessage");
}
});
});

View File

@ -13,7 +13,7 @@
'value' => 'Sauvegarder'
]); ?>
</div>
<div class="modal"><!-- Emplacement pour l'animation --></div>
<div class="modal">Merci de patienter, je travaille pour vous.<!-- Emplacement pour l'animation --></div>
</div>
<div class="row">
<div class="col8 offset2">