Fix battle option checkboxes not matching actual settings (#876)

This commit is contained in:
asgdf
2017-03-01 11:08:15 +01:00
committed by Guangcong Luo
parent 5daf97fd8c
commit 57f6465ac2

View File

@@ -1246,8 +1246,8 @@
initialize: function (data) {
this.battle = data.battle;
var buf = '<p><strong>In this battle</strong></p>';
buf += '<p><label class="optlabel"><input type="checkbox" name="ignorespects" /> Ignore Spectators</label></p>';
buf += '<p><label class="optlabel"><input type="checkbox" name="ignoreopp" /> Ignore Opponent</label></p>';
buf += '<p><label class="optlabel"><input type="checkbox" name="ignorespects"' + (this.battle.ignoreSpects ? ' checked' : '') + '/> Ignore Spectators</label></p>';
buf += '<p><label class="optlabel"><input type="checkbox" name="ignoreopp"' + (this.battle.ignoreOpponent ? ' checked' : '') + '/> Ignore Opponent</label></p>';
buf += '<p><strong>All battles</strong></p>';
buf += '<p><label class="optlabel"><input type="checkbox" name="ignorenicks"' + (Tools.prefs('ignorenicks') ? ' checked' : '') + ' /> Ignore nicknames</label></p>';
buf += '<p><button name="close">Close</button></p>';