diff options
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; |