mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-06-02 22:09:20 -05:00
Pass roomid when adding TeamPopup from TournamentBox
This commit is contained in:
parent
f6f929efe0
commit
0b8e862506
|
|
@ -763,7 +763,7 @@
|
|||
};
|
||||
|
||||
TournamentBox.prototype.teamSelect = function (team, button) {
|
||||
app.addPopup(TeamPopup, {team: team, format: this.info.format, sourceEl: button});
|
||||
app.addPopup(TeamPopup, {team: team, format: this.info.format, sourceEl: button, room: this.room.id});
|
||||
};
|
||||
|
||||
return TournamentBox;
|
||||
|
|
|
|||
|
|
@ -892,14 +892,15 @@
|
|||
}
|
||||
},
|
||||
selectTeam: function (i) {
|
||||
var formatid = this.sourceEl.closest('form').find('button[name=format]').val();
|
||||
i = +i;
|
||||
this.sourceEl.val(i).html(TeamPopup.renderTeam(i));
|
||||
if (this.sourceEl[0].offsetParent.className === 'mainmenuwrapper') {
|
||||
var formatid = this.sourceEl.closest('form').find('button[name=format]').val();
|
||||
app.rooms[''].curTeamIndex = i;
|
||||
app.rooms[''].curTeamFormat = formatid;
|
||||
} else if (this.sourceEl[0].offsetParent.className === 'tournament-box active') {
|
||||
app.curSideRoom.tournamentBox.curTeamIndex = i;
|
||||
var room = app.dispatchingPopup.options.room;
|
||||
app.rooms[room].tournamentBox.curTeamIndex = i;
|
||||
}
|
||||
this.close();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user