Fix: client menu - show setup button if allow edit entercode is activated

This commit is contained in:
2019-03-16 23:23:16 +09:00
parent 275efabdfb
commit 1bd11b01d9
3 changed files with 40 additions and 6 deletions
+21 -4
View File
@@ -44,11 +44,8 @@ var MenuApp = {
// top ui
var screenTopUI = new ScreenTopUI();
screenTopUI.makeBackButton( (function() { this.back(); }).bind(this) );
screenTopUI.makeSetupButton( (function() {
console.log("setup");
location.href = '../../web/client/setup.html';
}).bind(this) );
screenTopUI.makeFullScreenButton();
this.loadAllowEditEnterCode(screenTopUI);
// bottom ui
@@ -77,6 +74,26 @@ var MenuApp = {
location.href = '../../web/client/login.html';
},
loadAllowEditEnterCode: function(screenTopUI) {
var dbConnectManager = new DBConnectManager();
dbConnectManager.requestAllowEditEnterCode(
sessionStorageManager.getMaestroID(),
(function(replyJSON) {
if(replyJSON["AllowEditEnterCode"] == "1") {
screenTopUI.makeSetupButton( (function() {
console.log("setup");
location.href = '../../web/client/setup.html';
}).bind(this) );
}
}).bind(this),
(function(replyJSON) {
this.loadFailed(replyJSON);
}).bind(this)
);
},
loadAppData: function() {
var dbConnectManager = new DBConnectManager();
dbConnectManager.requestMenuAppList(