From b2f560126561f0c152a7cf8b06edc78d28117b29 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Thu, 21 Mar 2013 15:20:39 +0100 Subject: little fixes, use global progress to render single task --- module/web/static/js/views/fileView.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'module/web/static/js/views/fileView.js') diff --git a/module/web/static/js/views/fileView.js b/module/web/static/js/views/fileView.js index b0d7ac9de..c673041b5 100644 --- a/module/web/static/js/views/fileView.js +++ b/module/web/static/js/views/fileView.js @@ -77,7 +77,10 @@ define(['jquery', 'backbone', 'underscore', 'app', 'utils/apitypes', 'views/abst }, progress_changed: function() { - if (this.model.isDownload() && this.model.get('download').status === Api.DownloadStatus.Downloading) { + if(!this.model.isDownload()) + return; + + if (this.model.get('download').status === Api.DownloadStatus.Downloading) { var bar = this.$('.progress .bar'); if (!bar) { // ensure that the dl bar is rendered this.render(); @@ -86,7 +89,8 @@ define(['jquery', 'backbone', 'underscore', 'app', 'utils/apitypes', 'views/abst bar.width(this.model.get('progress') + '%'); bar.html('  ' + formatTime(this.model.get('eta'))); - } + } else // Every else state can be renderred normally + this.render(); } }); -- cgit v1.2.3