1
0
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:
Thomas Graviou
2019-10-16 11:28:49 +02:00
parent dc41717ed4
commit 0261f2b86b
6 changed files with 43 additions and 1 deletions

26
js/app/views/random.js Normal file
View 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;
});