diff --git a/src/game/lib/button/fullscreen_button.js b/src/game/lib/button/fullscreen_button.js index 0b6a65b..1882fc1 100644 --- a/src/game/lib/button/fullscreen_button.js +++ b/src/game/lib/button/fullscreen_button.js @@ -29,13 +29,13 @@ class FullscreenButton extends RoundRectButton { super( setting, RoundRectButton.NONE_ICON, RoundRectButton.NONE_BUTTON_TEXT, - () => { + (function() { if(game.scale.isFullScreen) { game.scale.stopFullScreen(); } else { game.scale.startFullScreen(); } - } + }) ); let icon_fullscreen = game.add.sprite(0, 0, 'icon_fullscreen'); diff --git a/src/game/lib/heart_gauge.js b/src/game/lib/heart_gauge.js index 0a8b560..b6571ec 100644 --- a/src/game/lib/heart_gauge.js +++ b/src/game/lib/heart_gauge.js @@ -4,12 +4,13 @@ class HeartGauge { this.heartManager = heartManager; this.hearts = []; + let self = this; this.heartManager.addOnChangeCountListener( - () => { this.onChangeCountListener(); } + function() { self.onChangeCountListener(); } ); this.heartManager.addOnChangeMaxCountListener( - () => { this.onChangeMaxCountListener(); } + function() { self.onChangeMaxCountListener(); } ); let startPosX = GAME_SCREEN_SIZE.x - HeartGauge.GAP * 4; diff --git a/src/game/loading/loading.js b/src/game/loading/loading.js index 46d9cdf..dcb8300 100644 --- a/src/game/loading/loading.js +++ b/src/game/loading/loading.js @@ -15,7 +15,7 @@ var Loading = { let userID = sessionStorage.getItem("UserID"); console.log("userID : " + userID); - + this.game.stage.backgroundColor = '#4d4d4d'; // Progress report diff --git a/src/game/login/login.js b/src/game/login/login.js index 4bacc74..3da2228 100644 --- a/src/game/login/login.js +++ b/src/game/login/login.js @@ -17,7 +17,7 @@ class Login { // top ui let screenTopUI = new ScreenTopUI(); - screenTopUI.makeBackButton( () => { + screenTopUI.makeBackButton( function() { sessionStorageManager.clear(); location.href = '../../web/main/index.html'; }); diff --git a/src/game/menu/menu_app.js b/src/game/menu/menu_app.js index 87de43d..d333d71 100644 --- a/src/game/menu/menu_app.js +++ b/src/game/menu/menu_app.js @@ -36,7 +36,7 @@ class MenuApp { // top ui let screenTopUI = new ScreenTopUI(); - screenTopUI.makeBackButton( () => { + screenTopUI.makeBackButton( function() { sessionStorageManager.clear(); location.href = '../../web/client/login.html'; }); @@ -105,12 +105,12 @@ class MenuApp { posX, posY, GameAppButton.TYPE_MOUSE_APP, RoundRectButton.NONE_ICON, // "icon_fullscreen", app.KoreanName, - () => { + (function() { sessionStorageManager.playingAppID = app.AppID; sessionStorageManager.playingAppName = app.AppName; sessionStorageManager.playingAppKoreanName = app.KoreanName; location.href = '../../web/client/start.html'; - } + }) ); if(!self.hasApp(app.AppID, activeAppList)) @@ -134,9 +134,9 @@ class MenuApp { let typingPracticeTabButton = new TypingTabButton( TypingTabButton.PRACTICE_BUTTON_POS_X, TypingTabButton.BUTTON_POS_Y, "", "타자 연습", - () => { + (function() { location.href = '../../web/client/menu_typing_practice.html'; - } + }) ); if(typingPracticeAppCount === 0) typingPracticeTabButton.inputEnabled = false; @@ -144,9 +144,9 @@ class MenuApp { let typingTestTabButton = new TypingTabButton( TypingTabButton.TEST_BUTTON_POS_X, TypingTabButton.BUTTON_POS_Y, "", "타자 시험", - () => { + (function() { location.href = '../../web/client/menu_typing_test.html'; - } + }) ); if(typingTestAppCount === 0) typingTestTabButton.inputEnabled = false; @@ -170,12 +170,12 @@ class MenuApp { RoundRectButton.NONE_ICON, // "icon_fullscreen", // (isKoreanTypingApp ? "(한글)" : "(영문)") + "\n" + app.KoreanName, app.KoreanName, - () => { + (function() { sessionStorageManager.playingAppID = app.AppID; sessionStorageManager.playingAppName = app.AppName; sessionStorageManager.playingAppKoreanName = app.KoreanName; location.href = '../../web/client/start.html'; - } + }) ); if(!self.hasApp(app.AppID, activeAppList)) diff --git a/src/game/menu/menu_typing_practice.js b/src/game/menu/menu_typing_practice.js index 46dd540..c641a66 100644 --- a/src/game/menu/menu_typing_practice.js +++ b/src/game/menu/menu_typing_practice.js @@ -45,7 +45,7 @@ class MenuTypingPractice { // top ui let screenTopUI = new ScreenTopUI(); - screenTopUI.makeBackButton( () => { + screenTopUI.makeBackButton( function() { location.href = '../../web/client/menu_app.html'; }); screenTopUI.makeFullScreenButton(); @@ -55,18 +55,18 @@ class MenuTypingPractice { let typingPracticeTabButton = new TypingTabButton( TypingTabButton.PRACTICE_BUTTON_POS_X, TypingTabButton.BUTTON_POS_Y, "", "타자 연습", - () => { + (function() { location.href = '../../web/client/menu_typing_practice.html'; - } + }) ); typingPracticeTabButton.inputEnabled = false; let typingTestTabButton = new TypingTabButton( TypingTabButton.TEST_BUTTON_POS_X, TypingTabButton.BUTTON_POS_Y, "", "타자 시험", - () => { + (function() { location.href = '../../web/client/menu_typing_test.html'; - } + }) ); // typingTestTabButton.inputEnabled = false; @@ -143,12 +143,12 @@ class MenuTypingPractice { posX, posY, self.getIconImage(replyJSON.KoreanHighScoreList, activeApp.AppID), activeApp.KoreanName, - () => { + (function() { sessionStorageManager.playingAppID = activeApp.AppID; sessionStorageManager.playingAppName = activeApp.AppName; sessionStorageManager.playingAppKoreanName = activeApp.KoreanName; location.href = '../../web/client/start.html'; - } + }) ); if(!self.hasApp(activeApp.AppID, replyJSON.KoreanActiveAppList)) @@ -168,12 +168,12 @@ class MenuTypingPractice { posX, posY, self.getIconImage(activeApp.AppID), activeApp.KoreanName, - () => { + (function() { sessionStorageManager.playingAppID = activeApp.AppID; sessionStorageManager.playingAppName = activeApp.AppName; sessionStorageManager.playingAppKoreanName = activeApp.KoreanName; location.href = '../../web/client/start.html'; - } + }) ); if(!self.hasApp(activeApp.AppID, replyJSON.EnglishActiveAppList)) diff --git a/src/game/menu/menu_typing_test.js b/src/game/menu/menu_typing_test.js index 7094320..5248dc4 100644 --- a/src/game/menu/menu_typing_test.js +++ b/src/game/menu/menu_typing_test.js @@ -45,7 +45,7 @@ class MenuTypingTest { // top ui let screenTopUI = new ScreenTopUI(); - screenTopUI.makeBackButton( () => { + screenTopUI.makeBackButton( function() { location.href = '../../web/client/menu_app.html'; }); screenTopUI.makeFullScreenButton(); @@ -55,18 +55,18 @@ class MenuTypingTest { let typingPracticeTabButton = new TypingTabButton( TypingTabButton.PRACTICE_BUTTON_POS_X, TypingTabButton.BUTTON_POS_Y, "", "타자 연습", - () => { + (function() { location.href = '../../web/client/menu_typing_practice.html'; - } + }) ); // typingPracticeTabButton.inputEnabled = false; let typingTestTabButton = new TypingTabButton( TypingTabButton.TEST_BUTTON_POS_X, TypingTabButton.BUTTON_POS_Y, "", "타자 시험", - () => { + (function() { location.href = '../../web/client/menu_typing_test.html'; - } + }) ); typingTestTabButton.inputEnabled = false; @@ -143,12 +143,12 @@ class MenuTypingTest { posX, posY, self.getIconImage(replyJSON.KoreanHighScoreList, activeApp.AppID), activeApp.KoreanName, - () => { + (function() { sessionStorageManager.playingAppID = activeApp.AppID; sessionStorageManager.playingAppName = activeApp.AppName; sessionStorageManager.playingAppKoreanName = activeApp.KoreanName; location.href = '../../web/client/start.html'; - } + }) ); if(!self.hasApp(activeApp.AppID, replyJSON.KoreanActiveAppList)) @@ -168,12 +168,12 @@ class MenuTypingTest { posX, posY, self.getIconImage(replyJSON.KoreanHighScoreList, activeApp.AppID), activeApp.KoreanName, - () => { + (function() { sessionStorageManager.playingAppID = activeApp.AppID; sessionStorageManager.playingAppName = activeApp.AppName; sessionStorageManager.playingAppKoreanName = activeApp.KoreanName; location.href = '../../web/client/start.html'; - } + }) ); if(!self.hasApp(activeApp.AppID, replyJSON.EnglishActiveAppList)) diff --git a/src/game/mouse/space_invaders/game.js b/src/game/mouse/space_invaders/game.js index 65ed36c..93d5470 100644 --- a/src/game/mouse/space_invaders/game.js +++ b/src/game/mouse/space_invaders/game.js @@ -4,24 +4,26 @@ class Game { create() { + let self = this; + this.game.stage.backgroundColor = "#000000"; // '#4d4d4d'; sessionStorageManager.isNewBestRecrd = false; // top ui let screenTopUI = new ScreenTopUI(); - screenTopUI.makeBackButton( () => { + screenTopUI.makeBackButton( function() { sessionStorageManager.resetPlayingAppData(); location.href = '../../web/client/menu_app.html'; }); screenTopUI.makeFullScreenButton(); let scoreBoard = new ScoreBoard(); - scoreManager.addOnChangeScoreListener( score => { + scoreManager.addOnChangeScoreListener( function(score) { sessionStorageManager.record = score; scoreBoard.printScore(NumberUtil.numberWithCommas(score)); }); - scoreManager.addOnChangeHighScoreListener( highScore => { + scoreManager.addOnChangeHighScoreListener( function(highScore) { console.log(highScore); sessionStorageManager.bestRecord = highScore; sessionStorageManager.isNewBestRecrd = true; @@ -30,7 +32,7 @@ class Game { let heartGauge = new HeartGauge(heartManager); heartManager.addOnChangeGameOverListener( - () => { this.gameOver(); } + function() { self.gameOver(); } ); heartGauge.start(); @@ -55,11 +57,11 @@ class Game { this.aliens = []; for(let i = 0; i < 10; i++) { let alien = new Alien(150 + 80 * i, 150, - () => { this.activateNextAlien(); }, // onGoOnstage - (sprite) => { - scoreManager.plusScore(this.getScore()); - let scoreText = new ScoreText(sprite.x, sprite.y, this.getScore()); - }, // this.onAlienFired, + (function() { self.activateNextAlien(); }), // onGoOnstage + (function(sprite) { + scoreManager.plusScore(self.getScore()); + let scoreText = new ScoreText(sprite.x, sprite.y, self.getScore()); + }), // this.onAlienFired, this.onAlienEscaped ); alien.goWaitingRoom(); diff --git a/src/game/ranking/ranking.js b/src/game/ranking/ranking.js index 5d2177f..68d2756 100644 --- a/src/game/ranking/ranking.js +++ b/src/game/ranking/ranking.js @@ -24,7 +24,7 @@ class Ranking { // top ui let screenTopUI = new ScreenTopUI(); - screenTopUI.makeBackButton( () => { + screenTopUI.makeBackButton( function() { location.href = '../../web/client/start.html'; }); screenTopUI.makeFullScreenButton(); @@ -151,12 +151,12 @@ class Ranking { this.dbConnectManager.requestAppRanking( sessionStorageManager.maestroID, sessionStorageManager.playingAppID, - (jsonData) => { + (function(jsonData) { self.showRanking(jsonData); - }, - (jsonData) => { + }), + (function(jsonData) { self.showRanking(null); - } + }) ); } diff --git a/src/game/result/history_board.js b/src/game/result/history_board.js index 6762abe..05d1cb0 100644 --- a/src/game/result/history_board.js +++ b/src/game/result/history_board.js @@ -25,7 +25,7 @@ class HistoryBoard { this.dbConnectManager.requestPlayerHistory( sessionStorageManager.maestroID, date, - historyRecordManager => { + (function(historyRecordManager) { if(historyRecordManager.count == 0) { console.log("history board - no data"); return; @@ -38,7 +38,7 @@ class HistoryBoard { if(date == data.date) this.todayBestRecord = data.bestRecord; } - } + }) ); } diff --git a/src/game/result/result.js b/src/game/result/result.js index 896401c..7f272e6 100644 --- a/src/game/result/result.js +++ b/src/game/result/result.js @@ -20,7 +20,7 @@ class Result { // top ui let screenTopUI = new ScreenTopUI(); - screenTopUI.makeBackButton( () => { + screenTopUI.makeBackButton( function() { if(isTypingPracticeStage()) location.href = '../../web/client/menu_typing_practice.html'; else if(isTypingTestStage()) diff --git a/src/game/start/start.js b/src/game/start/start.js index aa7d407..4e78cb8 100644 --- a/src/game/start/start.js +++ b/src/game/start/start.js @@ -17,7 +17,7 @@ class Start { // top ui let screenTopUI = new ScreenTopUI(); - screenTopUI.makeBackButton( () => { + screenTopUI.makeBackButton( function() { if(isTypingPracticeStage()) location.href = '../../web/client/menu_typing_practice.html'; else if(isTypingTestStage()) @@ -54,11 +54,11 @@ class Start { sessionStorageManager.maestroID, sessionStorageManager.playerID, sessionStorageManager.playingAppID, - replyJSON => { + function(replyJSON) { sessionStorageManager.bestRecord = Number(replyJSON["BestRecord"]); screenBottomUI.printLeftTextWithBestRecord(sessionStorageManager.bestRecord); }, - replyJSON => { // no data + function(replyJSON) { // no data sessionStorageManager.bestRecord = 0; screenBottomUI.printLeftTextWithBestRecord(sessionStorageManager.bestRecord); } @@ -66,26 +66,30 @@ class Start { } loadHowToPlay(appID) { + let self = this; + this.dbConnectManager.requestHowToPlay( sessionStorageManager.playingAppID, // space_invaders app ID - (jsonData) => { + function(jsonData) { let howToPlayText = jsonData["HowToPlay"].replace(/\\n/g, "\n"); - this.howToPlay.printHowToPlay(howToPlayText); + self.howToPlay.printHowToPlay(howToPlayText); }, - (jsonData) => { - this.howToPlay.printHowToPlay("No data"); + function(jsonData) { + self.howToPlay.printHowToPlay("No data"); } ); } loadChart() { + let self = this; + let today = new Date(); let date = DateUtil.getYYYYMMDD(today); this.dbConnectManager.requestPlayerHistory( sessionStorageManager.maestroID, date, - historyRecordManager => { + (function(historyRecordManager) { if(historyRecordManager.count == 0) { console.log("start - history record : no data"); return; @@ -103,7 +107,7 @@ class Start { // break; let historyRecord = historyRecordManager.getAt(i); - this.chart.drawRecordGraph( + self.chart.drawRecordGraph( i, historyRecord === undefined ? "-" : historyRecord.date, historyRecord === undefined ? "" : historyRecord.bestRecord, @@ -111,8 +115,8 @@ class Start { ); } - this.chart.printChartBaseLine(); - } + self.chart.printChartBaseLine(); + }) ); } @@ -154,9 +158,9 @@ class Start { let rankingButton = new RoundRectButton( setting, RoundRectButton.NONE_ICON, "순위\n보기", - () => { + (function() { location.href = '../../web/client/ranking.html'; - } + }) ); if(sessionStorageManager.maestroAccountType == 100) rankingButton.inputEnabled = false; diff --git a/src/game/typing/practice/game.js b/src/game/typing/practice/game.js index a04f3eb..f7fa394 100644 --- a/src/game/typing/practice/game.js +++ b/src/game/typing/practice/game.js @@ -15,7 +15,7 @@ class TypingPractice { // top ui let screenTopUI = new ScreenTopUI(); - screenTopUI.makeBackButton( () => { + screenTopUI.makeBackButton( function() { sessionStorageManager.resetPlayingAppData(); location.href = '../../web/client/menu_typing_practice.html'; }); @@ -29,12 +29,12 @@ class TypingPractice { this.typingScore = new TypingScore(); - this.stageTimer = new StageTimer( TypingPractice.STAGE_TIMER_SEC, () => { + this.stageTimer = new StageTimer( TypingPractice.STAGE_TIMER_SEC, (function() { self.isOnStage = false; // self.goResult(); self.gameOver(); - }); + })); // typing content @@ -88,12 +88,12 @@ class TypingPractice { else this.keyboard = new Keyboard(this.keyMapper, Keyboard.ENGLISH); - game.input.keyboard.processKeyPress = () => { + game.input.keyboard.processKeyPress = (function() { if(self.isOnStage === false) return; self.checkTypingContents(event); - } + }); this.shiftKey = game.input.keyboard.addKey(Phaser.Keyboard.SHIFT); // hands diff --git a/src/game/typing/test/game.js b/src/game/typing/test/game.js index 366b0ec..da4a5b0 100644 --- a/src/game/typing/test/game.js +++ b/src/game/typing/test/game.js @@ -13,7 +13,7 @@ class TypingTest { // top ui let screenTopUI = new ScreenTopUI(); - screenTopUI.makeBackButton( () => { + screenTopUI.makeBackButton( function() { sessionStorageManager.resetPlayingAppData(); location.href = '../../web/client/menu_typing_test.html'; }); diff --git a/src/web/admin/admin_register_list.html b/src/web/admin/admin_register_list.html index a695b94..58cc19f 100644 --- a/src/web/admin/admin_register_list.html +++ b/src/web/admin/admin_register_list.html @@ -35,11 +35,11 @@ "./../server/admin/maestro_registered_list.php", "maestro_name=" + maestroName, - (jsonData) => { + function(jsonData) { updateMaestroList(jsonData["maestroList"]); }, - (errorMessage, errorCode) => { + function(errorMessage, errorCode) { if($("#error_message").length) { $("#error_message").text(errorMessage); } @@ -94,12 +94,12 @@ "./../server/admin/register_maestro.php", "maestro_id=" + maestroID, - (jsonData) => { + function(jsonData) { loadMaestroList(""); $("#error_message").text("마에스트로 계정이 정상적으로 등록되었습니다."); }, - (errorMessage, errorCode) => { + function(errorMessage, errorCode) { if($("#error_message").length) { $("#error_message").text(errorMessage); } diff --git a/src/web/admin/admin_upgrade_list.html b/src/web/admin/admin_upgrade_list.html index 913fe6f..4c96e12 100644 --- a/src/web/admin/admin_upgrade_list.html +++ b/src/web/admin/admin_upgrade_list.html @@ -26,11 +26,11 @@ "./../server/admin/maestro_upgrade_list.php", "maestro_name=" + maestroName, - (jsonData) => { + function(jsonData) { updateMaestroUpgradeList(jsonData["maestroUpgradeList"]); }, - (errorMessage, errorCode) => { + function(errorMessage, errorCode) { console.log(errorMessage); if($("#error_message").length) { $("#error_message").text(errorMessage); @@ -177,12 +177,12 @@ "./../server/admin/upgrade_maestro.php", "maestro_upgrade_id=" + maestroUpgradeID + "&maestro_id=" + id + "&new_account_type=" + newAccountType, - (jsonData) => { + function(jsonData) { loadMaestroUpgradeList(""); $("#error_message").text("마에스트로 계정이 정상적으로 등록되었습니다."); }, - (errorMessage, errorCode) => { + function(errorMessage, errorCode) { if($("#error_message").length) { $("#error_message").text(errorMessage); } diff --git a/src/web/admin/login.html b/src/web/admin/login.html index 01c343a..ab09159 100644 --- a/src/web/admin/login.html +++ b/src/web/admin/login.html @@ -24,11 +24,11 @@ "./../server/admin/login.php", "admin_name=" + name + "&password=" + password, - (jsonData) => { + function(jsonData) { location.href = 'admin_register_list.html'; }, - (errorMessage, errorCode) => { + function(errorMessage, errorCode) { if($("#error_message").length) { $("#error_message").text(errorMessage); } diff --git a/src/web/client/menu_app_test_player.html b/src/web/client/menu_app_test_player.html index 5e5cfdd..72d11ee 100644 --- a/src/web/client/menu_app_test_player.html +++ b/src/web/client/menu_app_test_player.html @@ -17,7 +17,7 @@ "./../server/maestro/maestro_test_player.php", "maestro_id=" + maestroID, - (jsonData) => { + function(jsonData) { console.log("maestroAccountType : " + jsonData["maestroAccountType"]); console.log("playerName : " + jsonData["playerName"]); console.log("playerID : " + jsonData["playerID"]); @@ -31,7 +31,7 @@ location.href='./../client/menu_app.html'; }, - (errorMessage, errorCode) => { + function(errorMessage, errorCode) { if($("#error_message").length) { $("#error_message").text(errorMessage); } diff --git a/src/web/js/lib/maestro_info.js b/src/web/js/lib/maestro_info.js index 1c854aa..8c5c39e 100644 --- a/src/web/js/lib/maestro_info.js +++ b/src/web/js/lib/maestro_info.js @@ -14,7 +14,7 @@ class MaestroInfo { "./../server/maestro/maestro_info.php", "maestro_id=" + this.maestroID, - (jsonData) => { + function(jsonData) { self.maestroName = jsonData["name"]; self.accountType = jsonData["accountType"]; self.playerCount = jsonData["playerCount"]; @@ -22,7 +22,7 @@ class MaestroInfo { onSuccess(); }, - (errorMessage, errorCode) => { + function(errorMessage, errorCode) { onFail(errorMessage, errorCode); } diff --git a/src/web/js/player_list_manager.js b/src/web/js/player_list_manager.js index 1eb3d14..1651a04 100644 --- a/src/web/js/player_list_manager.js +++ b/src/web/js/player_list_manager.js @@ -25,7 +25,7 @@ "./../server/player/registered_player_count.php", "maestro_id=" + maestroID, - (jsonData) => { + function(jsonData) { self.playerCount = jsonData["playerCount"]; self.lastPageNo = Math.ceil( (self.playerCount + 1) / 10 ); self.activePageNo = 1; @@ -34,7 +34,7 @@ self.listNavigator.updateNavigator(self.activePageNo, self.lastPageNo); }, - (errorMessage, errorCode) => { + function(errorMessage, errorCode) { showErrorMessage(errorMessage, "error"); } @@ -53,12 +53,12 @@ "./../server/player/registered_player_list.php", "maestro_id=" + maestroID + "&start_no=" + startNo + "&end_no=" + endNo, - (jsonData) => { + function(jsonData) { self.playerCount = jsonData["playerList"].length; self.list.updatePlayerList(jsonData["playerList"]); }, - (errorMessage, errorCode) => { + function(errorMessage, errorCode) { showErrorMessage(errorMessage, "error"); } @@ -78,13 +78,13 @@ "./../server/player/registered_player_list.php", "maestro_id=" + maestroID + "&start_no=" + startNo + "&end_no=" + endNo, - (jsonData) => { + function(jsonData) { self.playerCount = jsonData["playerList"].length; self.list.updatePlayerList(jsonData["playerList"]); self.listNavigator.updateNavigator(self.activePageNo, self.lastPageNo); }, - (errorMessage, errorCode) => { + function(errorMessage, errorCode) { showErrorMessage(errorMessage, "error"); } @@ -101,7 +101,7 @@ "./../server/player/search_player_count.php", "maestro_id=" + maestroID + "&player_name=" + this.searchPlayerName, - (jsonData) => { + function(jsonData) { self.playerCount = jsonData["playerCount"]; self.lastPageNo = Math.ceil( (self.playerCount + 1) / 10 ); self.activePageNo = 1; @@ -112,7 +112,7 @@ showErrorMessage(this.searchPlayerName + " : 검색 결과가 없습니다.", "info"); }, - (errorMessage, errorCode) => { + function(errorMessage, errorCode) { showErrorMessage(errorMessage, "error"); } @@ -131,13 +131,13 @@ "./../server/player/search_player_list.php", "maestro_id=" + maestroID + "&player_name=" + playerName + "&start_no=" + startNo + "&end_no=" + endNo, - (jsonData) => { + function(jsonData) { self.playerCount = jsonData["playerList"].length; self.list.updatePlayerList(jsonData["playerList"]); self.listNavigator.updateNavigator(self.activePageNo, self.lastPageNo); }, - (errorMessage, errorCode) => { + function(errorMessage, errorCode) { showErrorMessage(errorMessage, "error"); } @@ -169,7 +169,7 @@ "./../server/player/edit_player.php", "maestro_id=" + maestroID + "&player_id=" + playerID + "&player_name=" + playerName + "&enter_code=" + playerEnterCode, - (jsonData) => { + function(jsonData) { // console.log(jsonData); if(this.playerListID === "add_player_list") { self.setupAddPlayerList(); @@ -179,7 +179,7 @@ showErrorMessage("학생 데이터가 [ " + playerName + " / " + playerEnterCode + " ] 으로 변경되었습니다.", "success"); }, - (errorMessage, errorCode) => { + function(errorMessage, errorCode) { showErrorMessage(errorMessage, "error"); } @@ -205,7 +205,7 @@ "./../server/player/delete_player.php", "maestro_id=" + maestroID + "&player_id=" + playerID, - (jsonData) => { + function(jsonData) { if(this.playerListID === "add_player_list") { self.setupAddPlayerList(); } else if(this.playerListID === "search_player_list") { @@ -216,7 +216,7 @@ onChangePlayerCount(); }, - (errorMessage, errorCode) => { + function(errorMessage, errorCode) { showErrorMessage(errorMessage, "error"); } diff --git a/src/web/maestro/maestro_test_account_app_menu.html b/src/web/maestro/maestro_test_account_app_menu.html index d5e2491..339deb3 100644 --- a/src/web/maestro/maestro_test_account_app_menu.html +++ b/src/web/maestro/maestro_test_account_app_menu.html @@ -22,7 +22,7 @@ "./../server/maestro/maestro_test_account.php", "", - (jsonData) => { + function(jsonData) { let maestroID = jsonData["maestroID"]; let playerID = jsonData["playerID"]; let playerName = jsonData["playerName"]; @@ -37,7 +37,7 @@ location.href = "./../client/menu_app.html"; }, - (errorMessage, errorCode) => { + function(errorMessage, errorCode) { if($("#error_message").length) { $("#error_message").text(errorMessage); } diff --git a/src/web/main/free_player_app_menu.html b/src/web/main/free_player_app_menu.html index 9f03b15..063b567 100644 --- a/src/web/main/free_player_app_menu.html +++ b/src/web/main/free_player_app_menu.html @@ -22,7 +22,7 @@ "./../server/player/player_experience_account.php", "", - (jsonData) => { + function(jsonData) { let maestroID = jsonData["maestroID"]; let maestroAccountType = jsonData["maestroAccountType"]; let playerID = jsonData["playerID"]; @@ -44,7 +44,7 @@ location.href = "./../client/menu_app.html"; }, - (errorMessage, errorCode) => { + function(errorMessage, errorCode) { if($("#error_message").length) { $("#error_message").text(errorMessage); }