1
0
mirror of https://github.com/2ec0b4/kaamelott-soundboard.git synced 2025-12-08 15:43:24 +00:00
Files
kaamelott-soundboard/js/app/radios/sounds.js

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