Add: license maestro password, score list

This commit is contained in:
2018-12-13 10:59:37 +09:00
parent be09fca8b2
commit 5186f21421
8 changed files with 358 additions and 65 deletions
+24 -3
View File
@@ -1,7 +1,9 @@
function InputScore(timer, chart) {
function InputScore(licenseDataManager, timer, chart) {
this.licenseDataManager = licenseDataManager;
this.timer = timer;
this.chart = chart;
this.licenseDataManager = new LicenseDataManager();
this.dbConnectManager = new DBConnectManager();
this.initVariables();
@@ -69,6 +71,8 @@ function InputScore(timer, chart) {
this.makeSubjectPanel();
this.setVisibleCompanyPanel(false);
this.setVisibleSubjectPanel(false, "");
this.loadMaestroPasswordFromServer();
}
InputScore.prototype.initVariables = function() {
@@ -79,6 +83,8 @@ InputScore.prototype.initVariables = function() {
this.companyButtonList = [];
this.licenseSubjectButtonList = [];
this.maestroPassword;
}
InputScore.prototype.makeInputTextSetting = function(width, placeHolder) {
@@ -297,7 +303,20 @@ InputScore.prototype.onClickSendToServerButton = function() {
console.log(this.passwordText.value);
}
InputScore.prototype.loadMaestroPasswordFromServer = function() {
this.dbConnectManager.requestLicenseMaestroPassword(
sessionStorageManager.getMaestroID(),
(function(replyJson) {
// console.log(replyJson);
this.maestroPassword = replyJson.maestroPassword;
}).bind(this),
(function(replyJson) {
// console.log(replyJson);
this.maestroPassword = InputScore.DEFAULT_MAESTRO_PASSWORD;
})
);
}
InputScore.INPUT_SCORE_GROUP_OFFSET_Y = 70;
@@ -306,4 +325,6 @@ InputScore.SUBJECT_BUTTON_WIDTH = 260;
InputScore.BUTTON_GAP_WIDTH = 10;
InputScore.BUTTON_GAP_HEIGHT = 64;
InputScore.SUBJECT_BUTTON_MAX_COUNT = 6;
InputScore.SUBJECT_BUTTON_MAX_COUNT = 6;
InputScore.DEFAULT_MAESTRO_PASSWORD = "1111";