equal
deleted
inserted
replaced
5 classNames: ['playlist-component'], |
5 classNames: ['playlist-component'], |
6 |
6 |
7 filter: Ember.inject.service(), |
7 filter: Ember.inject.service(), |
8 |
8 |
9 documents: Ember.computed('model', 'filter.location', 'filter.language', 'filter.discourse', 'filter.date', 'filter.theme', function() { |
9 documents: Ember.computed('model', 'filter.location', 'filter.language', 'filter.discourse', 'filter.date', 'filter.theme', function() { |
|
10 var self = this; |
10 var documents = this.get('model'); |
11 var documents = this.get('model'); |
11 if (this.get('filter.date').length > 0) { |
12 if (this.get('filter.date').length > 0) { |
12 var copy = documents; |
13 var copy = documents; |
13 documents.map(function(document) { |
14 documents.map(function(document) { |
14 if (this.get('filter.date').indexOf(document.get('created')) === -1){ |
15 if (self.get('filter.date').indexOf(document.get('created')) === -1){ |
15 copy = copy.without(document); |
16 copy = copy.without(document); |
16 } |
17 } |
17 }); |
18 }); |
18 documents = copy; |
19 documents = copy; |
19 } |
20 } |