equal
deleted
inserted
replaced
32 documents = documents.filterBy('thematique', this.get('filter.theme')); |
32 documents = documents.filterBy('thematique', this.get('filter.theme')); |
33 } |
33 } |
34 return documents; |
34 return documents; |
35 }), |
35 }), |
36 |
36 |
|
37 documentsLoaded: Ember.observer('documents', function() { |
|
38 this.get('player').set('items', this.get('documents').map(function(document) { |
|
39 return document.get('id'); |
|
40 })); |
|
41 |
|
42 this.get('player').set('item', this.get('player').get('items')[0]); |
|
43 }).on('init'), |
|
44 |
|
45 init: function() { |
|
46 this._super(...arguments); |
|
47 }, |
|
48 |
37 didRender: function() { |
49 didRender: function() { |
38 this._super(...arguments); |
50 this._super(...arguments); |
39 this.$().find('ul').height(Ember.$('.corpus-app-wrapper').outerHeight() - (Ember.$('.filter-component').outerHeight() + this.$().find('h2').outerHeight())); |
51 this.$().find('ul').height(Ember.$('.corpus-app-wrapper').outerHeight() - (Ember.$('.filter-component').outerHeight() + this.$().find('h2').outerHeight())); |
40 }, |
52 }, |
41 |
53 |
42 actions: { |
54 actions: { |
43 |
55 |
44 setItem: function(id) { |
56 setItem: function(id) { |
45 this.get('player').set('item', id); |
57 this.get('player').trigger('reset', id); |
46 this.get('player').set('items', this.get('documents').map(function(document) { |
|
47 return document.get('id'); |
|
48 })); |
|
49 } |
58 } |
50 |
59 |
51 } |
60 } |
52 |
61 |
53 }); |
62 }); |