mirror of
https://github.com/2ec0b4/kaamelott-soundboard.git
synced 2025-12-08 23:53:24 +00:00
24 lines
659 B
JavaScript
24 lines
659 B
JavaScript
define('radios/sounds', function(require) {
|
|
"use strict";
|
|
|
|
var Marionette = require('marionette'),
|
|
Radio = require('backbone.radio'),
|
|
SoundsCollection = require('collections/sounds'),
|
|
SoundsRadio;
|
|
|
|
SoundsRadio = Marionette.Object.extend({
|
|
initialize : function () {
|
|
this.channel = Radio.channel('Sounds');
|
|
|
|
this.channel.reply('getSounds', this.getSounds.bind(this));
|
|
},
|
|
getSounds: function() {
|
|
var soundsCollection = new SoundsCollection();
|
|
|
|
return soundsCollection.fetch();
|
|
}
|
|
});
|
|
|
|
return SoundsRadio;
|
|
});
|