Added loading screen to runnow

This commit is contained in:
Jeroen De Meerleer 2017-04-17 10:10:35 +02:00
parent 16f72b47d4
commit dddc0a949c
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG Key ID: 28CCCB8F62BFADD6
3 changed files with 22 additions and 17 deletions

BIN
images/ajax-loader.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

View File

@ -30,6 +30,7 @@ $(document).ready(function() {
$('#nextrunselector').datetimepicker(); $('#nextrunselector').datetimepicker();
$("body").on("click", ".runcron", function() { $("body").on("click", ".runcron", function() {
$("#ajax_loader").show();
fullurl = "/runnow.php?jobID=" + $(this).data("id"); fullurl = "/runnow.php?jobID=" + $(this).data("id");
$.ajax(fullurl).done(function(data) { $.ajax(fullurl).done(function(data) {
results = JSON.parse(data); results = JSON.parse(data);
@ -41,7 +42,8 @@ $(document).ready(function() {
$("#resulttitle").html("Success"); $("#resulttitle").html("Success");
$("#resultbody").text(results["message"]); $("#resultbody").text(results["message"]);
} }
$("#ajax_loader").hide();
$('#resultmodal').modal('show'); $('#resultmodal').modal('show');
}) });
}); });
}); });

View File

@ -48,4 +48,7 @@
</div> </div>
</div> </div>
<div id='ajax_loader' style="position: fixed; left: 50%; top: 50%; display: none;">
<img src="/images/ajax-loader.gif">
</div>
{% endblock %} {% endblock %}