Display transcript by default
authorChloe Laisne <chloe.laisne@gmail.com>
Mon, 17 Oct 2016 00:30:36 +0530
changeset 342 9375b692ff22
parent 341 957ad5f49348
child 343 3b2e76f5f3ca
Display transcript by default
cms/app-client/app/components/playlist-component.js
cms/app-client/app/templates/components/playlist-component.hbs
--- a/cms/app-client/app/components/playlist-component.js	Mon Oct 17 00:11:02 2016 +0530
+++ b/cms/app-client/app/components/playlist-component.js	Mon Oct 17 00:30:36 2016 +0530
@@ -49,6 +49,7 @@
 
         select: function(id) {
             this.get('player').select(id);
+            this.get('player').displayMetadata('notice');
         },
 
         play: function(id) {
@@ -69,7 +70,6 @@
             } else {
                 this.get('player').displayMetadata(false);
             }
-
         }
 
     }
--- a/cms/app-client/app/templates/components/playlist-component.hbs	Mon Oct 17 00:11:02 2016 +0530
+++ b/cms/app-client/app/templates/components/playlist-component.hbs	Mon Oct 17 00:30:36 2016 +0530
@@ -1,7 +1,7 @@
 <h2>Résultat <span class="count">({{ documents.length }})</span></h2>
 <ul>
     {{#each documents as |document| }}
-    <li id="{{document.id}}" class="{{if (eq player.item document.id) 'playing'}}{{if (eq document.id notice) 'notice'}}" {{action 'select' document.id}}>
+    <li id="{{document.id}}" class="{{if (eq player.item document.id) 'playing'}}" {{action 'select' document.id}}>
         <div class="tools">
             <div>
             {{#if document.transcript_url}}
@@ -14,7 +14,7 @@
             {{/if}}
             </div>
             <div>
-                <button title="Notice" {{action 'displayNotice' document.id}} class="notice{{if (ifOr (ifAnd (eq player.window 'notice') (eq player.item document.id)) (eq document.id notice)) ' active'}}">
+                <button title="Notice" {{action 'displayNotice' document.id bubbles=false}} class="notice{{if (ifAnd (eq player.window 'notice') (eq player.item document.id)) ' active'}}">
                     Notice
                 </button>
                 <i title="Share notice" class="fa fa-share-alt">Share notice</i>