Fix: maestro html ES6 -> ES5
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
class AccountValidator {
|
||||
|
||||
constructor() {
|
||||
function AccountValidator() {
|
||||
this.patternMaestroID = /^[A-Za-z가-힣]{1}[A-Za-z0-9가-힣]{2,19}$/;
|
||||
this.patternMaestroPW = /^[A-Za-z0-9]{4,16}$/;
|
||||
|
||||
@@ -9,14 +7,14 @@ class AccountValidator {
|
||||
}
|
||||
|
||||
// maestro
|
||||
isValidMaestroID(textID) {
|
||||
AccountValidator.prototype.isValidMaestroID = function(textID) {
|
||||
if(!this.patternMaestroID.test(textID))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
messageForInvalidMaestroID(textID) {
|
||||
AccountValidator.prototype.messageForInvalidMaestroID = function(textID) {
|
||||
if(textID.length < AccountValidator.MAESTRO_ID_LENGTH_MINIMUM)
|
||||
return "마에스트로 계정명은 " + AccountValidator.MAESTRO_ID_LENGTH_MINIMUM + "글자 이상이어야 합니다.";
|
||||
else if(textID.length > AccountValidator.MAESTRO_ID_LENGTH_MAXIMUM)
|
||||
@@ -28,14 +26,14 @@ class AccountValidator {
|
||||
}
|
||||
|
||||
|
||||
isValidMaestroPW(textPW) {
|
||||
AccountValidator.prototype.isValidMaestroPW = function(textPW) {
|
||||
if(!this.patternMaestroPW.test(textPW))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
messageForInvalidMaestroPW(textPW) {
|
||||
AccountValidator.prototype.messageForInvalidMaestroPW = function(textPW) {
|
||||
console.log(textPW);
|
||||
if(textPW.length < AccountValidator.MAESTRO_PW_LENGTH_MINIMUM)
|
||||
return "마에스트로의 암호는 " + AccountValidator.MAESTRO_PW_LENGTH_MINIMUM + "글자 이상이어야 합니다.";
|
||||
@@ -49,14 +47,14 @@ class AccountValidator {
|
||||
|
||||
|
||||
// player
|
||||
isValidPlayerID(textID) {
|
||||
AccountValidator.prototype.isValidPlayerID = function(textID) {
|
||||
if(!this.patternPlayerID.test(textID))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
messageForInvalidPlayerID(textID) {
|
||||
AccountValidator.prototype.messageForInvalidPlayerID = function(textID) {
|
||||
if(textID.length < Number(AccountValidator.Player_ID_LENGTH_MINIMUM))
|
||||
return "학생 이름은 " + AccountValidator.Player_ID_LENGTH_MINIMUM + "글자 이상이어야 합니다.";
|
||||
else if(textID.length > Number(AccountValidator.PLAYER_ID_LENGTH_MAXIMUM))
|
||||
@@ -66,14 +64,14 @@ class AccountValidator {
|
||||
}
|
||||
|
||||
|
||||
isValidPlayerPW(textPW) {
|
||||
AccountValidator.prototype.isValidPlayerPW = function(textPW) {
|
||||
if(!this.patternPlayerPW.test(textPW))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
messageForInvalidPlayerPW(textPW) {
|
||||
AccountValidator.prototype.messageForInvalidPlayerPW = function(textPW) {
|
||||
if(textPW.length < Number(AccountValidator.PLAYER_PW_LENGTH_MINIMUM))
|
||||
return "학생 입장 번호는 " + AccountValidator.PLAYER_PW_LENGTH_MINIMUM + "글자 이상의 숫자로 입력해 주세요.";
|
||||
else if(textPW.length > Number(AccountValidator.PLAYER_PW_LENGTH_MAXIMUM))
|
||||
@@ -83,9 +81,6 @@ class AccountValidator {
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
AccountValidator.MAESTRO_ID_LENGTH_MINIMUM = 4;
|
||||
AccountValidator.MAESTRO_ID_LENGTH_MAXIMUM = 20;
|
||||
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
class MaestroInfo {
|
||||
|
||||
constructor() {
|
||||
function MaestroInfo() {
|
||||
this.maestroID = sessionStorage.getItem("maestroID");
|
||||
this.maestroName = "";
|
||||
this.accountType = 0;
|
||||
this.playerCount = 0;
|
||||
}
|
||||
|
||||
loadMaestroInfo(onSuccess, onFail) {
|
||||
let self = this;
|
||||
MaestroInfo.prototype.loadMaestroInfo = function(onSuccess, onFail) {
|
||||
var self = this;
|
||||
|
||||
sendRequestServer( //url, sendParams, onSuccess, onFail, isDebugMode);
|
||||
"./../server/maestro/maestro_info.php",
|
||||
@@ -29,7 +27,7 @@ class MaestroInfo {
|
||||
);
|
||||
}
|
||||
|
||||
getMaxPlayerCount() {
|
||||
MaestroInfo.prototype.getMaxPlayerCount = function() {
|
||||
switch(this.accountType) {
|
||||
case 0:
|
||||
case 1:
|
||||
@@ -54,8 +52,6 @@ class MaestroInfo {
|
||||
}
|
||||
}
|
||||
|
||||
getRegisteredPlayerCount() {
|
||||
MaestroInfo.prototype.getRegisteredPlayerCount = function() {
|
||||
return this.playerCount;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
let addPlayerListManager;
|
||||
let searchPlayerListManager;
|
||||
var addPlayerListManager;
|
||||
var searchPlayerListManager;
|
||||
|
||||
let mouseAppList;
|
||||
let typingAppList;
|
||||
var mouseAppList;
|
||||
var typingAppList;
|
||||
|
||||
let accountValidator = new AccountValidator();
|
||||
var accountValidator = new AccountValidator();
|
||||
|
||||
+6
-6
@@ -1,4 +1,4 @@
|
||||
let maestroID = -1;
|
||||
var maestroID = -1;
|
||||
|
||||
$(document).ready(function() {
|
||||
loadMaestroID();
|
||||
@@ -21,7 +21,7 @@ function saveMaestroID(maestroID) {
|
||||
}
|
||||
|
||||
function getParentDirectory(url) {
|
||||
let directories = url.split("/");
|
||||
var directories = url.split("/");
|
||||
if(directories.length < 2)
|
||||
return "";
|
||||
|
||||
@@ -29,7 +29,7 @@ function getParentDirectory(url) {
|
||||
}
|
||||
|
||||
function getPage(url) {
|
||||
let directories = url.split("/");
|
||||
var directories = url.split("/");
|
||||
if(directories.length < 1)
|
||||
return "";
|
||||
|
||||
@@ -37,7 +37,7 @@ function getPage(url) {
|
||||
}
|
||||
|
||||
function goHome() {
|
||||
let url = window.location.href;
|
||||
var url = window.location.href;
|
||||
|
||||
if(getParentDirectory(url) === "maestro") {
|
||||
if(getPage(url) !== "main_menu.html")
|
||||
@@ -66,12 +66,12 @@ function logout() {
|
||||
|
||||
function showErrorMessage(message, type) {
|
||||
console.log("showErrorMessage : " + message);
|
||||
let messageBox = $("#message_box");
|
||||
var messageBox = $("#message_box");
|
||||
|
||||
if(!messageBox)
|
||||
return;
|
||||
|
||||
let alertType = "";
|
||||
var alertType = "";
|
||||
switch(type) {
|
||||
case "success":
|
||||
alertType = "alert-success";
|
||||
|
||||
@@ -1,26 +1,21 @@
|
||||
class MouseAppList {
|
||||
|
||||
constructor(pageNoArea) {
|
||||
let self = this;
|
||||
function MouseAppList(pageNoArea) {
|
||||
var self = this;
|
||||
this.pageNoArea = pageNoArea;
|
||||
// console.log(parent);
|
||||
}
|
||||
|
||||
addPlayerListPages(playerCount) {
|
||||
MouseAppList.prototype.addPlayerListPages = function(playerCount) {
|
||||
lastPageNo = Math.ceil( (playerCount + 1) / 10 );
|
||||
|
||||
$(this.pageNoArea).empty();
|
||||
|
||||
for(let pageNo = 1; pageNo < lastPageNo + 1; pageNo++) {
|
||||
for(var pageNo = 1; pageNo < lastPageNo + 1; pageNo++) {
|
||||
$(this.pageNoArea).append(
|
||||
"<a onClick='onClickPlayerListPage(" + pageNo + ")'> " + pageNo + " </a>"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function onClickPlayerListPage(pageNo) {
|
||||
switch(pageNo) {
|
||||
|
||||
+11
-18
@@ -1,6 +1,4 @@
|
||||
class PlayerListRow {
|
||||
|
||||
constructor(playerID, playerName, enterCode, editButton, deleteButton) {
|
||||
function PlayerListRow(playerID, playerName, enterCode, editButton, deleteButton) {
|
||||
this.playerID = playerID;
|
||||
this.playerName = playerName;
|
||||
this.enterCode = enterCode;
|
||||
@@ -8,12 +6,9 @@
|
||||
this.deleteButton = deleteButton;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class PlayerList {
|
||||
|
||||
constructor(tagDiv, playerListManager) {
|
||||
let self = this;
|
||||
function PlayerList(tagDiv, playerListManager) {
|
||||
var self = this;
|
||||
this.playerListManager = playerListManager;
|
||||
// console.log(tagDiv);
|
||||
// console.log(playerListManager);
|
||||
@@ -21,12 +16,12 @@ class PlayerList {
|
||||
this.playerCount = 0;
|
||||
this.activePageNo = 1;
|
||||
|
||||
// let id_list = tagDiv.find(".player_id");
|
||||
let id_list = tagDiv.find(".player-list");
|
||||
// var id_list = tagDiv.find(".player_id");
|
||||
var id_list = tagDiv.find(".player-list");
|
||||
// console.log(id_list);
|
||||
|
||||
this.listRows = new Array();
|
||||
for(let i = 0; i < id_list.length; i++) {
|
||||
for(var i = 0; i < id_list.length; i++) {
|
||||
this.listRows[i] = new PlayerListRow(
|
||||
id_list[i].getElementsByClassName("player_id"),
|
||||
id_list[i].getElementsByClassName("player_name"),
|
||||
@@ -49,7 +44,7 @@ class PlayerList {
|
||||
}
|
||||
}
|
||||
|
||||
disableItem(item) {
|
||||
PlayerList.prototype.disableItem = function(item) {
|
||||
$(item.playerID).empty();
|
||||
$(item.playerName).prop("disabled", true);
|
||||
$(item.enterCode).prop("disabled", true);
|
||||
@@ -59,7 +54,7 @@ class PlayerList {
|
||||
$(item.deleteButton).prop("disabled", true);
|
||||
}
|
||||
|
||||
enableItem(item) {
|
||||
PlayerList.prototype.enableItem = function(item) {
|
||||
$(item.playerName).prop("disabled", false);
|
||||
$(item.enterCode).prop("disabled", false);
|
||||
// $(item.playerName).prop("readonly", false);
|
||||
@@ -68,9 +63,9 @@ class PlayerList {
|
||||
$(item.deleteButton).prop("disabled", false);
|
||||
}
|
||||
|
||||
updatePlayerList(jsonData) {
|
||||
PlayerList.prototype.updatePlayerList = function(jsonData) {
|
||||
if(jsonData === null) {
|
||||
for(let i = 0; i < 10; i++) {
|
||||
for(var i = 0; i < 10; i++) {
|
||||
$(this.listRows[i].playerName).val("");
|
||||
$(this.listRows[i].enterCode).val("");
|
||||
|
||||
@@ -80,7 +75,7 @@ class PlayerList {
|
||||
return;
|
||||
}
|
||||
|
||||
for(let i = 0; i < 10; i++) {
|
||||
for(var i = 0; i < 10; i++) {
|
||||
$(this.listRows[i].playerID).empty();
|
||||
|
||||
if(i < jsonData.length) {
|
||||
@@ -97,5 +92,3 @@ class PlayerList {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,7 +1,5 @@
|
||||
class PlayerListManager {
|
||||
|
||||
constructor(docList, docNav) {
|
||||
let self = this;
|
||||
function PlayerListManager(docList, docNav) {
|
||||
var self = this;
|
||||
this.docList = docList;
|
||||
this.docNav = docNav;
|
||||
this.playerListID = $(docList).attr("id");
|
||||
@@ -18,8 +16,8 @@
|
||||
}
|
||||
|
||||
|
||||
setupAddPlayerList() {
|
||||
let self = this;
|
||||
PlayerListManager.prototype.setupAddPlayerList = function() {
|
||||
var self = this;
|
||||
|
||||
sendRequestServer( //url, sendParams, onSuccess, onFail, isDebugMode);
|
||||
"./../server/player/registered_player_count.php",
|
||||
@@ -41,13 +39,13 @@
|
||||
);
|
||||
}
|
||||
|
||||
loadAddPlayerListPage(pageNo) {
|
||||
let self = this;
|
||||
PlayerListManager.prototype.loadAddPlayerListPage = function(pageNo) {
|
||||
var self = this;
|
||||
this.activePageNo = pageNo;
|
||||
|
||||
let pageIndex = pageNo - 1;
|
||||
let startNo = pageIndex * 10;
|
||||
let endNo = pageIndex * 10 + 9;
|
||||
var pageIndex = pageNo - 1;
|
||||
var startNo = pageIndex * 10;
|
||||
var endNo = pageIndex * 10 + 9;
|
||||
|
||||
sendRequestServer( //url, sendParams, onSuccess, onFail, isDebugMode);
|
||||
"./../server/player/registered_player_list.php",
|
||||
@@ -66,13 +64,13 @@
|
||||
}
|
||||
|
||||
|
||||
updateAddPlayerListPage(pageNo) {
|
||||
let self = this;
|
||||
PlayerListManager.prototype.updateAddPlayerListPage = function(pageNo) {
|
||||
var self = this;
|
||||
this.playerListPage = pageNo;
|
||||
|
||||
let pageIndex = pageNo - 1;
|
||||
let startNo = pageIndex * 10;
|
||||
let endNo = pageIndex * 10 + 9;
|
||||
var pageIndex = pageNo - 1;
|
||||
var startNo = pageIndex * 10;
|
||||
var endNo = pageIndex * 10 + 9;
|
||||
|
||||
sendRequestServer( //url, sendParams, onSuccess, onFail, isDebugMode);
|
||||
"./../server/player/registered_player_list.php",
|
||||
@@ -93,8 +91,8 @@
|
||||
|
||||
|
||||
|
||||
setupSearchPlayerList(playerName) {
|
||||
let self = this;
|
||||
PlayerListManager.prototype.setupSearchPlayerList = function(playerName) {
|
||||
var self = this;
|
||||
this.searchPlayerName = playerName;
|
||||
|
||||
sendRequestServer( //url, sendParams, onSuccess, onFail, isDebugMode);
|
||||
@@ -119,13 +117,13 @@
|
||||
);
|
||||
}
|
||||
|
||||
updateSearchPlayerListPage(playerName, pageNo) {
|
||||
let self = this;
|
||||
PlayerListManager.prototype.updateSearchPlayerListPage = function(playerName, pageNo) {
|
||||
var self = this;
|
||||
this.playerListPage = pageNo;
|
||||
|
||||
let pageIndex = pageNo - 1;
|
||||
let startNo = pageIndex * 10;
|
||||
let endNo = pageIndex * 10 + 9;
|
||||
var pageIndex = pageNo - 1;
|
||||
var startNo = pageIndex * 10;
|
||||
var endNo = pageIndex * 10 + 9;
|
||||
|
||||
sendRequestServer( //url, sendParams, onSuccess, onFail, isDebugMode);
|
||||
"./../server/player/search_player_list.php",
|
||||
@@ -147,22 +145,22 @@
|
||||
|
||||
|
||||
|
||||
editPlayer(inputButton) {
|
||||
let self = this;
|
||||
PlayerListManager.prototype.editPlayer = function(inputButton) {
|
||||
var self = this;
|
||||
console.log(inputButton);
|
||||
// let clickedObjectID = this.getClickedObjectID(inputButton);
|
||||
// var clickedObjectID = this.getClickedObjectID(inputButton);
|
||||
|
||||
|
||||
let id = $(inputButton).siblings(".player_id");
|
||||
let playerID = id.text();
|
||||
var id = $(inputButton).siblings(".player_id");
|
||||
var playerID = id.text();
|
||||
// console.log(playerID);
|
||||
|
||||
let name = $(inputButton).siblings(".player_name");
|
||||
let playerName = name.val();
|
||||
var name = $(inputButton).siblings(".player_name");
|
||||
var playerName = name.val();
|
||||
// console.log(playerName);
|
||||
|
||||
let enterCode = $(inputButton).siblings(".player_entercode");
|
||||
let playerEnterCode = enterCode.val();
|
||||
var enterCode = $(inputButton).siblings(".player_entercode");
|
||||
var playerEnterCode = enterCode.val();
|
||||
// console.log(playerEnterCode);
|
||||
|
||||
sendRequestServer( //url, sendParams, onSuccess, onFail, isDebugMode);
|
||||
@@ -186,17 +184,17 @@
|
||||
);
|
||||
}
|
||||
|
||||
deletePlayer(inputButton) {
|
||||
let self = this;
|
||||
PlayerListManager.prototype.deletePlayer = function(inputButton) {
|
||||
var self = this;
|
||||
|
||||
let id = $(inputButton).siblings(".player_id");
|
||||
let playerID = id.text();
|
||||
var id = $(inputButton).siblings(".player_id");
|
||||
var playerID = id.text();
|
||||
|
||||
let name = $(inputButton).siblings(".player_name");
|
||||
let playerName = name.val();
|
||||
var name = $(inputButton).siblings(".player_name");
|
||||
var playerName = name.val();
|
||||
// console.log(playerName);
|
||||
|
||||
// let clickedObjectID = this.getClickedObjectID(inputButton);
|
||||
// var clickedObjectID = this.getClickedObjectID(inputButton);
|
||||
|
||||
if(playerID === null || playerID === "")
|
||||
return;
|
||||
@@ -223,8 +221,8 @@
|
||||
);
|
||||
}
|
||||
|
||||
onClickPageNo(pageNo) {
|
||||
let self = this;
|
||||
PlayerListManager.prototype.onClickPageNo = function(pageNo) {
|
||||
var self = this;
|
||||
|
||||
self.activePageNo = pageNo;
|
||||
if(this.playerListID === "add_player_list") {
|
||||
@@ -234,4 +232,3 @@
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,5 @@
|
||||
class PlayerListNavigator {
|
||||
|
||||
constructor(pageNoArea, playerListManager) {
|
||||
let self = this;
|
||||
function PlayerListNavigator(pageNoArea, playerListManager) {
|
||||
var self = this;
|
||||
this.playerListManager = playerListManager;
|
||||
this.pagination = pageNoArea;
|
||||
// console.log(parent);
|
||||
@@ -10,7 +8,7 @@
|
||||
this.lastPageNo = 1;
|
||||
}
|
||||
|
||||
updateNavigator(activePageNo, lastPageNo) {
|
||||
PlayerListNavigator.prototype.updateNavigator = function(activePageNo, lastPageNo) {
|
||||
this.activePageNo = activePageNo;
|
||||
this.lastPageNo = lastPageNo;
|
||||
// this.lastPageNo = Math.ceil( (playerCount + 1) / 10 );
|
||||
@@ -21,9 +19,9 @@
|
||||
this.disableNavButtons();
|
||||
}
|
||||
|
||||
makePagination() {
|
||||
PlayerListNavigator.prototype.makePagination = function() {
|
||||
// left arrows
|
||||
let paginationLeftArrows = '\
|
||||
var paginationLeftArrows = '\
|
||||
<li class="page-item">\
|
||||
<a class="page-link" href="javascript:void(0);" aria-label="First">\
|
||||
<span aria-hidden="true">«</span>\
|
||||
@@ -43,14 +41,14 @@
|
||||
$(this.pagination).append(paginationLeftArrows);
|
||||
|
||||
// numbers
|
||||
for(let pageNo = 1; pageNo < this.lastPageNo + 1; pageNo++) {
|
||||
for(var pageNo = 1; pageNo < this.lastPageNo + 1; pageNo++) {
|
||||
$(this.pagination).append(
|
||||
'<li class="page-item"><a class="page-link" href="javascript:void(0);" aria-label="' + pageNo + '">' + pageNo + '</a></li>'
|
||||
);
|
||||
}
|
||||
|
||||
// right arrows
|
||||
let paginationRightArrows = '\
|
||||
var paginationRightArrows = '\
|
||||
<li> </li>\
|
||||
\
|
||||
<li class="page-item">\
|
||||
@@ -70,8 +68,8 @@
|
||||
$(this.pagination).append(paginationRightArrows);
|
||||
}
|
||||
|
||||
applyClickEvent() {
|
||||
let self = this;
|
||||
PlayerListNavigator.prototype.applyClickEvent = function() {
|
||||
var self = this;
|
||||
|
||||
$("[aria-label='First']").click(function() {
|
||||
self.onClickPageNo("first");
|
||||
@@ -81,7 +79,7 @@
|
||||
self.onClickPageNo("previous");
|
||||
});
|
||||
|
||||
for(let pageNo = 1; pageNo < this.lastPageNo + 1; pageNo++) {
|
||||
for(var pageNo = 1; pageNo < this.lastPageNo + 1; pageNo++) {
|
||||
$("[aria-label='" + pageNo + "']").click(function() {
|
||||
self.onClickPageNo(pageNo);
|
||||
});
|
||||
@@ -96,7 +94,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
disableNavButtons() {
|
||||
PlayerListNavigator.prototype.disableNavButtons = function() {
|
||||
/*
|
||||
console.log(this.activePageNo);
|
||||
console.log(this.lastPageNo);
|
||||
@@ -112,7 +110,7 @@
|
||||
else
|
||||
$("[aria-label='Previous']").parent().prop("disabled", false);
|
||||
|
||||
for(let pageNo = 1; pageNo < this.lastPageNo + 1; pageNo++) {
|
||||
for(var pageNo = 1; pageNo < this.lastPageNo + 1; pageNo++) {
|
||||
if(this.activePageNo === pageNo)
|
||||
$("[aria-label='" + pageNo + "']").parent().prop("disabled", true);
|
||||
else
|
||||
@@ -131,7 +129,7 @@
|
||||
*/
|
||||
}
|
||||
|
||||
onClickPageNo(pageNo) {
|
||||
PlayerListNavigator.prototype.onClickPageNo = function(pageNo) {
|
||||
console.log(pageNo);
|
||||
switch(pageNo) {
|
||||
case "first":
|
||||
@@ -159,5 +157,3 @@
|
||||
console.log(this.activePageNo);
|
||||
this.playerListManager.onClickPageNo(this.activePageNo);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -5,7 +5,7 @@
|
||||
// console.log(onFail);
|
||||
// console.log(isDebugMode);
|
||||
|
||||
let xhr = new XMLHttpRequest(); //new로 생성.
|
||||
var xhr = new XMLHttpRequest(); //new로 생성.
|
||||
xhr.open('POST', url, true);
|
||||
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
|
||||
xhr.send(sendParams);
|
||||
@@ -15,25 +15,25 @@
|
||||
// console.log(xhr.responseText.length);
|
||||
|
||||
if(xhr.responseText.length === 0 || xhr.responseText === null) {
|
||||
let errorMessage = "서버에서 요청을 수행하지 못했습니다.";
|
||||
let errorCode = "no_reply_from_server";
|
||||
var errorMessage = "서버에서 요청을 수행하지 못했습니다.";
|
||||
var errorCode = "no_reply_from_server";
|
||||
printErrorMessage(errorMessage, errorCode, onFail, isDebugMode);
|
||||
return;
|
||||
}
|
||||
|
||||
let jsonReply = JSON.parse(xhr.responseText);
|
||||
var jsonReply = JSON.parse(xhr.responseText);
|
||||
// console.log(jsonReply);
|
||||
|
||||
if(jsonReply === null) {
|
||||
let errorMessage = "서버에서 데이터가 넘어오지 않았습니다.";
|
||||
let errorCode = "no_data_from_server";
|
||||
var errorMessage = "서버에서 데이터가 넘어오지 않았습니다.";
|
||||
var errorCode = "no_data_from_server";
|
||||
printErrorMessage(errorMessage, errorCode, onFail, isDebugMode);
|
||||
return;
|
||||
}
|
||||
|
||||
if(!isSuccess(jsonReply)) {
|
||||
let errorMessage = getErrorMessage(jsonReply);
|
||||
let errorCode = jsonReply["error_code"];
|
||||
var errorMessage = getErrorMessage(jsonReply);
|
||||
var errorCode = jsonReply["error_code"];
|
||||
printErrorMessage(errorMessage, errorCode, onFail, isDebugMode);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user