summaryrefslogtreecommitdiffstats
path: root/module/web/static/js/views/fileView.js
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-03-05 19:05:23 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-03-05 19:05:23 +0100
commit33f9e7fb68d58e43e1188409b43e550c9ed4b54d (patch)
tree0ae97eef3ecedd7fee26ea7e98d117f9ccd53df6 /module/web/static/js/views/fileView.js
parentfunctions to render file status, only simple coloring for now (diff)
downloadpyload-33f9e7fb68d58e43e1188409b43e550c9ed4b54d.tar.xz
cleaned dashboard event code, preserve filtering across packages
Diffstat (limited to 'module/web/static/js/views/fileView.js')
-rw-r--r--module/web/static/js/views/fileView.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/module/web/static/js/views/fileView.js b/module/web/static/js/views/fileView.js
index 59a26d7c9..17da74de3 100644
--- a/module/web/static/js/views/fileView.js
+++ b/module/web/static/js/views/fileView.js
@@ -17,6 +17,7 @@ define(['jquery', 'backbone', 'underscore', 'app', 'utils/apitypes', 'views/abst
// This will be triggered manually and changed before with silent=true
this.listenTo(this.model, 'change:visible', this.visibility_changed);
this.listenTo(this.model, 'remove', this.destroy);
+ this.listenTo(App.vent, 'dashboard:destroyContent', this.destroy);
},
onDestroy: function() {
@@ -48,8 +49,9 @@ define(['jquery', 'backbone', 'underscore', 'app', 'utils/apitypes', 'views/abst
if (this.model.get('visible'))
this.$el.show();
- else
+ else {
this.$el.hide();
+ }
return this;
},
@@ -64,7 +66,7 @@ define(['jquery', 'backbone', 'underscore', 'app', 'utils/apitypes', 'views/abst
},
visibility_changed: function(visible) {
- // TODO: improve animation
+ // TODO: improve animation, height is not available when element was not visible
if (visible)
this.$el.slideOut(true);
else {