diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-03-20 21:39:30 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-03-20 21:39:30 +0100 |
commit | 63cef4c7d641ffddaeabcd768020674e2681ba05 (patch) | |
tree | 10b9ee50b927a7673d93db15b896a15a1012f482 /module/web/static/js/models/Progress.js | |
parent | added ReadWrite lock, render file progress on dashboard (diff) | |
download | pyload-63cef4c7d641ffddaeabcd768020674e2681ba05.tar.xz |
improved ui, render waiting files
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; }, |