diff --git a/js/battle.js b/js/battle.js index 98ea1c893..061fc0d52 100644 --- a/js/battle.js +++ b/js/battle.js @@ -1451,8 +1451,8 @@ function Battle(frame, logFrame, noPreload) { var selfS = this; this.battle = self; - this.name = 'Player'; - this.id = 'Player'; + this.name = ''; + this.id = ''; this.initialized = false; this.n = n; this.foe = null; diff --git a/js/client-battle.js b/js/client-battle.js index 36ab9d14d..7a31f87d0 100644 --- a/js/client-battle.js +++ b/js/client-battle.js @@ -505,6 +505,7 @@ this.updateSideLocation(request.side, true); } this.notifyRequest(); + this.update(); }, notifyRequest: function() { var oName = this.battle.yourSide.name; @@ -830,7 +831,7 @@ buf += '

Register an account:

'; } buf += '

' + (data.name || app.user.get('name')) + '

'; - buf += '

'; + buf += '

'; buf += '

'; buf += '

'; buf += '

'; diff --git a/js/client.js b/js/client.js index 553a1251f..a729ab265 100644 --- a/js/client.js +++ b/js/client.js @@ -947,6 +947,7 @@ } if (popup.domInitialize) popup.domInitialize(data); + popup.$('.autofocus').focus(); this.popups.push(popup); return popup; }, @@ -1348,7 +1349,7 @@ }, initialize: function(data) { this.type = 'semimodal'; - this.$el.html('

'+Tools.parseMessage(data.message)+'

').css('max-width', 480); + this.$el.html('

'+Tools.parseMessage(data.message)+'

').css('max-width', 480); }, dispatchClickButton: function(e) { @@ -1497,7 +1498,7 @@ buf += '

'; } else { buf += '

You have been disconnected – possibly because the server was restarted.

' - buf += '

'; + buf += '

'; } buf += ''; @@ -1529,7 +1530,7 @@ var name = (data.name || ''); if (!name && app.user.get('named')) name = app.user.get('name'); - buf += '

'; + buf += '

'; buf += '

'; buf += ''; @@ -1564,7 +1565,7 @@ buf += '

Log in:

'; buf += '

'+Tools.escapeHTML(data.username)+'

'; - buf += '

'; + buf += '

'; buf += '

'; buf += '

or

';