Fix: add player css, error_message css

This commit is contained in:
2018-07-13 20:14:51 +09:00
parent ab8ebb9ca1
commit 4edd637b05
10 changed files with 157 additions and 444 deletions
+14 -4
View File
@@ -12,9 +12,9 @@
class PlayerList {
constructor(tagDiv, parent) {
constructor(tagDiv, playerListManager) {
let self = this;
this.parent = parent;
this.playerListManager = playerListManager;
// console.log(tagDiv);
this.playerCount = 0;
@@ -36,11 +36,11 @@ class PlayerList {
this.disableItem(this.listRows[i]);
$(id_list[i]).siblings(".player_edit").click(function() {
parent.editPlayer(this);
playerListManager.editPlayer(this);
})
$(id_list[i]).siblings(".player_delete").click(function() {
parent.deletePlayer(this);
playerListManager.deletePlayer(this);
})
// console.log(this.listRows[i].playerName.val());
// console.log(this.listRows[i]);
@@ -64,6 +64,16 @@ class PlayerList {
updatePlayerList(jsonData) {
// console.log(jsonData);
if(jsonData === null) {
for(let i = 0; i < 10; i++) {
$(this.listRows[i].playerName).val("");
$(this.listRows[i].enterCode).val("");
this.disableItem(this.listRows[i]);
}
return;
}
for(let i = 0; i < 10; i++) {
$(this.listRows[i].playerID).empty();