From 74787dffbc5a9d1f6e85678b0b1e5f6084809fe8 Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Sun, 9 Aug 2020 18:32:16 +0200 Subject: [PATCH] Message d'attente --- core/module/config/view/backup/backup.css | 30 +++++++++++++------- core/module/config/view/backup/backup.js.php | 2 ++ core/module/config/view/backup/backup.php | 2 +- 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/core/module/config/view/backup/backup.css b/core/module/config/view/backup/backup.css index 6b4e29e1..bf1dfa91 100755 --- a/core/module/config/view/backup/backup.css +++ b/core/module/config/view/backup/backup.css @@ -23,27 +23,35 @@ for themselves. Background we set to 80% white with our animation centered, and no-repeating */ .modal { -display: none; - position: fixed; - z-index: 1000; - top: 0; - left: 0; - height: 100%; - width: 100%; - background: rgba( 0, 0, 0, .9 ) + display: none; + position: fixed; + z-index: 1000; + top: 0; + left: 0; + height: 100%; + 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; } \ No newline at end of file diff --git a/core/module/config/view/backup/backup.js.php b/core/module/config/view/backup/backup.js.php index cf101faf..d3325d2c 100755 --- a/core/module/config/view/backup/backup.js.php +++ b/core/module/config/view/backup/backup.js.php @@ -15,6 +15,7 @@ $( document).ready(function() { $("#configBackupSubmit").addClass("disabled").prop("disabled", true); e.preventDefault(); $("body").addClass("loading"); + $(".modal").addClass("alertMessage"); var url = "getUrl(0); ?>/backup"; $.ajax({ type: "POST", @@ -30,6 +31,7 @@ $( document).ready(function() { }, complete: function(){ $("#configBackupSubmit").removeClass("disabled").prop("disabled", false); + $(".modal").removeClass("alertMessage"); } }); }); diff --git a/core/module/config/view/backup/backup.php b/core/module/config/view/backup/backup.php index 8c35a2c7..89a7e0a1 100755 --- a/core/module/config/view/backup/backup.php +++ b/core/module/config/view/backup/backup.php @@ -13,7 +13,7 @@ 'value' => 'Sauvegarder' ]); ?> - +