Play error quickfix
authorChloe Laisne <chloe.laisne@gmail.com>
Wed, 15 Jun 2016 11:10:20 +0200
changeset 192 e1435b37301a
parent 191 db5711fbbb6c
child 193 64afd482ac71
Play error quickfix Remove player partial
cms/app-client/app/components/player-component.js
cms/app-client/app/controllers/application.js
cms/app-client/app/templates/application.hbs
--- a/cms/app-client/app/components/player-component.js	Wed Jun 15 09:50:56 2016 +0200
+++ b/cms/app-client/app/components/player-component.js	Wed Jun 15 11:10:20 2016 +0200
@@ -95,7 +95,6 @@
         var radians = Math.atan2(x - button_centerX, y - button_centerY);
         var degree = Math.round( (radians * (180 / Math.PI) * -1) + 180 );
         return degree;
-        //return (degree <= max ? degree : max);
     },
 
     play: function(){
--- a/cms/app-client/app/controllers/application.js	Wed Jun 15 09:50:56 2016 +0200
+++ b/cms/app-client/app/controllers/application.js	Wed Jun 15 11:10:20 2016 +0200
@@ -33,7 +33,7 @@
         if (this.get('currentId') === null){
             return null;
         }
-        Ember.$("#"+this.get('currentId').replace( /(:|\.|\[|\]|,)/g, "\\$1" )).toggleClass("playing", true);
+        Ember.$("div[id='" + this.get('currentId') + "']").toggleClass("playing", true);
         return this.store.findRecord('document', this.get('currentId'));
     }),
 
--- a/cms/app-client/app/templates/application.hbs	Wed Jun 15 09:50:56 2016 +0200
+++ b/cms/app-client/app/templates/application.hbs	Wed Jun 15 11:10:20 2016 +0200
@@ -5,7 +5,11 @@
 
 <div class="corpus-app-wrapper">
   <div class="corpus-app-player">
-    {{partial "player"}}
+    <div class="corpus-app-content">
+      {{player-component action="changeDocument" document=currentItem}}
+      <p><strong>{{ currentItem.title }}</strong></p>
+      <p>{{doc-language url=currentItem.language}}</p>
+    </div>
   </div>
   {{partial "results"}}
 </div>