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
+18 -1
View File
@@ -79,7 +79,7 @@ DBConnectManager.prototype.requestPlayerEnterCode = function(maestroID, playerID
xhr.send("maestro_id=" + maestroID + "&player_id=" + playerID);
}
DBConnectManager.prototype.requestEditPlayerEnterCode = function(maestroID, playerID, enterCode, onSucceededListener, onFailedListener) {
DBConnectManager.prototype.updatePlayerEnterCode = function(maestroID, playerID, enterCode, onSucceededListener, onFailedListener) {
var xhr = new XMLHttpRequest();
xhr.open("POST", this.phpPath + "server/player/edit_entercode.php", true);
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
@@ -96,6 +96,23 @@ DBConnectManager.prototype.requestEditPlayerEnterCode = function(maestroID, play
xhr.send("maestro_id=" + maestroID + "&player_id=" + playerID + "&enter_code=" + enterCode);
}
DBConnectManager.prototype.requestAllowEditEnterCode = function(maestroID, onSucceededListener, onFailedListener) {
var xhr = new XMLHttpRequest();
xhr.open("POST", this.phpPath + "server/maestro/get_allow_edit_entercode.php", true);
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xhr.onreadystatechange = function() {
if(xhr.readyState == 4 && xhr.status == 200) {
var replyJSON = JSON.parse(xhr.responseText);
if(replyJSON != null && replyJSON["AllowEditEnterCode"] != null)
onSucceededListener(replyJSON);
else
onFailedListener(replyJSON);
}
};
xhr.send("maestro_id=" + maestroID);
}
/*
DBConnectManager.prototype.requestAppList = function(maestroID, onSucceededListener, onFailedListener) {
var xhr = new XMLHttpRequest();