Browse Source

minor updates

unknown 9 years ago
parent
commit
3d07129253
2 changed files with 18 additions and 2 deletions
  1. 9 1
      app/app.js
  2. 9 1
      app/templates/room.html

+ 9 - 1
app/app.js

@@ -389,6 +389,14 @@ if (Meteor.isClient) {
         },
         loaded: function() {
           return Session.get("loaded");
+        },
+        playlist_songs: function() {
+          var data = Playlists.find({type: type}).fetch();
+          if (data !== undefined && data.length > 0) {
+              return data[0].songs;
+          } else {
+              return [];
+          }
         }
     });
 
@@ -695,7 +703,7 @@ if (Meteor.isClient) {
                     }
                 }, 1000);
                 Meteor.setInterval(function () {
-                    resizeSeekerbar();
+                  resizeSeekerbar();
                 }, 50);
             }
         });

+ 9 - 1
app/templates/room.html

@@ -36,7 +36,15 @@
               </div>
             </div>
             <div class="col-md-3" id="side-panel">
-              {{> playlist}}
+              <!-- {{> playlist}} -->
+              <h2 class="playlist-title">Playlist</h2>
+              <ul id="playlist">
+                {{#each playlist_songs}}
+                  <li>
+                      <strong>{{title}}</strong> - {{artist}}
+                  </li>
+                {{/each}}
+              </ul>
             </div>
           </div>
             <!--<h1 class="room-name">{{{type}}}</h1>