Page title when track is playing
authorChloe Laisne <chloe.laisne@gmail.com>
Fri, 26 Aug 2016 13:32:48 +0200
changeset 272 97c06607949b
parent 271 e234339fe8df
child 273 a719b2dcea34
Page title when track is playing
cms/app-client/app/components/player-component.js
cms/app-client/app/index.html
--- a/cms/app-client/app/components/player-component.js	Fri Aug 26 11:42:10 2016 +0200
+++ b/cms/app-client/app/components/player-component.js	Fri Aug 26 13:32:48 2016 +0200
@@ -75,10 +75,12 @@
 
     play: function() {
         this.get('popcorn').play();
+        Ember.$(document).attr('title', this.get('player').get('model').get('title') + ' - ' + Ember.$(document).attr('title'));
     },
 
     pause: function() {
         this.get('popcorn').pause();
+        Ember.$(document).attr('title', Ember.$(document).attr('title').split(' - ').pop());
     },
 
     actions: {
--- a/cms/app-client/app/index.html	Fri Aug 26 11:42:10 2016 +0200
+++ b/cms/app-client/app/index.html	Fri Aug 26 13:32:48 2016 +0200
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html>
     <head>
-        <title>AppClient</title>
+        <title>Corpus de la parole</title>
 
         <meta charset="utf-8">
         <meta http-equiv="X-UA-Compatible" content="IE=edge">