initial download tracking functions declared

This commit is contained in:
Hamza Zia 2012-05-27 08:04:40 +08:00
parent 8fc9f8ba4f
commit 3573209150
2 changed files with 21 additions and 2 deletions

View File

@ -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>

View File

@ -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() {