mirror of
https://github.com/2ec0b4/kaamelott-soundboard.git
synced 2025-12-10 00:15:34 +00:00
Révise l'utilisation de require
This commit is contained in:
@@ -1,27 +1,23 @@
|
||||
define(
|
||||
'views/soundboard',
|
||||
[
|
||||
'marionette',
|
||||
'views/filter',
|
||||
'views/sounds',
|
||||
'hbs!templates/soundboard'
|
||||
],
|
||||
function (Marionette, SoundsFilterView, SoundsView, SoundboardTemplate) {
|
||||
"use strict";
|
||||
define('views/soundboard', function(require) {
|
||||
"use strict";
|
||||
|
||||
var SoundboardView = Marionette.LayoutView.extend({
|
||||
template: SoundboardTemplate,
|
||||
regions: {
|
||||
'filter': '#filter',
|
||||
'list': '#list'
|
||||
},
|
||||
onShow: function() {
|
||||
var Marionette = require('marionette'),
|
||||
SoundsFilterView = require('views/filter'),
|
||||
SoundsView = require('views/sounds'),
|
||||
SoundboardTemplate = require('hbs!templates/soundboard.hbs'),
|
||||
SoundboardView;
|
||||
|
||||
this.showChildView('filter', new SoundsFilterView());
|
||||
this.showChildView('list', new SoundsView());
|
||||
SoundboardView = Marionette.LayoutView.extend({
|
||||
template: SoundboardTemplate,
|
||||
regions: {
|
||||
'filter': '#filter',
|
||||
'list': '#list'
|
||||
},
|
||||
onShow: function() {
|
||||
this.showChildView('filter', new SoundsFilterView());
|
||||
this.showChildView('list', new SoundsView());
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
return SoundboardView;
|
||||
return SoundboardView;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user