summaryrefslogtreecommitdiffstats
path: root/module/web/static/js/views/headerView.js
diff options
context:
space:
mode:
Diffstat (limited to 'module/web/static/js/views/headerView.js')
-rw-r--r--module/web/static/js/views/headerView.js14
1 files changed, 13 insertions, 1 deletions
diff --git a/module/web/static/js/views/headerView.js b/module/web/static/js/views/headerView.js
index 2c4f8abb5..164c6d715 100644
--- a/module/web/static/js/views/headerView.js
+++ b/module/web/static/js/views/headerView.js
@@ -101,7 +101,7 @@ define(['jquery', 'underscore', 'backbone', 'app', 'models/ServerStatus', 'colle
this.templateStatus(this.status.toJSON())
);
- var data = {tasks: 0, downloads: 0, speed: 0};
+ var data = {tasks: 0, downloads: 0, speed: 0, single:false};
this.progressList.each(function(progress) {
if (progress.isDownload()) {
data.downloads += 1;
@@ -110,6 +110,18 @@ define(['jquery', 'underscore', 'backbone', 'app', 'models/ServerStatus', 'colle
data.tasks++;
});
+ // Show progress of one task
+ if (data.tasks + data.downloads === 1) {
+ var progress = this.progressList.at(0);
+ data.single = true;
+ data.eta = progress.get('eta');
+ data.percent = progress.getPercent();
+ data.name = progress.get('name');
+ data.statusmsg = progress.get('statusmsg');
+ }
+ // TODO: better progressbar rendering
+
+
this.$('#progress-info').html(
this.templateHeader(data)
);