From 33f9e7fb68d58e43e1188409b43e550c9ed4b54d Mon Sep 17 00:00:00 2001 From: RaNaN Date: Tue, 5 Mar 2013 19:05:23 +0100 Subject: cleaned dashboard event code, preserve filtering across packages --- module/web/static/js/views/fileView.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'module/web/static/js/views/fileView.js') 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 { -- cgit v1.2.3