mirror of
https://github.com/GNS3/gns3-registry.git
synced 2024-12-19 04:47:54 +00:00
Download manager with live progress and notif when sucess
This commit is contained in:
parent
196e51179d
commit
b06f83ac19
@ -7,9 +7,16 @@ $(function() {
|
||||
for (var i in downloads) {
|
||||
download_info = downloads[i];
|
||||
var div = $("<div>");
|
||||
div.attr("id", "download" + download_info.id);
|
||||
div.text(download_info.url + " " + download_info.received + "/" + download_info.total);
|
||||
downloads_div.append(div);
|
||||
}
|
||||
|
||||
gns3.downloadProgress.connect(function(download_info) {
|
||||
console.log("blu");
|
||||
var div = $("#download" + download_info.id);
|
||||
div.text(download_info.url + " " + download_info.received + "/" + download_info.total);
|
||||
});
|
||||
});
|
||||
|
||||
{% endblock %}
|
||||
|
@ -21,6 +21,11 @@
|
||||
var notif = $("#notif")
|
||||
notif.append("<div class=\"alert alert-danger alert-dismissible fade in\" role=\"alert\"><button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\"><span aria-hidden=\"true\">×</span></button><h4>You got an error!</h4><p>" + msg + "</p></div>")
|
||||
});
|
||||
|
||||
gns3.success.connect(function(msg) {
|
||||
var notif = $("#notif")
|
||||
notif.append("<div class=\"alert alert-success alert-dismissible fade in\" role=\"alert\"><button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\"><span aria-hidden=\"true\">×</span></button>" + msg + "</div>")
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
Loading…
Reference in New Issue
Block a user