diff options
Diffstat (limited to 'module/web/static/js/models/Progress.js')
-rw-r--r-- | module/web/static/js/models/Progress.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/module/web/static/js/models/Progress.js b/module/web/static/js/models/Progress.js index d2d54bdb4..87e7b350b 100644 --- a/module/web/static/js/models/Progress.js +++ b/module/web/static/js/models/Progress.js @@ -1,4 +1,4 @@ -define(['jquery', 'backbone', 'underscore'], function($, Backbone, _) { +define(['jquery', 'backbone', 'underscore', 'utils/apitypes'], function($, Backbone, _, Api) { return Backbone.Model.extend({ @@ -35,6 +35,10 @@ define(['jquery', 'backbone', 'underscore'], function($, Backbone, _) { toJSON: function(options) { var obj = Backbone.Model.prototype.toJSON.call(this, options); obj.percent = this.getPercent(); + if (this.isDownload() && this.get('download').status === Api.DownloadStatus.Downloading) + obj.downloading = true; + else + obj.downloading = false; return obj; }, |