Fix: move player enter code edit from player list tab to app setting tab
This commit is contained in:
@@ -7,10 +7,6 @@ $(document).ready(function() {
|
||||
}
|
||||
});
|
||||
|
||||
// checkbox-allow-edit-entercode
|
||||
setCheckboxEvent();
|
||||
loadAllowEditEnterCode();
|
||||
|
||||
addPlayerListManager = new PlayerListManager(
|
||||
$("#add_player_list"),
|
||||
// $(".pagination")
|
||||
@@ -20,57 +16,6 @@ $(document).ready(function() {
|
||||
addPlayerListManager.setupAddPlayerList();
|
||||
});
|
||||
|
||||
function setCheckboxEvent() {
|
||||
$("#checkbox-allow-edit-entercode").change(function() {
|
||||
if($(this).is(":checked")) {
|
||||
changeAllowEditEnterCode(true);
|
||||
} else {
|
||||
changeAllowEditEnterCode(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function changeAllowEditEnterCode(isActivated) {
|
||||
var allowEditEnterCode = isActivated ? 1 : 0;
|
||||
|
||||
sendRequestServer( //url, sendParams, onSuccess, onFail, isDebugMode);
|
||||
"./../server/maestro/set_allow_edit_entercode.php",
|
||||
"maestro_id=" + maestroID + "&allowEditEnterCode=" + allowEditEnterCode,
|
||||
|
||||
(function(jsonData) {
|
||||
// console.log(jsonData);
|
||||
if(jsonData["isActivated"] == "0")
|
||||
showErrorMessage("학생 로그인 후 나오는 메뉴 화면(우상단)에 있던 [설정]버튼을 숨겼습니다.<br/>마에스트로만 학생들의 입장번호를 수정할 수 있습니다.", "error");
|
||||
else
|
||||
showErrorMessage("학생 로그인 후 나오는 메뉴 화면(우상단)에, [설정]버튼을 활성화 시켰습니다.<br/>[설정] 버튼을 눌러 설정 화면에 들어가면, 학생이 자신의 입장번호를 바꿀 수 있습니다.", "success");
|
||||
}),
|
||||
|
||||
(function(errorMessage, errorCode) {
|
||||
showErrorMessage(errorMessage, "error");
|
||||
})
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
function loadAllowEditEnterCode() {
|
||||
sendRequestServer( //url, sendParams, onSuccess, onFail, isDebugMode);
|
||||
"./../server/maestro/get_allow_edit_entercode.php",
|
||||
"maestro_id=" + maestroID,
|
||||
|
||||
(function(jsonData) {
|
||||
var flag = jsonData["AllowEditEnterCode"];
|
||||
if(flag) {
|
||||
$("#checkbox-allow-edit-entercode").prop("checked", true);
|
||||
}
|
||||
}),
|
||||
|
||||
(function(errorMessage, errorCode) {
|
||||
showErrorMessage(errorMessage, "error");
|
||||
})
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
function addPlayer() {
|
||||
var playerName = $("#player_name").val();
|
||||
var enterCode = $("#entercode").val();
|
||||
@@ -165,14 +110,10 @@ function onErrorPlayerPW(message) {
|
||||
|
||||
<!--
|
||||
<h5 class="my-3">학생 추가 (임시 입장번호 발급)</h5>
|
||||
|
||||
<form class="mx-2">
|
||||
<div class="form-group row">
|
||||
<label for="simple_player_name" class="col-sm-3 col-form-label">이름</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control col-sm-9 disabled" id="player_name" placeholder="이름 입력">
|
||||
<small class="form-text text-muted">1~8 글자 / [ 한글,영문,숫자,-,_ ]</small>
|
||||
<button type="button" class="col-sm-7 btn btn-primary btn-lg mt-3 disabled" onClick="addPlayer()">추가</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -180,25 +121,10 @@ function onErrorPlayerPW(message) {
|
||||
-->
|
||||
|
||||
|
||||
<h5 class="my-3">학생 입장번호 변경 설정 활성화</h5>
|
||||
<div clas됩="row mx-4">
|
||||
<div class="col">
|
||||
<div class="form-check col">
|
||||
<input class="form-check-input" type="checkbox" id="checkbox-allow-edit-entercode" data-app-id="checkbox-allow-edit-entercode" value="">
|
||||
<label class="form-check-label" for="checkbox-allow-edit-entercode">
|
||||
학생 로그인 후, 설정 화면에서 입장번호 변경을 허용
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!--
|
||||
<div class="divider"></div>
|
||||
|
||||
<h5 class="mt-5">학생 단체 등록</h5>
|
||||
|
||||
<form class="mx-2">
|
||||
<div class="form-group row">
|
||||
<div class="col">
|
||||
@@ -212,13 +138,11 @@ function onErrorPlayerPW(message) {
|
||||
<button type="button" class="btn btn-primary btn-lg disabled" onClick="addPlayer()">단체 목록 추가</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<div class="divider"></div>
|
||||
|
||||
<h5 class="mt-5">학생 전체 삭제</h5>
|
||||
|
||||
<div class="mx-2 mb-2">등록된 모든 학생들의 정보를 삭제합니다.</div>
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-sm offset-md-3">
|
||||
@@ -232,13 +156,14 @@ function onErrorPlayerPW(message) {
|
||||
|
||||
<div class="col-7 border border-warning rounded" style="background-color: #ffeab6">
|
||||
<h5 class="mt-3">학생 목록</h5>
|
||||
|
||||
<form id="add_player_list">
|
||||
<div class="form-group row mx-2 my-0 text-center">
|
||||
<label class="col-form-label d-none">ID</label>
|
||||
<label class="col-form-label col-sm">이 름</label>
|
||||
<label class="col-form-label col-sm">입장번호</label>
|
||||
<label class="col-form-label px-0 col-sm-2 pr-2 text-right">수정 삭제</label>
|
||||
<!--
|
||||
<!--
|
||||
<label class="col-form-label px-0 col-sm-1">수정</label>
|
||||
<label class="col-form-label px-0 col-sm-1">삭제</label>
|
||||
-->
|
||||
|
||||
Reference in New Issue
Block a user