From 8812742bb9b94e794635b7301a91aa26adb3dbaa Mon Sep 17 00:00:00 2001 From: flyingrub Date: Wed, 30 Mar 2016 20:37:12 +0200 Subject: [PATCH] [FIX] Review * Squash listenTo * Replace id by class --- app/views/player.js | 6 ++++-- app/views/popupPlaylists.js | 14 ++++---------- app/views/templates/track.jst | 18 +++++++++--------- app/views/track.js | 20 ++++++++++---------- 4 files changed, 27 insertions(+), 31 deletions(-) diff --git a/app/views/player.js b/app/views/player.js index 4359083..a68a1bc 100644 --- a/app/views/player.js +++ b/app/views/player.js @@ -34,8 +34,10 @@ const Player = Mn.LayoutView.extend({ }, initialize() { - this.listenTo(application.channel,'reset:UpNext', this.render); - this.listenTo(application.channel, 'player:next', this.next) + this.listenTo(application.channel, { + 'reset:UpNext': this.render, + 'player:next': this.next + }); this.listenTo(application.appState, 'change:currentTrack', function(appState, currentTrack) { if (currentTrack) { diff --git a/app/views/popupPlaylists.js b/app/views/popupPlaylists.js index 24ea43f..2915050 100644 --- a/app/views/popupPlaylists.js +++ b/app/views/popupPlaylists.js @@ -25,16 +25,10 @@ const PopupPlaylists = Mn.CompositeView.extend({ }, initialize() { - this.listenTo( - application.channel, - 'playlistPopup:show', - this.showPopup - ); - this.listenTo( - application.channel, - 'playlistPopup:hide', - this.hidePopup - ); + this.listenTo(application.channel, { + 'playlistPopup:show': this.showPopup, + 'playlistPopup:hide': this.hidePopup + }); }, showPopup(model) { diff --git a/app/views/templates/track.jst b/app/views/templates/track.jst index af5abe0..a167ede 100644 --- a/app/views/templates/track.jst +++ b/app/views/templates/track.jst @@ -9,20 +9,20 @@
<%- album %>
<% if (type != 'upNext') { %> - <% } else { %> - <% } %> -