summaryrefslogtreecommitdiffstats
path: root/module/web/static/js/views/fileView.js
diff options
context:
space:
mode:
Diffstat (limited to 'module/web/static/js/views/fileView.js')
-rw-r--r--module/web/static/js/views/fileView.js8
1 files changed, 6 insertions, 2 deletions
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();
}
});