Fixed bug with team preview timer

This commit is contained in:
Deukhoofd 2016-02-10 04:07:03 +01:00
parent ab072543d2
commit cf4ad44d43
3 changed files with 10 additions and 12 deletions

View File

@ -1,14 +1,14 @@
mixin displayOtherTeam(team, text) mixin displayOtherTeam(team, text)
- var teamvisible = team.collection.parents[0].get('visibleteam') - var teamvisible = team.collection.parents[0].get('visibleteam')
- var isdef = typeof teamvisible - var isdef = typeof teamvisible
if isdef != 'undefined' && teamvisible section.battle_team_preview
section.battle_team_preview p= text
p= text ul.row-fluid.unstyled
ul.row-fluid.unstyled if isdef != 'undefined' && teamvisible
- team.get('pokemon').each(function(pokemon) { - team.get('pokemon').each(function(pokemon) {
li.px_40 li.px_40
+displayPokemon(pokemon) +displayPokemon(pokemon)
- }) - })
mixin displayYourTeam(team, text) mixin displayYourTeam(team, text)
section.battle_team_preview section.battle_team_preview

View File

@ -295,9 +295,9 @@ var locals_ = (locals || {}),battle = locals_.battle,window = locals_.window;var
var block = this.block, attributes = this.attributes || {}, escaped = this.escaped || {}; var block = this.block, attributes = this.attributes || {}, escaped = this.escaped || {};
var teamvisible = team.collection.parents[0].get('visibleteam') var teamvisible = team.collection.parents[0].get('visibleteam')
var isdef = typeof teamvisible var isdef = typeof teamvisible
buf.push("<section class=\"battle_team_preview\"><p>" + (jade.escape(null == (jade.interp = text) ? "" : jade.interp)) + "</p><ul class=\"row-fluid unstyled\"></ul>");
if ( isdef != 'undefined' && teamvisible) if ( isdef != 'undefined' && teamvisible)
{ {
buf.push("<section class=\"battle_team_preview\"><p>" + (jade.escape(null == (jade.interp = text) ? "" : jade.interp)) + "</p><ul class=\"row-fluid unstyled\">");
team.get('pokemon').each(function(pokemon) { team.get('pokemon').each(function(pokemon) {
{ {
buf.push("<li class=\"px_40\">"); buf.push("<li class=\"px_40\">");
@ -305,8 +305,8 @@ displayPokemon_mixin(pokemon);
buf.push("</li>"); buf.push("</li>");
} }
}) })
buf.push("</ul></section>");
} }
buf.push("</section>");
}; };
var displayYourTeam_mixin = function(team, text){ var displayYourTeam_mixin = function(team, text){
var block = this.block, attributes = this.attributes || {}, escaped = this.escaped || {}; var block = this.block, attributes = this.attributes || {}, escaped = this.escaped || {};

View File

@ -19,7 +19,6 @@ alts = require './alts'
achievements = require './achievements' achievements = require './achievements'
FIND_BATTLE_CONDITIONS = [ FIND_BATTLE_CONDITIONS = [
Conditions.TEAM_PREVIEW
Conditions.RATED_BATTLE Conditions.RATED_BATTLE
Conditions.TIMED_BATTLE Conditions.TIMED_BATTLE
Conditions.SLEEP_CLAUSE Conditions.SLEEP_CLAUSE
@ -31,7 +30,6 @@ FIND_BATTLE_CONDITIONS = [
] ]
FIND_BATTLE_CONDITIONS_UNRANKED = [ FIND_BATTLE_CONDITIONS_UNRANKED = [
Conditions.TEAM_PREVIEW
Conditions.TIMED_BATTLE Conditions.TIMED_BATTLE
Conditions.SLEEP_CLAUSE Conditions.SLEEP_CLAUSE
Conditions.EVASION_CLAUSE Conditions.EVASION_CLAUSE