Remove document filtering in playlist
authorChloe Laisne <chloe.laisne@gmail.com>
Sun, 02 Oct 2016 21:43:05 +0200
changeset 317 e653de66f252
parent 316 fb11295ef666
child 318 5564f5065f81
child 331 9836845ed1e8
Remove document filtering in playlist
cms/app-client/app/components/playlist-component.js
--- a/cms/app-client/app/components/playlist-component.js	Sun Oct 02 21:38:09 2016 +0200
+++ b/cms/app-client/app/components/playlist-component.js	Sun Oct 02 21:43:05 2016 +0200
@@ -8,30 +8,7 @@
     player: Ember.inject.service(),
 
     documents: Ember.computed('model', 'filter.location', 'filter.language', 'filter.discourse', 'filter.date', 'filter.theme', function() {
-        var self = this;
-        var documents = this.get('model');
-        if (this.get('filter').get('date').length > 0) {
-            var copy = documents;
-            documents.map(function(document) {
-                if (self.get('filter').get('date').indexOf(document.get('created')) === -1){
-                    copy = copy.without(document);
-                }
-            });
-            documents = copy;
-        }
-        if (this.get('filter').get('discourse')) {
-            documents = documents.filterBy('type', this.get('filter').get('discourse'));
-        }
-        if (this.get('filter').get('language')) {
-            documents = documents.filterBy('language', this.get('filter').get('language'));
-        }
-        if (this.get('filter').get('location')) {
-            documents = documents.filterBy('spatial', this.get('filter').get('location'));
-        }
-        if (this.get('filter').get('theme')) {
-            documents = documents.filterBy('thematique', this.get('filter').get('theme'));
-        }
-        return documents;
+        return this.get('model');
     }),
 
     documentsLoaded: Ember.observer('documents', function() {