# HG changeset patch # User Chloe Laisne # Date 1472204530 -7200 # Node ID e234339fe8df3e632b987a9c8f2e080a4c800ea8 # Parent 6ddc52965fb809269964808ec01ea120622c05cb Fix display notice error + Hide notice/transcript/video when changing route diff -r 6ddc52965fb8 -r e234339fe8df cms/app-client/app/components/notice-component.js --- a/cms/app-client/app/components/notice-component.js Thu Aug 25 19:10:41 2016 +0200 +++ b/cms/app-client/app/components/notice-component.js Fri Aug 26 11:42:10 2016 +0200 @@ -30,7 +30,7 @@ subjects: Ember.computed('item.subjects', function() { var subjects = []; if(this.get('item')) { - this.get('subjects').forEach(function(subject) { + this.get('item').get('subjects').forEach(function(subject) { var object = {}; if(typeof subject === 'object') { if(subject.datatype) { diff -r 6ddc52965fb8 -r e234339fe8df cms/app-client/app/router.js --- a/cms/app-client/app/router.js Thu Aug 25 19:10:41 2016 +0200 +++ b/cms/app-client/app/router.js Fri Aug 26 11:42:10 2016 +0200 @@ -2,12 +2,21 @@ import config from './config/environment'; const Router = Ember.Router.extend({ + location: config.locationType, - rootURL: config.rootURL + rootURL: config.rootURL, + + player: Ember.inject.service(), + + didTransition:function() { + this.get('player').toggleVideoscreen(false); + this.get('player').displayMetadata(false); + this._super(...arguments); + } }); Router.map(function() { - this.route('tabs/langues', { path: '/' }); // Default + this.route('tabs/langues', { path: '/' }); this.route('tabs/langues', { path: '/langues' }); this.route('tabs/carto', { path: '/cartographie' }); this.route('tabs/thematiques', { path: '/thematiques' }); diff -r 6ddc52965fb8 -r e234339fe8df cms/app-client/app/services/player.js --- a/cms/app-client/app/services/player.js Thu Aug 25 19:10:41 2016 +0200 +++ b/cms/app-client/app/services/player.js Fri Aug 26 11:42:10 2016 +0200 @@ -7,7 +7,7 @@ model: null, transcript: null, - window: '', + window: false, playing: false, progress: 0, // In Milliseconds videoscreen: false, @@ -28,7 +28,7 @@ if(this.get('window') !== el) { this.set('window', el); } else { - this.set('window', ''); + this.set('window', false); } },