From 63cef4c7d641ffddaeabcd768020674e2681ba05 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Wed, 20 Mar 2013 21:39:30 +0100 Subject: improved ui, render waiting files --- module/web/static/js/helpers/fileHelper.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'module/web/static/js/helpers/fileHelper.js') 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 = " " + msg; - else if(file.downloading) - s= "
"; + else if (file.downloading) + s = "
" + + formatTime(file.eta) + "
"; + else if (file.waiting) + s = " " + formatTime(file.eta); else s = msg; -- cgit v1.2.3