mirror of
https://github.com/janeczku/calibre-web
synced 2025-10-28 05:47:43 +00:00
More robust handling while checking for new updates
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user