# HG changeset patch # User Chloe Laisne # Date 1470401745 -7200 # Node ID ac320de33ec7735800367d9e1d09814095ce8997 # Parent 296c7d34d2ba49d30572a1d67b64e7f4700b3487 Add transcript button to player-component diff -r 296c7d34d2ba -r ac320de33ec7 cms/app-client/app/components/player-component.js --- a/cms/app-client/app/components/player-component.js Thu Aug 04 17:59:38 2016 +0200 +++ b/cms/app-client/app/components/player-component.js Fri Aug 05 14:55:45 2016 +0200 @@ -101,6 +101,10 @@ setTime: function(event) { this.get('popcorn').currentTime(event.layerX * this.get('popcorn').duration() / Ember.$(event.target).width()); + }, + + display: function(el) { + this.get('player').display(el); } } diff -r 296c7d34d2ba -r ac320de33ec7 cms/app-client/app/components/playlist-component.js --- a/cms/app-client/app/components/playlist-component.js Thu Aug 04 17:59:38 2016 +0200 +++ b/cms/app-client/app/components/playlist-component.js Fri Aug 05 14:55:45 2016 +0200 @@ -64,11 +64,7 @@ displayNotice: function(id) { if(this.get('player').get('item') === id) { - if(this.get('player').get('window') !== 'notice') { - this.get('player').set('window', 'notice'); - } else { - this.get('player').set('window', ''); - } + this.get('player').display('notice'); } else { if(this.get('notice') !== id) { this.set('notice', id); diff -r 296c7d34d2ba -r ac320de33ec7 cms/app-client/app/components/toolbar-component.js --- a/cms/app-client/app/components/toolbar-component.js Thu Aug 04 17:59:38 2016 +0200 +++ b/cms/app-client/app/components/toolbar-component.js Fri Aug 05 14:55:45 2016 +0200 @@ -11,10 +11,8 @@ display: function(element) { if(element === 'video') { this.get('player').set('reduce', !this.get('player').get('reduce')); - } else if(this.get('player').get('window') !== element) { - this.get('player').set('window', element); } else { - this.get('player').set('window', ''); + this.get('player').display(element); } } diff -r 296c7d34d2ba -r ac320de33ec7 cms/app-client/app/services/player.js --- a/cms/app-client/app/services/player.js Thu Aug 04 17:59:38 2016 +0200 +++ b/cms/app-client/app/services/player.js Fri Aug 05 14:55:45 2016 +0200 @@ -11,6 +11,14 @@ progress: 0, // In Milliseconds reduce: false, + display: function(el) { + if(this.get('window') !== el) { + this.set('window', el); + } else { + this.set('window', ''); + } + }, + init: function() { this.on('reset', Ember.run.bind(this, this.get('reset'))); }, diff -r 296c7d34d2ba -r ac320de33ec7 cms/app-client/app/styles/components/player-component.scss --- a/cms/app-client/app/styles/components/player-component.scss Thu Aug 04 17:59:38 2016 +0200 +++ b/cms/app-client/app/styles/components/player-component.scss Fri Aug 05 14:55:45 2016 +0200 @@ -90,7 +90,7 @@ } .player-component #audio .progress .bar { - width: 302px; + width: 226px; height: 3px; background-color: $light-white; margin: -1px 60px 0 60px; @@ -120,7 +120,7 @@ } .player-component #audio .meta p:first-child { - margin-left: 0px; + margin-left: 59px; } .player-component #audio .meta p > * { @@ -165,4 +165,21 @@ width: 100%; display: block; margin: 0 auto; -} \ No newline at end of file +} + +.player-component #audio .controls.extra i.fa-bars { + position: relative; +} + +.player-component #audio .controls.extra i.fa-bars::before { + font-size: 21px; + transition: opacity .15s; +} + +.player-component #audio .controls.extra i.fa-bars:not(.active)::before { + opacity: .1; +} + +.player-component #audio .controls.extra i.fa-bars:not(.active):hover::before { + opacity: 1; +} diff -r 296c7d34d2ba -r ac320de33ec7 cms/app-client/app/templates/components/player-component.hbs --- a/cms/app-client/app/templates/components/player-component.hbs Thu Aug 04 17:59:38 2016 +0200 +++ b/cms/app-client/app/templates/components/player-component.hbs Fri Aug 05 14:55:45 2016 +0200 @@ -13,6 +13,11 @@ - {{to-minutes remaining}} +
+ + Transcript + +

{{ item.title }}