diff -r 59b63cdda9e8 -r 35cb7200bb0a cms/app-client/app/controllers/application.js --- a/cms/app-client/app/controllers/application.js Fri Jun 24 17:07:24 2016 +0200 +++ b/cms/app-client/app/controllers/application.js Mon Jun 27 11:35:10 2016 +0200 @@ -85,22 +85,27 @@ return true; }, + player: Ember.inject.service(), + detail: null, - currentId: null, - currentItem: Ember.computed('currentId', function() { - Ember.$(".result-item").toggleClass("playing", false); - if (this.get('currentId') === null){ - return null; - } - Ember.$("div[id='" + this.get('currentId') + "']").toggleClass("playing", true); - return this.store.findRecord('document', this.get('currentId')); - }), modalItem: Ember.computed('detail', function() { return this.store.findRecord('document', this.get('detail')); }), + itemIdObserver: Ember.observer('player.itemId', function() { + var self = this; + this.store.findRecord('document', this.get('player').get('itemId'), { reload: true }).then(function(it){ + self.get('player').set('item', it); + }); + }), + + init: function() { + this._super(...arguments); + this.get('player'); + }, + actions: { changeDocument: function(docDirection){