Fix: hide company and subject panel by clicking subject button
This commit is contained in:
@@ -268,6 +268,9 @@ InputScore.prototype.onClickCompanySubjectButton = function(subjectFullname) {
|
||||
// console.log(this.selectedSubjectData);
|
||||
|
||||
this.timer.setStartTime(this.selectedSubjectData.timeLimit * Timer.TIME_SECONDS_FOR_MINUTE);
|
||||
|
||||
this.setVisibleCompanyPanel(false);
|
||||
this.setVisibleSubjectPanel(false, "");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ Timer.prototype.loadDataFromServer = function() {
|
||||
sessionStorageManager.getPlayerID(),
|
||||
Timer.TIME_DEFAULT_SEC,
|
||||
(function(replyJson) {
|
||||
console.log(replyJson);
|
||||
// console.log(replyJson);
|
||||
|
||||
if(replyJson.leftTime == null || replyJson.leftTime == 0) {
|
||||
this.startTime = replyJson.startTime;
|
||||
@@ -231,8 +231,12 @@ Timer.prototype.makePauseButton = function() {
|
||||
setting,
|
||||
null, "∥",
|
||||
(function() {
|
||||
this.updateLeftTimeToServer();
|
||||
this.pauseTimer();
|
||||
|
||||
if(this.leftTime > 0)
|
||||
this.updateLeftTimeToServer();
|
||||
else
|
||||
this.resetLeftTimeToServer();
|
||||
}).bind(this)
|
||||
);
|
||||
}
|
||||
@@ -577,39 +581,38 @@ Timer.prototype.setStartTime = function(time) {
|
||||
|
||||
|
||||
Timer.prototype.updateStartTimeToServer = function() {
|
||||
// send to server
|
||||
console.log("send start time to server : " + this.startTime);
|
||||
// console.log("send start time to server : " + this.startTime);
|
||||
|
||||
this.dbConnectManager.updateLicenseStartTime(
|
||||
sessionStorageManager.getMaestroID(),
|
||||
sessionStorageManager.getPlayerID(),
|
||||
this.startTime,
|
||||
(function(replyJson) { console.log(replyJson); }).bind(this),
|
||||
(function(replyJson) { console.log(replyJson); })
|
||||
(function(replyJson) { /*console.log(replyJson);*/ }).bind(this),
|
||||
(function(replyJson) { /*console.log(replyJson);*/ })
|
||||
);
|
||||
}
|
||||
|
||||
Timer.prototype.resetLeftTimeToServer = function() {
|
||||
console.log("send left time to server : " + this.leftTime);
|
||||
// console.log("send left time to server : " + this.leftTime);
|
||||
|
||||
this.dbConnectManager.updateLicenseLeftTime(
|
||||
sessionStorageManager.getMaestroID(),
|
||||
sessionStorageManager.getPlayerID(),
|
||||
0,
|
||||
(function(replyJson) { console.log(replyJson); }).bind(this),
|
||||
(function(replyJson) { console.log(replyJson); })
|
||||
(function(replyJson) { /*console.log(replyJson);*/ }).bind(this),
|
||||
(function(replyJson) { /*console.log(replyJson);*/ })
|
||||
);
|
||||
},
|
||||
|
||||
Timer.prototype.updateLeftTimeToServer = function() {
|
||||
console.log("send left time to server : " + this.leftTime);
|
||||
// console.log("send left time to server : " + this.leftTime);
|
||||
|
||||
this.dbConnectManager.updateLicenseLeftTime(
|
||||
sessionStorageManager.getMaestroID(),
|
||||
sessionStorageManager.getPlayerID(),
|
||||
this.leftTime,
|
||||
(function(replyJson) { console.log(replyJson); }).bind(this),
|
||||
(function(replyJson) { console.log(replyJson); })
|
||||
(function(replyJson) { /*console.log(replyJson);*/ }).bind(this),
|
||||
(function(replyJson) { /*console.log(replyJson);*/ })
|
||||
);
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user