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);
|
// console.log(this.selectedSubjectData);
|
||||||
|
|
||||||
this.timer.setStartTime(this.selectedSubjectData.timeLimit * Timer.TIME_SECONDS_FOR_MINUTE);
|
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(),
|
sessionStorageManager.getPlayerID(),
|
||||||
Timer.TIME_DEFAULT_SEC,
|
Timer.TIME_DEFAULT_SEC,
|
||||||
(function(replyJson) {
|
(function(replyJson) {
|
||||||
console.log(replyJson);
|
// console.log(replyJson);
|
||||||
|
|
||||||
if(replyJson.leftTime == null || replyJson.leftTime == 0) {
|
if(replyJson.leftTime == null || replyJson.leftTime == 0) {
|
||||||
this.startTime = replyJson.startTime;
|
this.startTime = replyJson.startTime;
|
||||||
@@ -231,8 +231,12 @@ Timer.prototype.makePauseButton = function() {
|
|||||||
setting,
|
setting,
|
||||||
null, "∥",
|
null, "∥",
|
||||||
(function() {
|
(function() {
|
||||||
this.updateLeftTimeToServer();
|
|
||||||
this.pauseTimer();
|
this.pauseTimer();
|
||||||
|
|
||||||
|
if(this.leftTime > 0)
|
||||||
|
this.updateLeftTimeToServer();
|
||||||
|
else
|
||||||
|
this.resetLeftTimeToServer();
|
||||||
}).bind(this)
|
}).bind(this)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -577,39 +581,38 @@ Timer.prototype.setStartTime = function(time) {
|
|||||||
|
|
||||||
|
|
||||||
Timer.prototype.updateStartTimeToServer = function() {
|
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(
|
this.dbConnectManager.updateLicenseStartTime(
|
||||||
sessionStorageManager.getMaestroID(),
|
sessionStorageManager.getMaestroID(),
|
||||||
sessionStorageManager.getPlayerID(),
|
sessionStorageManager.getPlayerID(),
|
||||||
this.startTime,
|
this.startTime,
|
||||||
(function(replyJson) { console.log(replyJson); }).bind(this),
|
(function(replyJson) { /*console.log(replyJson);*/ }).bind(this),
|
||||||
(function(replyJson) { console.log(replyJson); })
|
(function(replyJson) { /*console.log(replyJson);*/ })
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Timer.prototype.resetLeftTimeToServer = function() {
|
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(
|
this.dbConnectManager.updateLicenseLeftTime(
|
||||||
sessionStorageManager.getMaestroID(),
|
sessionStorageManager.getMaestroID(),
|
||||||
sessionStorageManager.getPlayerID(),
|
sessionStorageManager.getPlayerID(),
|
||||||
0,
|
0,
|
||||||
(function(replyJson) { console.log(replyJson); }).bind(this),
|
(function(replyJson) { /*console.log(replyJson);*/ }).bind(this),
|
||||||
(function(replyJson) { console.log(replyJson); })
|
(function(replyJson) { /*console.log(replyJson);*/ })
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
Timer.prototype.updateLeftTimeToServer = function() {
|
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(
|
this.dbConnectManager.updateLicenseLeftTime(
|
||||||
sessionStorageManager.getMaestroID(),
|
sessionStorageManager.getMaestroID(),
|
||||||
sessionStorageManager.getPlayerID(),
|
sessionStorageManager.getPlayerID(),
|
||||||
this.leftTime,
|
this.leftTime,
|
||||||
(function(replyJson) { console.log(replyJson); }).bind(this),
|
(function(replyJson) { /*console.log(replyJson);*/ }).bind(this),
|
||||||
(function(replyJson) { console.log(replyJson); })
|
(function(replyJson) { /*console.log(replyJson);*/ })
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user