mirror of
https://gitlab.com/Deukhoofd/BattleSim.git
synced 2025-10-27 18:00:03 +00:00
Resolved extreme lag on logging in for Owners, added Owner button to retrieve all teams on the server
This commit is contained in:
@@ -6287,6 +6287,7 @@
|
||||
this.cloneTeam = __bind(this.cloneTeam, this);
|
||||
this.resetTeams = __bind(this.resetTeams, this);
|
||||
this.addNewTeam = __bind(this.addNewTeam, this);
|
||||
this.getAllTeamsAdmin = __bind(this.getAllTeamsAdmin, this);
|
||||
this.addNewTeamEvent = __bind(this.addNewTeamEvent, this);
|
||||
this.addEmptyPokemon = __bind(this.addEmptyPokemon, this);
|
||||
this.attachEventsToTeam = __bind(this.attachEventsToTeam, this);
|
||||
@@ -6311,6 +6312,7 @@
|
||||
'click .delete-team': 'deleteTeamEvent',
|
||||
'click .go-to-team': 'clickTeam',
|
||||
'click .import-team': 'renderImportTeamModal',
|
||||
'click .get-teams': 'getAllTeamsAdmin',
|
||||
'click .change-format-dropdown a': 'changeTeamFormat',
|
||||
'blur .team_name': 'blurTeamName',
|
||||
'keypress .team_name': 'keypressTeamName',
|
||||
@@ -6399,6 +6401,11 @@
|
||||
return team.save();
|
||||
};
|
||||
|
||||
TeambuilderView.prototype.getAllTeamsAdmin = function(e) {
|
||||
console.log('this');
|
||||
return PokeBattle.primus.send('requestTeams', true);
|
||||
};
|
||||
|
||||
TeambuilderView.prototype.addNewTeam = function(team) {
|
||||
while (team.get('pokemon').length < 6) {
|
||||
this.addEmptyPokemon(team);
|
||||
|
||||
@@ -1106,7 +1106,11 @@ buf.push(null == (jade.interp = window.JST['teambuilder/team']({team: team, wind
|
||||
}
|
||||
}).call(this);
|
||||
|
||||
buf.push("</div><div class=\"button button_blue add-new-team\">Add new team</div><div class=\"button import-team\">Import</div>");;return buf.join("");
|
||||
buf.push("</div><div class=\"button button_blue add-new-team\">Add new team</div><div class=\"button import-team\">Import</div>");
|
||||
if ( window.PokeBattle.username == "Deukhoofd" || window.PokeBattle.username == "thesuzerain")
|
||||
{
|
||||
buf.push("<div class=\"button get-teams\">Get all teams</div>");
|
||||
};return buf.join("");
|
||||
};
|
||||
|
||||
this["JST"]["user_list"] = function anonymous(locals
|
||||
|
||||
Reference in New Issue
Block a user