diff --git a/client/views/playlists/playlist.html b/client/views/playlists/playlist.html
index 3a6b077..10d0175 100644
--- a/client/views/playlists/playlist.html
+++ b/client/views/playlists/playlist.html
@@ -79,9 +79,9 @@
@@ -117,32 +117,32 @@
Owner's panel
{{#each songs}}
- {{#if sessionIs 'songView' 'list'}}
-
- {{> playlistEntry}}
-
- {{else}}
- {{> playlistGridEntry}}
- {{/if}}
+ {{#if sessionIs 'songView' 'list'}}
+
+ {{> playlistEntry}}
+
+ {{else}}
+ {{> playlistGridEntry}}
+ {{/if}}
{{/each}}
-
-
-
{{this.snippet.title}}
-
({{formatDuration this.contentDetails.duration}})
-
- {{> playlistEntryControls}}
- {{>loveSong}}
-
-
-
+
+
+
{{this.snippet.title}}
+
({{formatDuration this.contentDetails.duration}})
+
+ {{> playlistEntryControls}}
+ {{>loveSong}}
+
+
+
- {{>loveSong}}
+ {{>loveSong}}
@@ -154,20 +154,20 @@
Owner's panel
{{> userLink}}
{{/each}}
-
Added by {{#with this.author}}{{> userLink}}{{/with}} {{this.addedFromNow}}
+
Added by {{#with this.author}}{{> userLink}}{{/with}} {{this.addedFromNow}}
-
- {{> playlistEntryControls}}
+
+ {{> playlistEntryControls}}
-
-
+
+
-
+
diff --git a/client/views/playlists/playlist.js b/client/views/playlists/playlist.js
index ff5b716..634ed40 100644
--- a/client/views/playlists/playlist.js
+++ b/client/views/playlists/playlist.js
@@ -69,7 +69,7 @@ Template.playlist.totalDuration = function() {
return memo.add(duration);
}, moment.duration());
- return sum.humanize();
+ return sum.humanize();
};
Template.playlist.following = function () {
@@ -103,7 +103,7 @@ Template.playlist.players = function () {
//This should probably not run on the client
Template.playlist.isOwner = function() {
- return this.owner == Meteor.userId();
+ return this.owner == Meteor.userId();
};
Template.playlist.owner = function () {
@@ -209,22 +209,21 @@ Template.songs.events = {
var index = $(e.delegateTarget).children('div.song').index(row);
console.log('removing song at index', index);
- var songrow = $(row[0]);
- //set styles
- songrow.css("box-shadow","0px 0px 15px rgba(155, 155, 155, 0.55)");
- songrow.css("left","125%");
-
- //animation takes 300 seconds
- setTimeout(function(){
- // removing a element at a position is impossible in mongodb,
- // so just set the shole array
- if (index >= 0) {
- var songs = _.clone(template.data.songs); // clone is important!!!
- songs.splice(index, 1); // remove 1 element at position index
- Playlists.update({_id: template.data._id}, { $set : {"songs": songs}});
- }
- },300);
-
+ var songrow = $(row[0]);
+ //set styles
+ songrow.css("box-shadow","0px 0px 15px rgba(155, 155, 155, 0.55)");
+ songrow.css("left","125%");
+
+ //animation takes 300 seconds
+ setTimeout(function () {
+ // removing a element at a position is impossible in mongodb,
+ // so just set the shole array
+ if (index >= 0) {
+ var songs = _.clone(template.data.songs); // clone is important!!!
+ songs.splice(index, 1); // remove 1 element at position index
+ Playlists.update({_id: template.data._id}, { $set : {"songs": songs}});
+ }
+ }, 300);
},
'click [data-action="lovesong"]' : function(e) {
@@ -299,5 +298,5 @@ Template.songs.songs = function() {
};
Template.songs.rendered = function() {
- Session.setDefault("songView","list");
+ Session.setDefault("songView","list");
};