mirror of
https://github.com/fergalmoran/dss.git
synced 2025-12-29 04:59:29 +00:00
43 lines
1.4 KiB
JavaScript
Executable File
43 lines
1.4 KiB
JavaScript
Executable File
// Generated by CoffeeScript 1.4.0
|
|
(function() {
|
|
var __hasProp = {}.hasOwnProperty,
|
|
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
|
|
|
|
define(['marionette', 'vent', 'models/mix/mixCollection', 'views/mix/mixItemView', 'text!/tpl/MixListView'], function(Marionette, vent, MixCollection, MixItemView, Template) {
|
|
var MixListView;
|
|
MixListView = (function(_super) {
|
|
var currentMix;
|
|
|
|
__extends(MixListView, _super);
|
|
|
|
function MixListView() {
|
|
return MixListView.__super__.constructor.apply(this, arguments);
|
|
}
|
|
|
|
MixListView.prototype.template = _.template(Template);
|
|
|
|
MixListView.prototype.className = "mix-listing audio-listing";
|
|
|
|
MixListView.prototype.itemView = MixItemView;
|
|
|
|
MixListView.prototype.itemViewContainer = "#mix-list-container-ul";
|
|
|
|
currentMix = -1;
|
|
|
|
MixListView.prototype.mixPlay = function(model) {
|
|
var v;
|
|
if (currentMix !== -1) {
|
|
v = this.children.findByModelCid(currentMix);
|
|
v.mixStop(v.model);
|
|
}
|
|
currentMix = model.cid;
|
|
};
|
|
|
|
return MixListView;
|
|
|
|
})(Marionette.CompositeView);
|
|
return MixListView;
|
|
});
|
|
|
|
}).call(this);
|