Fix: add player css, error_message css
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user