summaryrefslogtreecommitdiffstats
path: root/pyload/web/app/scripts/views/dashboard/dashboardView.js
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-07-09 21:45:02 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-07-09 21:45:02 +0200
commit18c6342ce19374de5199978b0e2f8c19135d7f46 (patch)
tree5f0b87bf2372468c006a48601dad1a42dc00ffce /pyload/web/app/scripts/views/dashboard/dashboardView.js
parentlittle fixes for actionbar and selection (diff)
downloadpyload-18c6342ce19374de5199978b0e2f8c19135d7f46.tar.xz
render progress correctly again
Diffstat (limited to 'pyload/web/app/scripts/views/dashboard/dashboardView.js')
-rw-r--r--pyload/web/app/scripts/views/dashboard/dashboardView.js10
1 files changed, 7 insertions, 3 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);