summaryrefslogtreecommitdiffstats
path: root/module/web/static/js/helpers/fileHelper.js
diff options
context:
space:
mode:
Diffstat (limited to 'module/web/static/js/helpers/fileHelper.js')
-rw-r--r--module/web/static/js/helpers/fileHelper.js11
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>&nbsp;" + 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>&nbsp;" + formatTime(file.eta);
else
s = msg;