Added loading screen to runnow
This commit is contained in:
parent
16f72b47d4
commit
dddc0a949c
BIN
images/ajax-loader.gif
Normal file
BIN
images/ajax-loader.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.0 KiB |
36
js/site.js
36
js/site.js
@ -24,24 +24,26 @@
|
|||||||
|
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$("body").on("click", "#patternDropdown li", function() {
|
$("body").on("click", "#patternDropdown li", function() {
|
||||||
if(this.value != "custom") { $("input#delay").val($(this).data("val")); }
|
if(this.value != "custom") { $("input#delay").val($(this).data("val")); }
|
||||||
});
|
});
|
||||||
$('#nextrunselector').datetimepicker();
|
$('#nextrunselector').datetimepicker();
|
||||||
|
|
||||||
$("body").on("click", ".runcron", function() {
|
$("body").on("click", ".runcron", function() {
|
||||||
fullurl = "/runnow.php?jobID=" + $(this).data("id");
|
$("#ajax_loader").show();
|
||||||
$.ajax(fullurl).done(function(data) {
|
fullurl = "/runnow.php?jobID=" + $(this).data("id");
|
||||||
results = JSON.parse(data);
|
$.ajax(fullurl).done(function(data) {
|
||||||
|
results = JSON.parse(data);
|
||||||
|
|
||||||
if(results["error"] !== undefined) {
|
if(results["error"] !== undefined) {
|
||||||
$("#resulttitle").html("Error");
|
$("#resulttitle").html("Error");
|
||||||
$("#resultbody").text(results["error"]);
|
$("#resultbody").text(results["error"]);
|
||||||
} else {
|
} else {
|
||||||
$("#resulttitle").html("Success");
|
$("#resulttitle").html("Success");
|
||||||
$("#resultbody").text(results["message"]);
|
$("#resultbody").text(results["message"]);
|
||||||
}
|
}
|
||||||
$('#resultmodal').modal('show');
|
$("#ajax_loader").hide();
|
||||||
})
|
$('#resultmodal').modal('show');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -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 %}
|
Loading…
Reference in New Issue
Block a user