Fix: loadMaestroID, saveMaestroID

This commit is contained in:
2018-07-06 08:41:47 +09:00
parent a9ccd52ba1
commit 49fd613dfc
13 changed files with 62 additions and 128 deletions
+1 -8
View File
@@ -1,17 +1,10 @@
let maestroID = -1;
let addPlayerListManager;
let addPlayerListManager;
let searchPlayerListManager;
let mouseAppList;
let typingAppList;
$(document).ready(function() {
maestroID = sessionStorage.getItem("maestroID");
console.log("maestroID : " + maestroID);
});
function tabClicked(tabNo) {
// hide and show tab
for(let i = 0; i < 4; i++) {
+37
View File
@@ -0,0 +1,37 @@
let maestroID = -1;
$(document).ready(function() {
loadMaestroID();
});
function loadMaestroID() {
maestroID = sessionStorage.getItem("maestroID");
if(maestroID === null) {
maestroID = -1;
sessionStorage.setItem("maestroID", maestroID);
}
maestroID = Number(maestroID);
console.log("loaded maestroID : " + maestroID);
}
function saveMaestroID() {
sessionStorage.setItem("maestroID", maestroID);
console.log("saved maestroID : " + maestroID);
}
function goHome() {
if(maestroID === -1) {
location.href = "./../main/index.html";
} else {
location.href = "./../maestro/main_menu.html";
}
}
function logout() {
sessionStorage.clear();
maestroID = -1;
sessionStorage.setItem("maestroID", maestroID);
location.href = './../main/index.html';
}