pull/744/head
Ozzieisaacs 6 years ago
parent 7255c26568
commit cb0f3cd074

@ -104,7 +104,10 @@ $(function() {
var $this = $(this); var $this = $(this);
var buttonText = $this.html(); var buttonText = $this.html();
$this.html("..."); $this.html("...");
$("#update_error").addClass("hidden") $("#update_error").addClass("hidden");
if($("#message").length){
$("#message").alert("close");
}
$.ajax({ $.ajax({
dataType: "json", dataType: "json",
url: window.location.pathname + "/../../get_update_status", url: window.location.pathname + "/../../get_update_status",
@ -125,15 +128,15 @@ $(function() {
data.history.reverse().forEach(function(entry, index) { data.history.reverse().forEach(function(entry, index) {
$("<tr><td>" + entry[0] + "</td><td>" + entry[1] + "</td></tr>").appendTo($("#update_table")); $("<tr><td>" + entry[0] + "</td><td>" + entry[1] + "</td></tr>").appendTo($("#update_table"));
}); });
cssClass = 'alert-warning' cssClass = 'alert-warning';
} else { } else {
cssClass = 'alert-success' cssClass = 'alert-success';
} }
} else { } else {
cssClass = 'alert-danger' cssClass = 'alert-danger';
} }
message = '<div class="alert ' + cssClass message = '<div id="message" class="alert ' + cssClass
+ ' fade in"><a href="#" class="close" data-dismiss="alert">&times;</a>' + data.message + '</div>'; + ' fade in"><a href="#" class="close" data-dismiss="alert">&times;</a>' + data.message + '</div>';
$(message).insertAfter($("#update_table")); $(message).insertAfter($("#update_table"));

Loading…
Cancel
Save