diff --git a/core/module/config/view/backup/backup.css b/core/module/config/view/backup/backup.css index 8796d11b..af65af6d 100755 --- a/core/module/config/view/backup/backup.css +++ b/core/module/config/view/backup/backup.css @@ -16,45 +16,3 @@ * admin.css */ - -/** -* Effet d'animation -*/ -/* Start by setting display:none to make this hidden. - Then we position it in relation to the viewport window - with position:fixed. Width, height, top and left speak - 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 ) - url('core/module/config/ressource/ajax-loader.png') - 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 .alertMessage { - overflow: hidden; - } - - /* Anytime the body has the loading class, our - modal element will be visible */ - body.loading .modal .alertMessage { - display: block; - } diff --git a/core/module/config/view/backup/backup.js.php b/core/module/config/view/backup/backup.js.php index 7e564b07..cfa4a152 100644 --- a/core/module/config/view/backup/backup.js.php +++ b/core/module/config/view/backup/backup.js.php @@ -15,8 +15,7 @@ $( document).ready(function() { $("#configBackupSubmit").addClass("disabled").prop("disabled", true); e.preventDefault(); if ($("input[name=configBackupOption]").is(':checked')) { - $("body").addClass("loading"); - $(".modal").addClass("alertMessage"); + $('body').css('cursor', 'wait'); } var url = "getUrl(0); ?>/backup"; $.ajax({ @@ -24,17 +23,15 @@ $( document).ready(function() { url: url, data: $("form").serialize(), success: function(data){ - $("body").removeClass("loading"); + $('body').css('cursor', 'default'); core.alert("La sauvegarde a été générée avec succès."); }, error: function(data){ - $("body").removeClass("loading"); + + $('body').css('cursor', 'default'); core.alert("Une erreur s'est produite, la sauvegarde n'a pas été générée !"); }, complete: function(){ - if ($("input[name=configBackupOption]").is(':checked')) { - $(".modal").removeClass("alertMessage"); - } $("#configBackupSubmit").removeClass("disabled").prop("disabled", false); } });