Add: maestro_info

This commit is contained in:
2018-07-19 18:27:11 +09:00
parent 54b8bdb3a2
commit 732c085309
8 changed files with 168 additions and 15 deletions
+18 -12
View File
@@ -15,17 +15,6 @@ function addPlayer() {
let playerName = $("#add_player_name").val();
let enterCode = $("#add_player_enter_code").val();
if(!accountValidator.isValidPlayerID(playerName)) {
console.log("Error - playerName : " + playerName);
onErrorPlayerID(accountValidator.messageForInvalidPlayerID(playerName));
return;
} else if(!accountValidator.isValidPlayerPW(enterCode)) {
console.log("Error - enterCode : " + enterCode);
onErrorPlayerPW(accountValidator.messageForInvalidPlayerPW(enterCode));
return;
}
/*
if(playerName.length === 0) {
// $("#add_player_notice").val("학생 이름을 입력하세요.");
$("#error_message").text("학생 이름을 입력하세요.");
@@ -37,7 +26,22 @@ function addPlayer() {
$("#add_player_enter_code").focus();
return;
}
*/
if(maestroInfo.getRegisteredPlayerCount() >= maestroInfo.getMaxPlayerCount()) {
$("#error_message").text("학생을 더 이상 추가할 수 없습니다. (더 많은 학생수로 업그레이드 하세요)");
return;
}
if(!accountValidator.isValidPlayerID(playerName)) {
console.log("Error - playerName : " + playerName);
onErrorPlayerID(accountValidator.messageForInvalidPlayerID(playerName));
return;
} else if(!accountValidator.isValidPlayerPW(enterCode)) {
console.log("Error - enterCode : " + enterCode);
onErrorPlayerPW(accountValidator.messageForInvalidPlayerPW(enterCode));
return;
}
sendRequestServer( //url, sendParams, onSuccess, onFail, isDebugMode);
"./../server/player/add_player.php",
@@ -45,6 +49,8 @@ function addPlayer() {
(jsonData) => {
addPlayerListManager.updateAddPlayerListPage(1);
onChangePlayerCount();
},
(errorMessage, errorCode) => {