Add: start screen - chart, highest record
This commit is contained in:
+44
-19
@@ -53,29 +53,54 @@ var Start = {
|
||||
|
||||
|
||||
// bottom ui
|
||||
var screenBottomUI = new ScreenBottomUI();
|
||||
screenBottomUI.printLeftTextWithAppHighestRecord(sessionStorageManager.getAppHighestRecord());
|
||||
screenBottomUI.printCenterText(sessionStorageManager.getPlayingAppKoreanName());
|
||||
screenBottomUI.printRightText(sessionStorageManager.getPlayerName());
|
||||
this.screenBottomUI = new ScreenBottomUI();
|
||||
this.screenBottomUI.printLeftTextWithAppHighestRecord(sessionStorageManager.getAppHighestRecord());
|
||||
this.screenBottomUI.printCenterText(sessionStorageManager.getPlayingAppKoreanName());
|
||||
this.screenBottomUI.printRightText(sessionStorageManager.getPlayerName());
|
||||
|
||||
this.dbConnectManager.requestAppHighestRecord(
|
||||
sessionStorageManager.getMaestroID(),
|
||||
sessionStorageManager.getPlayerID(),
|
||||
sessionStorageManager.getPlayingAppID(),
|
||||
(function(replyJSON) {
|
||||
var appHighestRecord = replyJSON["AppHighestRecord"];
|
||||
sessionStorageManager.setAppHighestRecord(Number(appHighestRecord));
|
||||
screenBottomUI.printLeftTextWithAppHighestRecord(appHighestRecord);
|
||||
}).bind(this),
|
||||
(function(replyJSON) { // no data
|
||||
sessionStorageManager.setAppHighestRecord(0);
|
||||
screenBottomUI.printLeftTextWithAppHighestRecord(sessionStorageManager.getAppHighestRecord());
|
||||
}).bind(this)
|
||||
);
|
||||
if(isTypingExamApp()) {
|
||||
this.dbService.getTypingExamHighestRecord(
|
||||
sessionStorageManager.getWritingID(),
|
||||
|
||||
(function(replyJSON) {
|
||||
console.log(replyJSON);
|
||||
var highestRecordData = replyJSON["highestRecordData"];
|
||||
var highestRecord = highestRecordData["highestRecord"];
|
||||
this.onReceiveAppHighestRecord(highestRecord);
|
||||
}).bind(this),
|
||||
|
||||
(function(replyJSON) { // no data
|
||||
this.onReceiveAppHighestRecord(0);
|
||||
}).bind(this)
|
||||
);
|
||||
} else {
|
||||
this.dbConnectManager.requestAppHighestRecord(
|
||||
sessionStorageManager.getMaestroID(),
|
||||
sessionStorageManager.getPlayerID(),
|
||||
sessionStorageManager.getPlayingAppID(),
|
||||
|
||||
(function(replyJSON) {
|
||||
var highestRecord = replyJSON["AppHighestRecord"];
|
||||
this.onReceiveAppHighestRecord(highestRecord);
|
||||
}).bind(this),
|
||||
|
||||
(function(replyJSON) { // no data
|
||||
this.onReceiveAppHighestRecord(0);
|
||||
}).bind(this)
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
onReceiveAppHighestRecord: function(highestRecord) {
|
||||
sessionStorageManager.setAppHighestRecord(Number(highestRecord));
|
||||
this.screenBottomUI.printLeftTextWithAppHighestRecord(highestRecord);
|
||||
},
|
||||
|
||||
|
||||
back: function() {
|
||||
if(isTypingPracticeApp())
|
||||
if(isTypingExamApp())
|
||||
location.href = '../../web/client/menu_typing_exam.html';
|
||||
else if(isTypingPracticeApp())
|
||||
location.href = '../../web/client/menu_typing_practice.html';
|
||||
else if(isTypingTestApp())
|
||||
location.href = '../../web/client/menu_typing_test.html';
|
||||
|
||||
Reference in New Issue
Block a user