diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-07-09 21:45:02 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-07-09 21:45:02 +0200 |
commit | 18c6342ce19374de5199978b0e2f8c19135d7f46 (patch) | |
tree | 5f0b87bf2372468c006a48601dad1a42dc00ffce /pyload/web/app/scripts/views/dashboard | |
parent | little fixes for actionbar and selection (diff) | |
download | pyload-18c6342ce19374de5199978b0e2f8c19135d7f46.tar.xz |
render progress correctly again
Diffstat (limited to 'pyload/web/app/scripts/views/dashboard')
-rw-r--r-- | pyload/web/app/scripts/views/dashboard/dashboardView.js | 10 | ||||
-rw-r--r-- | pyload/web/app/scripts/views/dashboard/fileView.js | 3 |
2 files changed, 9 insertions, 4 deletions
diff --git a/pyload/web/app/scripts/views/dashboard/dashboardView.js b/pyload/web/app/scripts/views/dashboard/dashboardView.js index e7adba475..f305ac2f4 100644 --- a/pyload/web/app/scripts/views/dashboard/dashboardView.js +++ b/pyload/web/app/scripts/views/dashboard/dashboardView.js @@ -65,7 +65,6 @@ define(['jquery', 'backbone', 'underscore', 'app', 'models/TreeCollection', update: function() { console.log('Update package list'); - // TODO: Both null var packs = this.tree.get('packages'); this.files = this.tree.get('files'); @@ -156,8 +155,13 @@ define(['jquery', 'backbone', 'underscore', 'app', 'models/TreeCollection', // Refresh the file if it is currently shown fileUpdated: function(data) { - // this works with ids and object - var file = this.files.get(data); + var fid; + if (_.isObject(data)) + fid = data.fid; + else + fid = data; + // this works with ids and object TODO: not anymore + var file = this.files.get(fid); if (file) if (_.isObject(data)) // update directly file.set(data); diff --git a/pyload/web/app/scripts/views/dashboard/fileView.js b/pyload/web/app/scripts/views/dashboard/fileView.js index 4e5884ed8..ce91a5f38 100644 --- a/pyload/web/app/scripts/views/dashboard/fileView.js +++ b/pyload/web/app/scripts/views/dashboard/fileView.js @@ -78,6 +78,7 @@ define(['jquery', 'backbone', 'underscore', 'app', 'utils/apitypes', 'views/abst }, progress_changed: function() { + // TODO: progress for non download statuses if (!this.model.isDownload()) return; @@ -94,7 +95,7 @@ define(['jquery', 'backbone', 'underscore', 'app', 'utils/apitypes', 'views/abst this.$('.second').html( '<i class="icon-time"></i> ' + formatTime(this.model.get('eta'))); - } else // Every else state can be renderred normally + } else // Every else state can be rendered normally this.render(); } |