Add: php server files for timer

This commit is contained in:
2018-12-13 00:36:48 +09:00
parent edbd4743af
commit 537b0c1db1
10 changed files with 374 additions and 88 deletions
+8 -16
View File
@@ -1,4 +1,5 @@
function InputScore(chart) {
function InputScore(timer, chart) {
this.timer = timer;
this.chart = chart;
this.licenseDataManager = new LicenseDataManager();
@@ -64,7 +65,6 @@ function InputScore(chart) {
(function() { this.onClickSendToServerButton(); }).bind(this)
);
// this.loadLicenseCompanySubjectData();
this.makeCompanyPanel();
this.makeSubjectPanel();
this.setVisibleCompanyPanel(false);
@@ -195,8 +195,8 @@ InputScore.prototype.makeSubjectPanel = function() {
setting.width = InputScore.SUBJECT_BUTTON_WIDTH;
var subjectData = this.licenseDataManager.getSubjectDataByIndex(i);
var subjectData = subjectData.companyName + " " + subjectData.subjectName;
this.licenseSubjectButtonList[i] = new RoundRectButton(setting, null, subjectData, null);
var subjectName = subjectData.companyName + " " + subjectData.subjectName;
this.licenseSubjectButtonList[i] = new RoundRectButton(setting, null, subjectName, null);
}
}
@@ -265,6 +265,9 @@ InputScore.prototype.setVisibleSubjectPanel = function(flag, companyName) {
InputScore.prototype.onClickCompanySubjectButton = function(subjectFullname) {
this.setSubjectFullname(subjectFullname);
this.selectedSubjectData = this.licenseDataManager.getSubjectDataByName(subjectFullname);
// console.log(this.selectedSubjectData);
this.timer.setStartTime(this.selectedSubjectData.timeLimit * Timer.TIME_SECONDS_FOR_MINUTE);
}
@@ -300,15 +303,4 @@ InputScore.SUBJECT_BUTTON_WIDTH = 260;
InputScore.BUTTON_GAP_WIDTH = 10;
InputScore.BUTTON_GAP_HEIGHT = 64;
InputScore.SUBJECT_BUTTON_MAX_COUNT = 6;
/*
function LicenseCompanySubjectData(companyName, subjectName, timeLimit, maxScore, gradeList) {
this.companyName = companyName;
this.subjectName = subjectName;
this.timeLimit = timeLimit;
this.maxScore = maxScore;
this.gradeList = gradeList;
}
*/
InputScore.SUBJECT_BUTTON_MAX_COUNT = 6;