From 9623360d2e1c1e84a6bee59789f08124f5723e93 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Fri, 4 Sep 2009 14:16:55 +0200 Subject: pyLoad RC --- module/web/static/default/home.js | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'module/web/static/default/home.js') diff --git a/module/web/static/default/home.js b/module/web/static/default/home.js index 8a6586b33..0d74aa17a 100644 --- a/module/web/static/default/home.js +++ b/module/web/static/default/home.js @@ -96,13 +96,23 @@ function renderTable(data){ div.getChildren("b")[0].textContent = dl.name - size = Math.round((dl.size - dl.kbleft) / 1024) + "/" + Math.round(dl.size / 1024) + " MB" - div.getChildren(".dlsize")[0].textContent = size + if (dl.status == "downloading"){ - speed = Math.round(dl.speed) + " kb/s" - div.getChildren(".dlspeed")[0].textContent = speed + size = Math.round((dl.size - dl.kbleft) / 1024) + "/" + Math.round(dl.size / 1024) + " MB" + speed = Math.round(dl.speed) + " kb/s" + eta = dl.eta + + + }else if (dl.status == "waiting"){ - div.getChildren(".dltime")[0].textContent = dl.eta + size = "waiting "+ dl.wait + speed = "" + eta = "" + + } + div.getChildren(".dlsize")[0].textContent = size + div.getChildren(".dlspeed")[0].textContent = speed + div.getChildren(".dltime")[0].textContent = eta }else{ -- cgit v1.2.3