Fix: add player css, error_message css
This commit is contained in:
@@ -6,12 +6,12 @@
|
||||
this.docNav = docNav;
|
||||
|
||||
this.list = new PlayerList(this.docList, this);
|
||||
this.list.updatePlayerList(null);
|
||||
this.listNavigator = new PlayerListNavigator(this.docNav);
|
||||
|
||||
this.playerCount = 0;
|
||||
this.activePageNo = 1;
|
||||
this.lastPageNo = 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -38,48 +38,6 @@
|
||||
}
|
||||
|
||||
);
|
||||
|
||||
/*
|
||||
let xhr = new XMLHttpRequest(); //new로 생성.
|
||||
xhr.open('POST', './../server/player/registered_player_count.php', true);
|
||||
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
|
||||
xhr.send("maestro_id=" + maestroID);
|
||||
xhr.onload = function() {
|
||||
if(xhr.readyState === 4 && xhr.status === 200) {
|
||||
// console.log(xhr.responseText);
|
||||
// console.log(xhr.responseText.length);
|
||||
if(xhr.responseText.length === 0 || xhr.responseText === null) {
|
||||
console.log("no data from server");
|
||||
return;
|
||||
}
|
||||
|
||||
let jsonData = JSON.parse(xhr.responseText);
|
||||
// console.log(jsonData);
|
||||
|
||||
if(jsonData === null) {
|
||||
console.log("no data from server");
|
||||
return;
|
||||
}
|
||||
|
||||
if(jsonData["ERROR"] !== undefined || jsonData["RESULT"] === undefined) {
|
||||
console.log(jsonData["ERROR"]);
|
||||
return;
|
||||
}
|
||||
|
||||
if(jsonData["RESULT"] === "fail") {
|
||||
console.log(jsonData["RESULT"]);
|
||||
return;
|
||||
}
|
||||
|
||||
self.playerCount = jsonData["Count"];
|
||||
self.lastPageNo = Math.ceil( (self.playerCount + 1) / 10 );
|
||||
self.activePageNo = 1;
|
||||
|
||||
self.loadAddPlayerListPage(self.activePageNo);
|
||||
self.listNavigator.updateNavigator(self.activePageNo, self.lastPageNo);
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
loadAddPlayerListPage(pageNo) {
|
||||
@@ -106,47 +64,6 @@
|
||||
}
|
||||
|
||||
);
|
||||
|
||||
/*
|
||||
let xhr = new XMLHttpRequest(); //new로 생성.
|
||||
xhr.open('POST', './../server/player/registered_player_list.php', true);
|
||||
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
|
||||
xhr.send("maestro_id=" + maestroID + "&start_no=" + startNo + "&end_no=" + endNo);
|
||||
xhr.onload = function() {
|
||||
if(xhr.readyState === 4 && xhr.status === 200) {
|
||||
// console.log(xhr.responseText);
|
||||
// console.log(xhr.responseText.length);
|
||||
if(xhr.responseText.length === 0 || xhr.responseText === null) {
|
||||
console.log("no data from server");
|
||||
return;
|
||||
}
|
||||
|
||||
let jsonData = JSON.parse(xhr.responseText);
|
||||
// console.log(jsonData);
|
||||
|
||||
if(jsonData === null) {
|
||||
console.log("no data from server");
|
||||
return;
|
||||
}
|
||||
|
||||
if(jsonData["ERROR"] !== undefined || jsonData["RESULT"] === undefined) {
|
||||
console.log(jsonData["ERROR"]);
|
||||
return;
|
||||
}
|
||||
|
||||
if(jsonData["RESULT"] === "fail") {
|
||||
console.log(jsonData["RESULT"]);
|
||||
return;
|
||||
}
|
||||
|
||||
// console.log(jsonData["PlayerList"]);
|
||||
// updatePlayerListPage(jsonData["PlayerList"]);
|
||||
self.list.updatePlayerList(jsonData["PlayerList"]);
|
||||
|
||||
self.playerCount = jsonData["PlayerList"].length;
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
@@ -175,52 +92,6 @@
|
||||
}
|
||||
|
||||
);
|
||||
|
||||
|
||||
/*
|
||||
let xhr = new XMLHttpRequest(); //new로 생성.
|
||||
xhr.open('POST', './../server/player/registered_player_list.php', true);
|
||||
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
|
||||
xhr.send("maestro_id=" + maestroID + "&start_no=" + startNo + "&end_no=" + endNo);
|
||||
xhr.onload = function() {
|
||||
if(xhr.readyState === 4 && xhr.status === 200) {
|
||||
// console.log(xhr.responseText);
|
||||
// console.log(xhr.responseText.length);
|
||||
if(xhr.responseText.length === 0 || xhr.responseText === null) {
|
||||
console.log("no data from server");
|
||||
return;
|
||||
}
|
||||
|
||||
let jsonData = JSON.parse(xhr.responseText);
|
||||
// console.log(jsonData);
|
||||
|
||||
if(jsonData === null) {
|
||||
console.log("no data from server");
|
||||
return;
|
||||
}
|
||||
|
||||
if(jsonData["ERROR"] !== undefined || jsonData["RESULT"] === undefined) {
|
||||
console.log(jsonData["ERROR"]);
|
||||
return;
|
||||
}
|
||||
|
||||
if(jsonData["RESULT"] === "fail") {
|
||||
console.log(jsonData["RESULT"]);
|
||||
return;
|
||||
}
|
||||
|
||||
// console.log(jsonData["PlayerList"]);
|
||||
self.list.updatePlayerList(jsonData["PlayerList"]);
|
||||
|
||||
self.playerCount = jsonData["PlayerList"].length;
|
||||
// console.log(self.playerCount);
|
||||
// self.lastPageNo = Math.ceil( (self.playerCount + 1) / 10 );
|
||||
// self.activePageNo = 1;
|
||||
|
||||
self.listNavigator.updateNavigator(self.activePageNo, self.lastPageNo);
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
@@ -247,47 +118,6 @@
|
||||
}
|
||||
|
||||
);
|
||||
|
||||
/*
|
||||
let xhr = new XMLHttpRequest(); //new로 생성.
|
||||
xhr.open('POST', './../server/player/search_player_count.php', true);
|
||||
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
|
||||
xhr.send("maestro_id=" + maestroID + "&player_name=" + playerName);
|
||||
xhr.onload = function() {
|
||||
if(xhr.readyState === 4 && xhr.status === 200) {
|
||||
// console.log(xhr.responseText);
|
||||
// console.log(xhr.responseText.length);
|
||||
if(xhr.responseText.length === 0 || xhr.responseText === null) {
|
||||
console.log("no data from server");
|
||||
return;
|
||||
}
|
||||
|
||||
let jsonData = JSON.parse(xhr.responseText);
|
||||
// console.log(jsonData);
|
||||
|
||||
if(jsonData === null) {
|
||||
console.log("no data from server");
|
||||
return;
|
||||
}
|
||||
|
||||
if(jsonData["ERROR"] !== undefined || jsonData["RESULT"] === undefined) {
|
||||
console.log(jsonData["ERROR"]);
|
||||
return;
|
||||
}
|
||||
|
||||
if(jsonData["RESULT"] === "fail") {
|
||||
console.log(jsonData["RESULT"]);
|
||||
return;
|
||||
}
|
||||
|
||||
self.playerCount = jsonData["Count"];
|
||||
self.lastPageNo = Math.ceil( (self.playerCount + 1) / 10 );
|
||||
self.activePageNo = 1;
|
||||
|
||||
self.updateSearchPlayerListPage(playerName, 1);
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
updateSearchPlayerListPage(playerName, pageNo) {
|
||||
@@ -315,51 +145,6 @@
|
||||
}
|
||||
|
||||
);
|
||||
|
||||
|
||||
/*
|
||||
let xhr = new XMLHttpRequest(); //new로 생성.
|
||||
xhr.open('POST', './../server/player/search_player_list.php', true);
|
||||
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
|
||||
xhr.send("maestro_id=" + maestroID + "&player_name=" + playerName + "&start_no=" + startNo + "&end_no=" + endNo);
|
||||
xhr.onload = function() {
|
||||
if(xhr.readyState === 4 && xhr.status === 200) {
|
||||
// console.log(xhr.responseText);
|
||||
// console.log(xhr.responseText.length);
|
||||
if(xhr.responseText.length === 0 || xhr.responseText === null) {
|
||||
console.log("no data from server");
|
||||
return;
|
||||
}
|
||||
|
||||
let jsonData = JSON.parse(xhr.responseText);
|
||||
// console.log(jsonData);
|
||||
|
||||
if(jsonData === null) {
|
||||
console.log("no data from server");
|
||||
return;
|
||||
}
|
||||
|
||||
if(jsonData["ERROR"] !== undefined || jsonData["RESULT"] === undefined) {
|
||||
console.log(jsonData["ERROR"]);
|
||||
return;
|
||||
}
|
||||
|
||||
if(jsonData["RESULT"] === "fail") {
|
||||
console.log(jsonData["RESULT"]);
|
||||
return;
|
||||
}
|
||||
|
||||
// console.log(jsonData["PlayerList"]);
|
||||
self.list.updatePlayerList(jsonData["PlayerList"]);
|
||||
|
||||
self.playerCount = jsonData["PlayerList"].length;
|
||||
// self.lastPageNo = Math.ceil( (self.playerCount + 1) / 10 );
|
||||
// self.activePageNo = 1;
|
||||
|
||||
self.listNavigator.updateNavigator(self.activePageNo, self.lastPageNo);
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
@@ -429,50 +214,6 @@
|
||||
}
|
||||
|
||||
);
|
||||
|
||||
|
||||
/*
|
||||
let xhr = new XMLHttpRequest(); //new로 생성.
|
||||
xhr.open('POST', './../server/player/edit_player.php', true);
|
||||
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
|
||||
xhr.send("maestro_id=" + maestroID + "&player_id=" + playerID + "&player_name=" + playerName + "&enter_code=" + playerEnterCode);
|
||||
xhr.onload = function() {
|
||||
if(xhr.readyState === 4 && xhr.status === 200) {
|
||||
// console.log(xhr.responseText);
|
||||
// console.log(xhr.responseText.length);
|
||||
if(xhr.responseText.length === 0 || xhr.responseText === null) {
|
||||
console.log("no data from server");
|
||||
return;
|
||||
}
|
||||
|
||||
let jsonData = JSON.parse(xhr.responseText);
|
||||
// console.log(jsonData);
|
||||
|
||||
if(jsonData === null) {
|
||||
console.log("no data from server");
|
||||
return;
|
||||
}
|
||||
|
||||
if(jsonData["ERROR"] !== undefined || jsonData["RESULT"] === undefined) {
|
||||
console.log(jsonData["ERROR"]);
|
||||
return;
|
||||
}
|
||||
|
||||
if(jsonData["RESULT"] === "fail") {
|
||||
console.log(jsonData["RESULT"]);
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(clickedObjectID);
|
||||
if(clickedObjectID === "add_player_list") {
|
||||
self.setupAddPlayerList();
|
||||
} else if(clickedObjectID === "search_player_list") {
|
||||
let playerName = $("#search_name").val();
|
||||
self.setupSearchPlayerList(playerName);
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
deletePlayer(inputButton) {
|
||||
@@ -506,50 +247,6 @@
|
||||
}
|
||||
|
||||
);
|
||||
|
||||
|
||||
/*
|
||||
let xhr = new XMLHttpRequest(); //new로 생성.
|
||||
xhr.open('POST', './../server/player/delete_player.php', true);
|
||||
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
|
||||
xhr.send("maestro_id=" + maestroID + "&player_id=" + playerID);
|
||||
xhr.onload = function() {
|
||||
if(xhr.readyState === 4 && xhr.status === 200) {
|
||||
// console.log(xhr.responseText);
|
||||
// console.log(xhr.responseText.length);
|
||||
if(xhr.responseText.length === 0 || xhr.responseText === null) {
|
||||
console.log("no data from server");
|
||||
return;
|
||||
}
|
||||
|
||||
let jsonData = JSON.parse(xhr.responseText);
|
||||
// console.log(jsonData);
|
||||
|
||||
if(jsonData === null) {
|
||||
console.log("no data from server");
|
||||
return;
|
||||
}
|
||||
|
||||
if(jsonData["ERROR"] !== undefined || jsonData["RESULT"] === undefined) {
|
||||
console.log(jsonData["ERROR"]);
|
||||
return;
|
||||
}
|
||||
|
||||
if(jsonData["RESULT"] === "fail") {
|
||||
console.log(jsonData["RESULT"]);
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(clickedObjectID);
|
||||
if(clickedObjectID === "add_player_list") {
|
||||
self.setupAddPlayerList();
|
||||
} else if(clickedObjectID === "search_player_list") {
|
||||
let playerName = $("#search_name").val();
|
||||
self.setupSearchPlayerList(playerName);
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
getClickedObjectID(clickedObject) {
|
||||
|
||||
Reference in New Issue
Block a user