diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-03-01 20:43:19 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-03-01 20:43:19 +0100 |
commit | 1e24b46986edd019a8c600033370fa2559a00657 (patch) | |
tree | 50f5644922478acb8d33e0965350f87b6c880869 /module/web/static/js/views/fileView.js | |
parent | generate js_apitypes, updated lodash, working type filters on webui (diff) | |
download | pyload-1e24b46986edd019a8c600033370fa2559a00657.tar.xz |
animated filtering, removed background from fileView
Diffstat (limited to 'module/web/static/js/views/fileView.js')
-rw-r--r-- | module/web/static/js/views/fileView.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/module/web/static/js/views/fileView.js b/module/web/static/js/views/fileView.js index f4f228559..32ce7d723 100644 --- a/module/web/static/js/views/fileView.js +++ b/module/web/static/js/views/fileView.js @@ -14,6 +14,7 @@ define(['jquery', 'backbone', 'underscore', 'app', 'views/abstract/itemView'], initialize: function() { this.listenTo(this.model, 'change', this.render); + // 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); }, @@ -63,8 +64,14 @@ define(['jquery', 'backbone', 'underscore', 'app', 'views/abstract/itemView'], App.vent.trigger('file:selection'); }, - visibility_changed: function() { - + visibility_changed: function(visible) { + // TODO: improve animation + if (visible) + this.$el.slideOut(); + else { + this.$el.calculateHeight(true); + this.$el.slideIn(); + } } }); |