diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-03-20 21:39:30 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-03-20 21:39:30 +0100 |
commit | 63cef4c7d641ffddaeabcd768020674e2681ba05 (patch) | |
tree | 10b9ee50b927a7673d93db15b896a15a1012f482 /module/web/static/js/helpers/fileHelper.js | |
parent | added ReadWrite lock, render file progress on dashboard (diff) | |
download | pyload-63cef4c7d641ffddaeabcd768020674e2681ba05.tar.xz |
improved ui, render waiting files
Diffstat (limited to 'module/web/static/js/helpers/fileHelper.js')
-rw-r--r-- | module/web/static/js/helpers/fileHelper.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/module/web/static/js/helpers/fileHelper.js b/module/web/static/js/helpers/fileHelper.js index dde831bdd..ad7c44142 100644 --- a/module/web/static/js/helpers/fileHelper.js +++ b/module/web/static/js/helpers/fileHelper.js @@ -1,6 +1,6 @@ // Helpers to render the file view -define('helpers/fileHelper', ['handlebars', 'utils/apitypes'], - function(Handlebars, Api) { +define('helpers/fileHelper', ['handlebars', 'utils/apitypes', 'helpers/formatTime'], + function(Handlebars, Api, formatTime) { function fileClass(file, options) { if (file.finished) @@ -36,8 +36,11 @@ define('helpers/fileHelper', ['handlebars', 'utils/apitypes'], else s += msg; } else if (file.finished) s = "<i class='iconf-ok'></i> " + msg; - else if(file.downloading) - s= "<div class='progress'><div class='bar' style='width: " + file.progress + "%'></div></div>"; + else if (file.downloading) + s = "<div class='progress'><div class='bar' style='width: " + file.progress + "%'>" + + formatTime(file.eta) + "</div></div>"; + else if (file.waiting) + s = "<i class='iconf-time'></i> " + formatTime(file.eta); else s = msg; |