diff --git a/static/js/app/views/mix/mixListView.coffee b/static/js/app/views/mix/mixListView.coffee index 48a17e5..0b97357 100644 --- a/static/js/app/views/mix/mixListView.coffee +++ b/static/js/app/views/mix/mixListView.coffee @@ -24,11 +24,10 @@ define ['marionette', 'vent', 'models/mix/mixCollection', 'views/mix/mixItemView mixPlay: (model) -> console.log "MixListView: mixPlay" - """ + if currentMix != -1 v = @children.findByModelCid(currentMix) - v.mixPause() - """ + v.mixPause(v.model) currentMix = model.cid return diff --git a/static/js/app/views/mix/mixListView.js b/static/js/app/views/mix/mixListView.js index 8cf2862..5df61f7 100644 --- a/static/js/app/views/mix/mixListView.js +++ b/static/js/app/views/mix/mixListView.js @@ -42,9 +42,12 @@ }; MixListView.prototype.mixPlay = function(model) { + var v; console.log("MixListView: mixPlay"); - "if currentMix != -1\n v = @children.findByModelCid(currentMix)\n v.mixPause()"; - + if (currentMix !== -1) { + v = this.children.findByModelCid(currentMix); + v.mixPause(v.model); + } currentMix = model.cid; };