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

Filtrage lors de l'aléatoire

This commit is contained in:
Thomas Graviou
2019-10-25 14:25:51 +02:00
parent 0261f2b86b
commit aa163e62e1
5 changed files with 39 additions and 6 deletions

View File

@@ -9,16 +9,21 @@ define("views/random", function(require) {
RandomView = Marionette.LayoutView.extend({
template: RandomTemplate,
ui: {
randomButton: "button"
randomButton: "#random",
resetButton: "#reset"
},
events: {
"click @ui.randomButton": "random"
"click @ui.randomButton": "random",
"click @ui.resetButton": "reset"
},
initialize: function() {
this.channel = Radio.channel("Sounds");
},
random: function() {
this.channel.trigger("sounds:random");
},
reset: function() {
this.channel.trigger("sounds:reset");
}
});