More robust handling while checking for new updates

This commit is contained in:
Virgil Grigoras
2018-09-09 11:46:00 +02:00
parent 919de60e8d
commit f477d48c7c
3 changed files with 55 additions and 13 deletions

View File

@ -104,6 +104,7 @@ $(function() {
var $this = $(this);
var buttonText = $this.html();
$this.html("...");
$("#update_error").addClass("hidden")
$.ajax({
dataType: "json",
url: window.location.pathname + "/../../get_update_status",
@ -116,6 +117,11 @@ $(function() {
.removeClass("hidden")
.find("span").html(data.commit);
}
if (data.error.length != 0) {
$("#update_error")
.removeClass("hidden")
.find("span").html(data.error);
}
}
});
});