Fix: () => { } -> function() { }

This commit is contained in:
2018-09-13 15:13:14 +09:00
parent dad83205cd
commit e8c7304dba
22 changed files with 108 additions and 101 deletions
+2 -2
View File
@@ -29,13 +29,13 @@ class FullscreenButton extends RoundRectButton {
super( super(
setting, setting,
RoundRectButton.NONE_ICON, RoundRectButton.NONE_BUTTON_TEXT, RoundRectButton.NONE_ICON, RoundRectButton.NONE_BUTTON_TEXT,
() => { (function() {
if(game.scale.isFullScreen) { if(game.scale.isFullScreen) {
game.scale.stopFullScreen(); game.scale.stopFullScreen();
} else { } else {
game.scale.startFullScreen(); game.scale.startFullScreen();
} }
} })
); );
let icon_fullscreen = game.add.sprite(0, 0, 'icon_fullscreen'); let icon_fullscreen = game.add.sprite(0, 0, 'icon_fullscreen');
+3 -2
View File
@@ -4,12 +4,13 @@ class HeartGauge {
this.heartManager = heartManager; this.heartManager = heartManager;
this.hearts = []; this.hearts = [];
let self = this;
this.heartManager.addOnChangeCountListener( this.heartManager.addOnChangeCountListener(
() => { this.onChangeCountListener(); } function() { self.onChangeCountListener(); }
); );
this.heartManager.addOnChangeMaxCountListener( this.heartManager.addOnChangeMaxCountListener(
() => { this.onChangeMaxCountListener(); } function() { self.onChangeMaxCountListener(); }
); );
let startPosX = GAME_SCREEN_SIZE.x - HeartGauge.GAP * 4; let startPosX = GAME_SCREEN_SIZE.x - HeartGauge.GAP * 4;
+1 -1
View File
@@ -15,7 +15,7 @@ var Loading = {
let userID = sessionStorage.getItem("UserID"); let userID = sessionStorage.getItem("UserID");
console.log("userID : " + userID); console.log("userID : " + userID);
this.game.stage.backgroundColor = '#4d4d4d'; this.game.stage.backgroundColor = '#4d4d4d';
// Progress report // Progress report
+1 -1
View File
@@ -17,7 +17,7 @@ class Login {
// top ui // top ui
let screenTopUI = new ScreenTopUI(); let screenTopUI = new ScreenTopUI();
screenTopUI.makeBackButton( () => { screenTopUI.makeBackButton( function() {
sessionStorageManager.clear(); sessionStorageManager.clear();
location.href = '../../web/main/index.html'; location.href = '../../web/main/index.html';
}); });
+9 -9
View File
@@ -36,7 +36,7 @@ class MenuApp {
// top ui // top ui
let screenTopUI = new ScreenTopUI(); let screenTopUI = new ScreenTopUI();
screenTopUI.makeBackButton( () => { screenTopUI.makeBackButton( function() {
sessionStorageManager.clear(); sessionStorageManager.clear();
location.href = '../../web/client/login.html'; location.href = '../../web/client/login.html';
}); });
@@ -105,12 +105,12 @@ class MenuApp {
posX, posY, GameAppButton.TYPE_MOUSE_APP, posX, posY, GameAppButton.TYPE_MOUSE_APP,
RoundRectButton.NONE_ICON, // "icon_fullscreen", RoundRectButton.NONE_ICON, // "icon_fullscreen",
app.KoreanName, app.KoreanName,
() => { (function() {
sessionStorageManager.playingAppID = app.AppID; sessionStorageManager.playingAppID = app.AppID;
sessionStorageManager.playingAppName = app.AppName; sessionStorageManager.playingAppName = app.AppName;
sessionStorageManager.playingAppKoreanName = app.KoreanName; sessionStorageManager.playingAppKoreanName = app.KoreanName;
location.href = '../../web/client/start.html'; location.href = '../../web/client/start.html';
} })
); );
if(!self.hasApp(app.AppID, activeAppList)) if(!self.hasApp(app.AppID, activeAppList))
@@ -134,9 +134,9 @@ class MenuApp {
let typingPracticeTabButton = new TypingTabButton( let typingPracticeTabButton = new TypingTabButton(
TypingTabButton.PRACTICE_BUTTON_POS_X, TypingTabButton.BUTTON_POS_Y, TypingTabButton.PRACTICE_BUTTON_POS_X, TypingTabButton.BUTTON_POS_Y,
"", "타자 연습", "", "타자 연습",
() => { (function() {
location.href = '../../web/client/menu_typing_practice.html'; location.href = '../../web/client/menu_typing_practice.html';
} })
); );
if(typingPracticeAppCount === 0) if(typingPracticeAppCount === 0)
typingPracticeTabButton.inputEnabled = false; typingPracticeTabButton.inputEnabled = false;
@@ -144,9 +144,9 @@ class MenuApp {
let typingTestTabButton = new TypingTabButton( let typingTestTabButton = new TypingTabButton(
TypingTabButton.TEST_BUTTON_POS_X, TypingTabButton.BUTTON_POS_Y, TypingTabButton.TEST_BUTTON_POS_X, TypingTabButton.BUTTON_POS_Y,
"", "타자 시험", "", "타자 시험",
() => { (function() {
location.href = '../../web/client/menu_typing_test.html'; location.href = '../../web/client/menu_typing_test.html';
} })
); );
if(typingTestAppCount === 0) if(typingTestAppCount === 0)
typingTestTabButton.inputEnabled = false; typingTestTabButton.inputEnabled = false;
@@ -170,12 +170,12 @@ class MenuApp {
RoundRectButton.NONE_ICON, // "icon_fullscreen", RoundRectButton.NONE_ICON, // "icon_fullscreen",
// (isKoreanTypingApp ? "(한글)" : "(영문)") + "\n" + app.KoreanName, // (isKoreanTypingApp ? "(한글)" : "(영문)") + "\n" + app.KoreanName,
app.KoreanName, app.KoreanName,
() => { (function() {
sessionStorageManager.playingAppID = app.AppID; sessionStorageManager.playingAppID = app.AppID;
sessionStorageManager.playingAppName = app.AppName; sessionStorageManager.playingAppName = app.AppName;
sessionStorageManager.playingAppKoreanName = app.KoreanName; sessionStorageManager.playingAppKoreanName = app.KoreanName;
location.href = '../../web/client/start.html'; location.href = '../../web/client/start.html';
} })
); );
if(!self.hasApp(app.AppID, activeAppList)) if(!self.hasApp(app.AppID, activeAppList))
+9 -9
View File
@@ -45,7 +45,7 @@ class MenuTypingPractice {
// top ui // top ui
let screenTopUI = new ScreenTopUI(); let screenTopUI = new ScreenTopUI();
screenTopUI.makeBackButton( () => { screenTopUI.makeBackButton( function() {
location.href = '../../web/client/menu_app.html'; location.href = '../../web/client/menu_app.html';
}); });
screenTopUI.makeFullScreenButton(); screenTopUI.makeFullScreenButton();
@@ -55,18 +55,18 @@ class MenuTypingPractice {
let typingPracticeTabButton = new TypingTabButton( let typingPracticeTabButton = new TypingTabButton(
TypingTabButton.PRACTICE_BUTTON_POS_X, TypingTabButton.BUTTON_POS_Y, TypingTabButton.PRACTICE_BUTTON_POS_X, TypingTabButton.BUTTON_POS_Y,
"", "타자 연습", "", "타자 연습",
() => { (function() {
location.href = '../../web/client/menu_typing_practice.html'; location.href = '../../web/client/menu_typing_practice.html';
} })
); );
typingPracticeTabButton.inputEnabled = false; typingPracticeTabButton.inputEnabled = false;
let typingTestTabButton = new TypingTabButton( let typingTestTabButton = new TypingTabButton(
TypingTabButton.TEST_BUTTON_POS_X, TypingTabButton.BUTTON_POS_Y, TypingTabButton.TEST_BUTTON_POS_X, TypingTabButton.BUTTON_POS_Y,
"", "타자 시험", "", "타자 시험",
() => { (function() {
location.href = '../../web/client/menu_typing_test.html'; location.href = '../../web/client/menu_typing_test.html';
} })
); );
// typingTestTabButton.inputEnabled = false; // typingTestTabButton.inputEnabled = false;
@@ -143,12 +143,12 @@ class MenuTypingPractice {
posX, posY, posX, posY,
self.getIconImage(replyJSON.KoreanHighScoreList, activeApp.AppID), self.getIconImage(replyJSON.KoreanHighScoreList, activeApp.AppID),
activeApp.KoreanName, activeApp.KoreanName,
() => { (function() {
sessionStorageManager.playingAppID = activeApp.AppID; sessionStorageManager.playingAppID = activeApp.AppID;
sessionStorageManager.playingAppName = activeApp.AppName; sessionStorageManager.playingAppName = activeApp.AppName;
sessionStorageManager.playingAppKoreanName = activeApp.KoreanName; sessionStorageManager.playingAppKoreanName = activeApp.KoreanName;
location.href = '../../web/client/start.html'; location.href = '../../web/client/start.html';
} })
); );
if(!self.hasApp(activeApp.AppID, replyJSON.KoreanActiveAppList)) if(!self.hasApp(activeApp.AppID, replyJSON.KoreanActiveAppList))
@@ -168,12 +168,12 @@ class MenuTypingPractice {
posX, posY, posX, posY,
self.getIconImage(activeApp.AppID), self.getIconImage(activeApp.AppID),
activeApp.KoreanName, activeApp.KoreanName,
() => { (function() {
sessionStorageManager.playingAppID = activeApp.AppID; sessionStorageManager.playingAppID = activeApp.AppID;
sessionStorageManager.playingAppName = activeApp.AppName; sessionStorageManager.playingAppName = activeApp.AppName;
sessionStorageManager.playingAppKoreanName = activeApp.KoreanName; sessionStorageManager.playingAppKoreanName = activeApp.KoreanName;
location.href = '../../web/client/start.html'; location.href = '../../web/client/start.html';
} })
); );
if(!self.hasApp(activeApp.AppID, replyJSON.EnglishActiveAppList)) if(!self.hasApp(activeApp.AppID, replyJSON.EnglishActiveAppList))
+9 -9
View File
@@ -45,7 +45,7 @@ class MenuTypingTest {
// top ui // top ui
let screenTopUI = new ScreenTopUI(); let screenTopUI = new ScreenTopUI();
screenTopUI.makeBackButton( () => { screenTopUI.makeBackButton( function() {
location.href = '../../web/client/menu_app.html'; location.href = '../../web/client/menu_app.html';
}); });
screenTopUI.makeFullScreenButton(); screenTopUI.makeFullScreenButton();
@@ -55,18 +55,18 @@ class MenuTypingTest {
let typingPracticeTabButton = new TypingTabButton( let typingPracticeTabButton = new TypingTabButton(
TypingTabButton.PRACTICE_BUTTON_POS_X, TypingTabButton.BUTTON_POS_Y, TypingTabButton.PRACTICE_BUTTON_POS_X, TypingTabButton.BUTTON_POS_Y,
"", "타자 연습", "", "타자 연습",
() => { (function() {
location.href = '../../web/client/menu_typing_practice.html'; location.href = '../../web/client/menu_typing_practice.html';
} })
); );
// typingPracticeTabButton.inputEnabled = false; // typingPracticeTabButton.inputEnabled = false;
let typingTestTabButton = new TypingTabButton( let typingTestTabButton = new TypingTabButton(
TypingTabButton.TEST_BUTTON_POS_X, TypingTabButton.BUTTON_POS_Y, TypingTabButton.TEST_BUTTON_POS_X, TypingTabButton.BUTTON_POS_Y,
"", "타자 시험", "", "타자 시험",
() => { (function() {
location.href = '../../web/client/menu_typing_test.html'; location.href = '../../web/client/menu_typing_test.html';
} })
); );
typingTestTabButton.inputEnabled = false; typingTestTabButton.inputEnabled = false;
@@ -143,12 +143,12 @@ class MenuTypingTest {
posX, posY, posX, posY,
self.getIconImage(replyJSON.KoreanHighScoreList, activeApp.AppID), self.getIconImage(replyJSON.KoreanHighScoreList, activeApp.AppID),
activeApp.KoreanName, activeApp.KoreanName,
() => { (function() {
sessionStorageManager.playingAppID = activeApp.AppID; sessionStorageManager.playingAppID = activeApp.AppID;
sessionStorageManager.playingAppName = activeApp.AppName; sessionStorageManager.playingAppName = activeApp.AppName;
sessionStorageManager.playingAppKoreanName = activeApp.KoreanName; sessionStorageManager.playingAppKoreanName = activeApp.KoreanName;
location.href = '../../web/client/start.html'; location.href = '../../web/client/start.html';
} })
); );
if(!self.hasApp(activeApp.AppID, replyJSON.KoreanActiveAppList)) if(!self.hasApp(activeApp.AppID, replyJSON.KoreanActiveAppList))
@@ -168,12 +168,12 @@ class MenuTypingTest {
posX, posY, posX, posY,
self.getIconImage(replyJSON.KoreanHighScoreList, activeApp.AppID), self.getIconImage(replyJSON.KoreanHighScoreList, activeApp.AppID),
activeApp.KoreanName, activeApp.KoreanName,
() => { (function() {
sessionStorageManager.playingAppID = activeApp.AppID; sessionStorageManager.playingAppID = activeApp.AppID;
sessionStorageManager.playingAppName = activeApp.AppName; sessionStorageManager.playingAppName = activeApp.AppName;
sessionStorageManager.playingAppKoreanName = activeApp.KoreanName; sessionStorageManager.playingAppKoreanName = activeApp.KoreanName;
location.href = '../../web/client/start.html'; location.href = '../../web/client/start.html';
} })
); );
if(!self.hasApp(activeApp.AppID, replyJSON.EnglishActiveAppList)) if(!self.hasApp(activeApp.AppID, replyJSON.EnglishActiveAppList))
+11 -9
View File
@@ -4,24 +4,26 @@
class Game { class Game {
create() { create() {
let self = this;
this.game.stage.backgroundColor = "#000000"; // '#4d4d4d'; this.game.stage.backgroundColor = "#000000"; // '#4d4d4d';
sessionStorageManager.isNewBestRecrd = false; sessionStorageManager.isNewBestRecrd = false;
// top ui // top ui
let screenTopUI = new ScreenTopUI(); let screenTopUI = new ScreenTopUI();
screenTopUI.makeBackButton( () => { screenTopUI.makeBackButton( function() {
sessionStorageManager.resetPlayingAppData(); sessionStorageManager.resetPlayingAppData();
location.href = '../../web/client/menu_app.html'; location.href = '../../web/client/menu_app.html';
}); });
screenTopUI.makeFullScreenButton(); screenTopUI.makeFullScreenButton();
let scoreBoard = new ScoreBoard(); let scoreBoard = new ScoreBoard();
scoreManager.addOnChangeScoreListener( score => { scoreManager.addOnChangeScoreListener( function(score) {
sessionStorageManager.record = score; sessionStorageManager.record = score;
scoreBoard.printScore(NumberUtil.numberWithCommas(score)); scoreBoard.printScore(NumberUtil.numberWithCommas(score));
}); });
scoreManager.addOnChangeHighScoreListener( highScore => { scoreManager.addOnChangeHighScoreListener( function(highScore) {
console.log(highScore); console.log(highScore);
sessionStorageManager.bestRecord = highScore; sessionStorageManager.bestRecord = highScore;
sessionStorageManager.isNewBestRecrd = true; sessionStorageManager.isNewBestRecrd = true;
@@ -30,7 +32,7 @@ class Game {
let heartGauge = new HeartGauge(heartManager); let heartGauge = new HeartGauge(heartManager);
heartManager.addOnChangeGameOverListener( heartManager.addOnChangeGameOverListener(
() => { this.gameOver(); } function() { self.gameOver(); }
); );
heartGauge.start(); heartGauge.start();
@@ -55,11 +57,11 @@ class Game {
this.aliens = []; this.aliens = [];
for(let i = 0; i < 10; i++) { for(let i = 0; i < 10; i++) {
let alien = new Alien(150 + 80 * i, 150, let alien = new Alien(150 + 80 * i, 150,
() => { this.activateNextAlien(); }, // onGoOnstage (function() { self.activateNextAlien(); }), // onGoOnstage
(sprite) => { (function(sprite) {
scoreManager.plusScore(this.getScore()); scoreManager.plusScore(self.getScore());
let scoreText = new ScoreText(sprite.x, sprite.y, this.getScore()); let scoreText = new ScoreText(sprite.x, sprite.y, self.getScore());
}, // this.onAlienFired, }), // this.onAlienFired,
this.onAlienEscaped this.onAlienEscaped
); );
alien.goWaitingRoom(); alien.goWaitingRoom();
+5 -5
View File
@@ -24,7 +24,7 @@ class Ranking {
// top ui // top ui
let screenTopUI = new ScreenTopUI(); let screenTopUI = new ScreenTopUI();
screenTopUI.makeBackButton( () => { screenTopUI.makeBackButton( function() {
location.href = '../../web/client/start.html'; location.href = '../../web/client/start.html';
}); });
screenTopUI.makeFullScreenButton(); screenTopUI.makeFullScreenButton();
@@ -151,12 +151,12 @@ class Ranking {
this.dbConnectManager.requestAppRanking( this.dbConnectManager.requestAppRanking(
sessionStorageManager.maestroID, sessionStorageManager.maestroID,
sessionStorageManager.playingAppID, sessionStorageManager.playingAppID,
(jsonData) => { (function(jsonData) {
self.showRanking(jsonData); self.showRanking(jsonData);
}, }),
(jsonData) => { (function(jsonData) {
self.showRanking(null); self.showRanking(null);
} })
); );
} }
+2 -2
View File
@@ -25,7 +25,7 @@ class HistoryBoard {
this.dbConnectManager.requestPlayerHistory( this.dbConnectManager.requestPlayerHistory(
sessionStorageManager.maestroID, sessionStorageManager.maestroID,
date, date,
historyRecordManager => { (function(historyRecordManager) {
if(historyRecordManager.count == 0) { if(historyRecordManager.count == 0) {
console.log("history board - no data"); console.log("history board - no data");
return; return;
@@ -38,7 +38,7 @@ class HistoryBoard {
if(date == data.date) if(date == data.date)
this.todayBestRecord = data.bestRecord; this.todayBestRecord = data.bestRecord;
} }
} })
); );
} }
+1 -1
View File
@@ -20,7 +20,7 @@ class Result {
// top ui // top ui
let screenTopUI = new ScreenTopUI(); let screenTopUI = new ScreenTopUI();
screenTopUI.makeBackButton( () => { screenTopUI.makeBackButton( function() {
if(isTypingPracticeStage()) if(isTypingPracticeStage())
location.href = '../../web/client/menu_typing_practice.html'; location.href = '../../web/client/menu_typing_practice.html';
else if(isTypingTestStage()) else if(isTypingTestStage())
+17 -13
View File
@@ -17,7 +17,7 @@ class Start {
// top ui // top ui
let screenTopUI = new ScreenTopUI(); let screenTopUI = new ScreenTopUI();
screenTopUI.makeBackButton( () => { screenTopUI.makeBackButton( function() {
if(isTypingPracticeStage()) if(isTypingPracticeStage())
location.href = '../../web/client/menu_typing_practice.html'; location.href = '../../web/client/menu_typing_practice.html';
else if(isTypingTestStage()) else if(isTypingTestStage())
@@ -54,11 +54,11 @@ class Start {
sessionStorageManager.maestroID, sessionStorageManager.maestroID,
sessionStorageManager.playerID, sessionStorageManager.playerID,
sessionStorageManager.playingAppID, sessionStorageManager.playingAppID,
replyJSON => { function(replyJSON) {
sessionStorageManager.bestRecord = Number(replyJSON["BestRecord"]); sessionStorageManager.bestRecord = Number(replyJSON["BestRecord"]);
screenBottomUI.printLeftTextWithBestRecord(sessionStorageManager.bestRecord); screenBottomUI.printLeftTextWithBestRecord(sessionStorageManager.bestRecord);
}, },
replyJSON => { // no data function(replyJSON) { // no data
sessionStorageManager.bestRecord = 0; sessionStorageManager.bestRecord = 0;
screenBottomUI.printLeftTextWithBestRecord(sessionStorageManager.bestRecord); screenBottomUI.printLeftTextWithBestRecord(sessionStorageManager.bestRecord);
} }
@@ -66,26 +66,30 @@ class Start {
} }
loadHowToPlay(appID) { loadHowToPlay(appID) {
let self = this;
this.dbConnectManager.requestHowToPlay( this.dbConnectManager.requestHowToPlay(
sessionStorageManager.playingAppID, // space_invaders app ID sessionStorageManager.playingAppID, // space_invaders app ID
(jsonData) => { function(jsonData) {
let howToPlayText = jsonData["HowToPlay"].replace(/\\n/g, "\n"); let howToPlayText = jsonData["HowToPlay"].replace(/\\n/g, "\n");
this.howToPlay.printHowToPlay(howToPlayText); self.howToPlay.printHowToPlay(howToPlayText);
}, },
(jsonData) => { function(jsonData) {
this.howToPlay.printHowToPlay("No data"); self.howToPlay.printHowToPlay("No data");
} }
); );
} }
loadChart() { loadChart() {
let self = this;
let today = new Date(); let today = new Date();
let date = DateUtil.getYYYYMMDD(today); let date = DateUtil.getYYYYMMDD(today);
this.dbConnectManager.requestPlayerHistory( this.dbConnectManager.requestPlayerHistory(
sessionStorageManager.maestroID, sessionStorageManager.maestroID,
date, date,
historyRecordManager => { (function(historyRecordManager) {
if(historyRecordManager.count == 0) { if(historyRecordManager.count == 0) {
console.log("start - history record : no data"); console.log("start - history record : no data");
return; return;
@@ -103,7 +107,7 @@ class Start {
// break; // break;
let historyRecord = historyRecordManager.getAt(i); let historyRecord = historyRecordManager.getAt(i);
this.chart.drawRecordGraph( self.chart.drawRecordGraph(
i, i,
historyRecord === undefined ? "-" : historyRecord.date, historyRecord === undefined ? "-" : historyRecord.date,
historyRecord === undefined ? "" : historyRecord.bestRecord, 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( let rankingButton = new RoundRectButton(
setting, RoundRectButton.NONE_ICON, "순위\n보기", setting, RoundRectButton.NONE_ICON, "순위\n보기",
() => { (function() {
location.href = '../../web/client/ranking.html'; location.href = '../../web/client/ranking.html';
} })
); );
if(sessionStorageManager.maestroAccountType == 100) if(sessionStorageManager.maestroAccountType == 100)
rankingButton.inputEnabled = false; rankingButton.inputEnabled = false;
+5 -5
View File
@@ -15,7 +15,7 @@ class TypingPractice {
// top ui // top ui
let screenTopUI = new ScreenTopUI(); let screenTopUI = new ScreenTopUI();
screenTopUI.makeBackButton( () => { screenTopUI.makeBackButton( function() {
sessionStorageManager.resetPlayingAppData(); sessionStorageManager.resetPlayingAppData();
location.href = '../../web/client/menu_typing_practice.html'; location.href = '../../web/client/menu_typing_practice.html';
}); });
@@ -29,12 +29,12 @@ class TypingPractice {
this.typingScore = new TypingScore(); 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.isOnStage = false;
// self.goResult(); // self.goResult();
self.gameOver(); self.gameOver();
}); }));
// typing content // typing content
@@ -88,12 +88,12 @@ class TypingPractice {
else else
this.keyboard = new Keyboard(this.keyMapper, Keyboard.ENGLISH); this.keyboard = new Keyboard(this.keyMapper, Keyboard.ENGLISH);
game.input.keyboard.processKeyPress = () => { game.input.keyboard.processKeyPress = (function() {
if(self.isOnStage === false) if(self.isOnStage === false)
return; return;
self.checkTypingContents(event); self.checkTypingContents(event);
} });
this.shiftKey = game.input.keyboard.addKey(Phaser.Keyboard.SHIFT); this.shiftKey = game.input.keyboard.addKey(Phaser.Keyboard.SHIFT);
// hands // hands
+1 -1
View File
@@ -13,7 +13,7 @@ class TypingTest {
// top ui // top ui
let screenTopUI = new ScreenTopUI(); let screenTopUI = new ScreenTopUI();
screenTopUI.makeBackButton( () => { screenTopUI.makeBackButton( function() {
sessionStorageManager.resetPlayingAppData(); sessionStorageManager.resetPlayingAppData();
location.href = '../../web/client/menu_typing_test.html'; location.href = '../../web/client/menu_typing_test.html';
}); });
+4 -4
View File
@@ -35,11 +35,11 @@
"./../server/admin/maestro_registered_list.php", "./../server/admin/maestro_registered_list.php",
"maestro_name=" + maestroName, "maestro_name=" + maestroName,
(jsonData) => { function(jsonData) {
updateMaestroList(jsonData["maestroList"]); updateMaestroList(jsonData["maestroList"]);
}, },
(errorMessage, errorCode) => { function(errorMessage, errorCode) {
if($("#error_message").length) { if($("#error_message").length) {
$("#error_message").text(errorMessage); $("#error_message").text(errorMessage);
} }
@@ -94,12 +94,12 @@
"./../server/admin/register_maestro.php", "./../server/admin/register_maestro.php",
"maestro_id=" + maestroID, "maestro_id=" + maestroID,
(jsonData) => { function(jsonData) {
loadMaestroList(""); loadMaestroList("");
$("#error_message").text("마에스트로 계정이 정상적으로 등록되었습니다."); $("#error_message").text("마에스트로 계정이 정상적으로 등록되었습니다.");
}, },
(errorMessage, errorCode) => { function(errorMessage, errorCode) {
if($("#error_message").length) { if($("#error_message").length) {
$("#error_message").text(errorMessage); $("#error_message").text(errorMessage);
} }
+4 -4
View File
@@ -26,11 +26,11 @@
"./../server/admin/maestro_upgrade_list.php", "./../server/admin/maestro_upgrade_list.php",
"maestro_name=" + maestroName, "maestro_name=" + maestroName,
(jsonData) => { function(jsonData) {
updateMaestroUpgradeList(jsonData["maestroUpgradeList"]); updateMaestroUpgradeList(jsonData["maestroUpgradeList"]);
}, },
(errorMessage, errorCode) => { function(errorMessage, errorCode) {
console.log(errorMessage); console.log(errorMessage);
if($("#error_message").length) { if($("#error_message").length) {
$("#error_message").text(errorMessage); $("#error_message").text(errorMessage);
@@ -177,12 +177,12 @@
"./../server/admin/upgrade_maestro.php", "./../server/admin/upgrade_maestro.php",
"maestro_upgrade_id=" + maestroUpgradeID + "&maestro_id=" + id + "&new_account_type=" + newAccountType, "maestro_upgrade_id=" + maestroUpgradeID + "&maestro_id=" + id + "&new_account_type=" + newAccountType,
(jsonData) => { function(jsonData) {
loadMaestroUpgradeList(""); loadMaestroUpgradeList("");
$("#error_message").text("마에스트로 계정이 정상적으로 등록되었습니다."); $("#error_message").text("마에스트로 계정이 정상적으로 등록되었습니다.");
}, },
(errorMessage, errorCode) => { function(errorMessage, errorCode) {
if($("#error_message").length) { if($("#error_message").length) {
$("#error_message").text(errorMessage); $("#error_message").text(errorMessage);
} }
+2 -2
View File
@@ -24,11 +24,11 @@
"./../server/admin/login.php", "./../server/admin/login.php",
"admin_name=" + name + "&password=" + password, "admin_name=" + name + "&password=" + password,
(jsonData) => { function(jsonData) {
location.href = 'admin_register_list.html'; location.href = 'admin_register_list.html';
}, },
(errorMessage, errorCode) => { function(errorMessage, errorCode) {
if($("#error_message").length) { if($("#error_message").length) {
$("#error_message").text(errorMessage); $("#error_message").text(errorMessage);
} }
+2 -2
View File
@@ -17,7 +17,7 @@
"./../server/maestro/maestro_test_player.php", "./../server/maestro/maestro_test_player.php",
"maestro_id=" + maestroID, "maestro_id=" + maestroID,
(jsonData) => { function(jsonData) {
console.log("maestroAccountType : " + jsonData["maestroAccountType"]); console.log("maestroAccountType : " + jsonData["maestroAccountType"]);
console.log("playerName : " + jsonData["playerName"]); console.log("playerName : " + jsonData["playerName"]);
console.log("playerID : " + jsonData["playerID"]); console.log("playerID : " + jsonData["playerID"]);
@@ -31,7 +31,7 @@
location.href='./../client/menu_app.html'; location.href='./../client/menu_app.html';
}, },
(errorMessage, errorCode) => { function(errorMessage, errorCode) {
if($("#error_message").length) { if($("#error_message").length) {
$("#error_message").text(errorMessage); $("#error_message").text(errorMessage);
} }
+2 -2
View File
@@ -14,7 +14,7 @@ class MaestroInfo {
"./../server/maestro/maestro_info.php", "./../server/maestro/maestro_info.php",
"maestro_id=" + this.maestroID, "maestro_id=" + this.maestroID,
(jsonData) => { function(jsonData) {
self.maestroName = jsonData["name"]; self.maestroName = jsonData["name"];
self.accountType = jsonData["accountType"]; self.accountType = jsonData["accountType"];
self.playerCount = jsonData["playerCount"]; self.playerCount = jsonData["playerCount"];
@@ -22,7 +22,7 @@ class MaestroInfo {
onSuccess(); onSuccess();
}, },
(errorMessage, errorCode) => { function(errorMessage, errorCode) {
onFail(errorMessage, errorCode); onFail(errorMessage, errorCode);
} }
+14 -14
View File
@@ -25,7 +25,7 @@
"./../server/player/registered_player_count.php", "./../server/player/registered_player_count.php",
"maestro_id=" + maestroID, "maestro_id=" + maestroID,
(jsonData) => { function(jsonData) {
self.playerCount = jsonData["playerCount"]; self.playerCount = jsonData["playerCount"];
self.lastPageNo = Math.ceil( (self.playerCount + 1) / 10 ); self.lastPageNo = Math.ceil( (self.playerCount + 1) / 10 );
self.activePageNo = 1; self.activePageNo = 1;
@@ -34,7 +34,7 @@
self.listNavigator.updateNavigator(self.activePageNo, self.lastPageNo); self.listNavigator.updateNavigator(self.activePageNo, self.lastPageNo);
}, },
(errorMessage, errorCode) => { function(errorMessage, errorCode) {
showErrorMessage(errorMessage, "error"); showErrorMessage(errorMessage, "error");
} }
@@ -53,12 +53,12 @@
"./../server/player/registered_player_list.php", "./../server/player/registered_player_list.php",
"maestro_id=" + maestroID + "&start_no=" + startNo + "&end_no=" + endNo, "maestro_id=" + maestroID + "&start_no=" + startNo + "&end_no=" + endNo,
(jsonData) => { function(jsonData) {
self.playerCount = jsonData["playerList"].length; self.playerCount = jsonData["playerList"].length;
self.list.updatePlayerList(jsonData["playerList"]); self.list.updatePlayerList(jsonData["playerList"]);
}, },
(errorMessage, errorCode) => { function(errorMessage, errorCode) {
showErrorMessage(errorMessage, "error"); showErrorMessage(errorMessage, "error");
} }
@@ -78,13 +78,13 @@
"./../server/player/registered_player_list.php", "./../server/player/registered_player_list.php",
"maestro_id=" + maestroID + "&start_no=" + startNo + "&end_no=" + endNo, "maestro_id=" + maestroID + "&start_no=" + startNo + "&end_no=" + endNo,
(jsonData) => { function(jsonData) {
self.playerCount = jsonData["playerList"].length; self.playerCount = jsonData["playerList"].length;
self.list.updatePlayerList(jsonData["playerList"]); self.list.updatePlayerList(jsonData["playerList"]);
self.listNavigator.updateNavigator(self.activePageNo, self.lastPageNo); self.listNavigator.updateNavigator(self.activePageNo, self.lastPageNo);
}, },
(errorMessage, errorCode) => { function(errorMessage, errorCode) {
showErrorMessage(errorMessage, "error"); showErrorMessage(errorMessage, "error");
} }
@@ -101,7 +101,7 @@
"./../server/player/search_player_count.php", "./../server/player/search_player_count.php",
"maestro_id=" + maestroID + "&player_name=" + this.searchPlayerName, "maestro_id=" + maestroID + "&player_name=" + this.searchPlayerName,
(jsonData) => { function(jsonData) {
self.playerCount = jsonData["playerCount"]; self.playerCount = jsonData["playerCount"];
self.lastPageNo = Math.ceil( (self.playerCount + 1) / 10 ); self.lastPageNo = Math.ceil( (self.playerCount + 1) / 10 );
self.activePageNo = 1; self.activePageNo = 1;
@@ -112,7 +112,7 @@
showErrorMessage(this.searchPlayerName + " : 검색 결과가 없습니다.", "info"); showErrorMessage(this.searchPlayerName + " : 검색 결과가 없습니다.", "info");
}, },
(errorMessage, errorCode) => { function(errorMessage, errorCode) {
showErrorMessage(errorMessage, "error"); showErrorMessage(errorMessage, "error");
} }
@@ -131,13 +131,13 @@
"./../server/player/search_player_list.php", "./../server/player/search_player_list.php",
"maestro_id=" + maestroID + "&player_name=" + playerName + "&start_no=" + startNo + "&end_no=" + endNo, "maestro_id=" + maestroID + "&player_name=" + playerName + "&start_no=" + startNo + "&end_no=" + endNo,
(jsonData) => { function(jsonData) {
self.playerCount = jsonData["playerList"].length; self.playerCount = jsonData["playerList"].length;
self.list.updatePlayerList(jsonData["playerList"]); self.list.updatePlayerList(jsonData["playerList"]);
self.listNavigator.updateNavigator(self.activePageNo, self.lastPageNo); self.listNavigator.updateNavigator(self.activePageNo, self.lastPageNo);
}, },
(errorMessage, errorCode) => { function(errorMessage, errorCode) {
showErrorMessage(errorMessage, "error"); showErrorMessage(errorMessage, "error");
} }
@@ -169,7 +169,7 @@
"./../server/player/edit_player.php", "./../server/player/edit_player.php",
"maestro_id=" + maestroID + "&player_id=" + playerID + "&player_name=" + playerName + "&enter_code=" + playerEnterCode, "maestro_id=" + maestroID + "&player_id=" + playerID + "&player_name=" + playerName + "&enter_code=" + playerEnterCode,
(jsonData) => { function(jsonData) {
// console.log(jsonData); // console.log(jsonData);
if(this.playerListID === "add_player_list") { if(this.playerListID === "add_player_list") {
self.setupAddPlayerList(); self.setupAddPlayerList();
@@ -179,7 +179,7 @@
showErrorMessage("학생 데이터가 [ " + playerName + " / " + playerEnterCode + " ] 으로 변경되었습니다.", "success"); showErrorMessage("학생 데이터가 [ " + playerName + " / " + playerEnterCode + " ] 으로 변경되었습니다.", "success");
}, },
(errorMessage, errorCode) => { function(errorMessage, errorCode) {
showErrorMessage(errorMessage, "error"); showErrorMessage(errorMessage, "error");
} }
@@ -205,7 +205,7 @@
"./../server/player/delete_player.php", "./../server/player/delete_player.php",
"maestro_id=" + maestroID + "&player_id=" + playerID, "maestro_id=" + maestroID + "&player_id=" + playerID,
(jsonData) => { function(jsonData) {
if(this.playerListID === "add_player_list") { if(this.playerListID === "add_player_list") {
self.setupAddPlayerList(); self.setupAddPlayerList();
} else if(this.playerListID === "search_player_list") { } else if(this.playerListID === "search_player_list") {
@@ -216,7 +216,7 @@
onChangePlayerCount(); onChangePlayerCount();
}, },
(errorMessage, errorCode) => { function(errorMessage, errorCode) {
showErrorMessage(errorMessage, "error"); showErrorMessage(errorMessage, "error");
} }
@@ -22,7 +22,7 @@
"./../server/maestro/maestro_test_account.php", "./../server/maestro/maestro_test_account.php",
"", "",
(jsonData) => { function(jsonData) {
let maestroID = jsonData["maestroID"]; let maestroID = jsonData["maestroID"];
let playerID = jsonData["playerID"]; let playerID = jsonData["playerID"];
let playerName = jsonData["playerName"]; let playerName = jsonData["playerName"];
@@ -37,7 +37,7 @@
location.href = "./../client/menu_app.html"; location.href = "./../client/menu_app.html";
}, },
(errorMessage, errorCode) => { function(errorMessage, errorCode) {
if($("#error_message").length) { if($("#error_message").length) {
$("#error_message").text(errorMessage); $("#error_message").text(errorMessage);
} }
+2 -2
View File
@@ -22,7 +22,7 @@
"./../server/player/player_experience_account.php", "./../server/player/player_experience_account.php",
"", "",
(jsonData) => { function(jsonData) {
let maestroID = jsonData["maestroID"]; let maestroID = jsonData["maestroID"];
let maestroAccountType = jsonData["maestroAccountType"]; let maestroAccountType = jsonData["maestroAccountType"];
let playerID = jsonData["playerID"]; let playerID = jsonData["playerID"];
@@ -44,7 +44,7 @@
location.href = "./../client/menu_app.html"; location.href = "./../client/menu_app.html";
}, },
(errorMessage, errorCode) => { function(errorMessage, errorCode) {
if($("#error_message").length) { if($("#error_message").length) {
$("#error_message").text(errorMessage); $("#error_message").text(errorMessage);
} }