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/models/Progress.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'module/web/static/js/models/Progress.js') 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; }, -- cgit v1.2.3