initial download tracking functions declared
This commit is contained in:
parent
8fc9f8ba4f
commit
3573209150
|
@ -28,7 +28,7 @@
|
|||
<div role="main">
|
||||
<p id="console"></p>
|
||||
<h2>Pending Downloads</h2>
|
||||
<table id="" class="table table-bordered">
|
||||
<table id="d_table" class="table table-bordered">
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Progress</th>
|
||||
|
|
21
js/script.js
21
js/script.js
|
@ -14,6 +14,7 @@ $(function() {
|
|||
},
|
||||
success: function(data) {
|
||||
log.append(JSON.stringify(data) + "<br>");
|
||||
updateDownloads();
|
||||
},
|
||||
error: function() {
|
||||
err_connect.modal('show');
|
||||
|
@ -30,9 +31,27 @@ function updateDownloads() {
|
|||
updateStopDownloads();
|
||||
}
|
||||
|
||||
function updateDownloads() {
|
||||
var d_files = [];
|
||||
function d_fill() {
|
||||
for(var i = 0; i < 10; i++) {
|
||||
addDownload({
|
||||
gid: i,
|
||||
status: "active",
|
||||
totalLength: (i + 15) * 20,
|
||||
completedLength: (i + 15) * 19;
|
||||
downloadSpeed: 200 + i
|
||||
});
|
||||
}
|
||||
}
|
||||
function addDownload(conf) {
|
||||
d_files.push(conf);
|
||||
var d_table = $("#d_table");
|
||||
|
||||
}
|
||||
function updateDownloads() {
|
||||
d_fill();
|
||||
var d_table = $("#d_table");
|
||||
}
|
||||
|
||||
function updateWaiting() {
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user