mirror of
https://github.com/2ec0b4/kaamelott-soundboard.git
synced 2025-12-08 15:43:24 +00:00
(petosorus-random_button) Réinitialise également le filtre
This commit is contained in:
@@ -20,6 +20,7 @@ define("views/filter", function(require) {
|
||||
},
|
||||
initialize: function() {
|
||||
this.channel = Radio.channel("Sounds");
|
||||
this.channel.on("sounds:reset", this.resetFilter.bind(this));
|
||||
},
|
||||
filterSounds: function(e) {
|
||||
var value = this.$el.find(this.ui.searchField).val();
|
||||
@@ -35,7 +36,9 @@ define("views/filter", function(require) {
|
||||
this.channel.trigger("sounds:filter", value);
|
||||
},
|
||||
resetFilter: function(e) {
|
||||
e.preventDefault();
|
||||
if (e) {
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
this.$el.find(this.ui.searchField).val('');
|
||||
this.$el.find(this.ui.searchForm).submit();
|
||||
|
||||
Reference in New Issue
Block a user