1
0
mirror of https://github.com/2ec0b4/kaamelott-soundboard.git synced 2025-12-08 23:53:24 +00:00

Révise l'utilisation de require

This commit is contained in:
Antoine
2016-05-29 20:47:35 +02:00
parent 77f1820fa5
commit 0ce3b318e4
14 changed files with 309 additions and 345 deletions

View File

@@ -1,25 +1,23 @@
define(
'radios/sounds',
[
'marionette',
'backbone.radio',
'collections/sounds'
],
function (Marionette, Radio, SoundsCollection) {
"use strict";
define('radios/sounds', function(require) {
"use strict";
var SoundsRadio = Marionette.Object.extend({
initialize : function () {
this.channel = Radio.channel('Sounds');
var Marionette = require('marionette'),
Radio = require('backbone.radio'),
SoundsCollection = require('collections/sounds'),
SoundsRadio;
this.channel.reply('getSounds', this.getSounds.bind(this));
},
getSounds: function() {
var soundsCollection = new SoundsCollection();
SoundsRadio = Marionette.Object.extend({
initialize : function () {
this.channel = Radio.channel('Sounds');
return soundsCollection.fetch();
}
});
this.channel.reply('getSounds', this.getSounds.bind(this));
},
getSounds: function() {
var soundsCollection = new SoundsCollection();
return SoundsRadio;
return soundsCollection.fetch();
}
});
return SoundsRadio;
});