mirror of
https://github.com/2ec0b4/kaamelott-soundboard.git
synced 2025-12-09 08:03:24 +00:00
Proto bouton aléatoire
This commit is contained in:
26
js/app/views/random.js
Normal file
26
js/app/views/random.js
Normal file
@@ -0,0 +1,26 @@
|
||||
define("views/random", function(require) {
|
||||
"use strict";
|
||||
|
||||
var Marionette = require("marionette"),
|
||||
Radio = require("backbone.radio"),
|
||||
RandomTemplate = require("hbs!templates/random"),
|
||||
RandomView;
|
||||
|
||||
RandomView = Marionette.LayoutView.extend({
|
||||
template: RandomTemplate,
|
||||
ui: {
|
||||
randomButton: "button"
|
||||
},
|
||||
events: {
|
||||
"click @ui.randomButton": "random"
|
||||
},
|
||||
initialize: function() {
|
||||
this.channel = Radio.channel("Sounds");
|
||||
},
|
||||
random: function() {
|
||||
this.channel.trigger("sounds:random");
|
||||
}
|
||||
});
|
||||
|
||||
return RandomView;
|
||||
});
|
||||
Reference in New Issue
Block a user