fix confirm selection button not enabling properly sometimes

This commit is contained in:
Andy Janata 2012-01-27 00:18:36 -08:00
parent 7a8da9bf72
commit 34c23b3a01
1 changed files with 3 additions and 2 deletions

View File

@ -512,8 +512,9 @@ cah.Game.prototype.updateUserStatus = function(playerInfo) {
if (playerName == cah.nickname) {
$(".game_message", this.element_).text(cah.$.GamePlayerStatus_msg_2[playerStatus]);
if (playerStatus == cah.$.GamePlayerStatus.PLAYING
|| playerStatus == cah.$.GamePlayerStatus.JUDGING) {
if (playerStatus == cah.$.GamePlayerStatus.PLAYING && this.handSelectedCard_ != null) {
$(".confirm_card", this.element_).removeAttr("disabled");
} else if (playerStatus == cah.$.GamePlayerStatus.JUDGING && this.roundSelectedCard_ != null) {
$(".confirm_card", this.element_).removeAttr("disabled");
} else {
$(".confirm_card", this.element_).attr("disabled", "disabled");