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:
@@ -469,8 +469,8 @@ h1{font-family:"PT Sans Narrow","Helvetica Neue",sans-serif;font-size:2em;font-w
|
||||
.teambuilder .species{float:left;width:180px;margin-left:-185px;}
|
||||
.teambuilder .species .species_list{width:100%;}
|
||||
.teambuilder .species .species_list .pbv{float:right;color:#888}
|
||||
.teambuilder .shiny-switch{display:inline-block;width:14px;height:14px;margin-right:10px;margin-left:-24px;vertical-align:middle;cursor:pointer;background-image:URL('http://91.121.152.74:8000/Sprites/images/noshiny.png');-webkit-background-size:cover;-moz-background-size:cover;background-size:cover;}
|
||||
.teambuilder .shiny-switch.selected{background-image:URL('http://91.121.152.74:8000/Sprites/images/shiny.png')}
|
||||
.teambuilder .shiny-switch{display:inline-block;width:14px;height:14px;margin-right:10px;margin-left:-24px;vertical-align:middle;cursor:pointer;background-image:URL('/Sprites/images/noshiny.png');-webkit-background-size:cover;-moz-background-size:cover;background-size:cover;}
|
||||
.teambuilder .shiny-switch.selected{background-image:URL('/Sprites/images/shiny.png')}
|
||||
.teambuilder .happiness-switch{display:inline-block;position:relative;width:14px;height:14px;margin-left:10px;margin-right:-24px;cursor:pointer;vertical-align:middle;}
|
||||
.teambuilder .happiness-switch:before,.teambuilder .happiness-switch:after{position:absolute;content:"";left:8px;top:0;width:8px;height:13px;background:#ff3c3c;-webkit-border-radius:7px 7px 0 0;border-radius:7px 7px 0 0;-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-o-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transform-origin:0 100%;-moz-transform-origin:0 100%;-o-transform-origin:0 100%;-ms-transform-origin:0 100%;transform-origin:0 100%}
|
||||
.teambuilder .happiness-switch:after{left:0;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-o-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);-webkit-transform-origin:100% 100%;-moz-transform-origin:100% 100%;-o-transform-origin:100% 100%;-ms-transform-origin:100% 100%;transform-origin:100% 100%}
|
||||
@@ -531,6 +531,7 @@ h1{font-family:"PT Sans Narrow","Helvetica Neue",sans-serif;font-size:2em;font-w
|
||||
.teambuilder .display_teams h2{margin-left:10px;margin-bottom:0}
|
||||
.teambuilder .display_teams .select-team h2{-o-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:192px;margin:0;font-size:1.5em}
|
||||
.teambuilder .display_teams .add-new-team{margin:10px}
|
||||
.teambuilder .display_teams .get-teams{margin:10px}
|
||||
.teambuilder .display_teams .team-meta{font-size:.75em;text-align:right;margin-top:10px}
|
||||
.teambuilder .display_teams .team-pbv{margin-top:-5px}
|
||||
.teambuilder .display_teams .team-tier{margin-top:-5px}
|
||||
|
||||
@@ -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