diff --git a/js/client-battle.js b/js/client-battle.js index 5ad899b1a..c0ea34588 100644 --- a/js/client-battle.js +++ b/js/client-battle.js @@ -22,7 +22,7 @@ this.$chat = this.$chatFrame.find('.inner'); - this.$options = this.battle.optionsElem.html(''); + this.$options = this.battle.optionsElem.html(''); this.battle.customCallback = _.bind(this.updateControls, this); this.battle.endCallback = _.bind(this.updateControls, this); @@ -31,6 +31,9 @@ this.battle.play(); }, + events: { + 'change input[name=ignorespects]': 'toggleIgnoreSpects' + }, battleEnded: false, join: function() { app.send('/join '+this.id); @@ -685,9 +688,8 @@ setTimer: function(setting) { this.send('/timer '+setting); }, - toggleIgnoreSpects: function() { - this.battle.ignoreSpects = !this.battle.ignoreSpects; - this.$options.html(''); + toggleIgnoreSpects: function(e) { + this.battle.ignoreSpects = !!e.currentTarget.checked; }, forfeit: function() { this.send('/forfeit');