From 6855770aa613a7e5a140e449d3603bd1a1247d9e Mon Sep 17 00:00:00 2001 From: Carl Sobolewski Date: Tue, 15 Sep 2015 23:34:13 -0600 Subject: [PATCH] Add a validate button to the teambuilder The validate button sends the current team and a validation request to the server. The server will respond with a positive acknowledgement for valid teams, or else a list of problems (the same list as when seeking a battle). --- js/client-teambuilder.js | 10 +++++++++- style/client.css | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/js/client-teambuilder.js b/js/client-teambuilder.js index 139f66247..c4ae2b91a 100644 --- a/js/client-teambuilder.js +++ b/js/client-teambuilder.js @@ -509,7 +509,7 @@ } } if (curSection) buf += ''; - buf += ''; + buf += ''; } if (!this.curSetList.length) { buf += '
  • you have no pokemon lol
  • '; @@ -657,6 +657,14 @@ this.saveFlag = true; Storage.saveTeams(); }, + validate: function () { + if (!this.curTeam.format) { + app.addPopupMessage('You need to pick a format to validate your team.'); + return; + } + app.sendTeam(this.curTeam); + app.send('/vtm ' + this.curTeam.format); + }, teamNameChange: function (e) { this.curTeam.name = ($.trim(e.currentTarget.value) || 'Untitled ' + (this.curTeamLoc + 1)); e.currentTarget.value = this.curTeam.name; diff --git a/style/client.css b/style/client.css index 9a5190338..f8c1f463a 100644 --- a/style/client.css +++ b/style/client.css @@ -2018,7 +2018,7 @@ a.ilink:hover { } .teamchart li.format-select select, .teamchart li.format-select option { - font: 12pt Verdana, sans-serif; + margin-right: 5px; } .majorbutton {