From 2b9ec8291f73c48913a1bb622ed4e07ce966acb1 Mon Sep 17 00:00:00 2001 From: Ramon Wijnands Date: Sat, 22 Nov 2014 19:10:53 +0000 Subject: [PATCH] fix indentation with tabs in the playlist view --- client/views/playlists/playlist.html | 54 ++++++++++++++-------------- client/views/playlists/playlist.js | 37 ++++++++++--------- 2 files changed, 45 insertions(+), 46 deletions(-) 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 @@

Stats

{{>suggestions}} - {{#if isOwner}} - {{>ownerPanel}} - {{/if}} + {{#if isOwner}} + {{>ownerPanel}} + {{/if}}
@@ -117,32 +117,32 @@

Owner's panel

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"); };