Fix: apply bootstrap - mouse, typing app
This commit is contained in:
@@ -53,6 +53,8 @@ class PlayerList {
|
|||||||
$(item.playerID).empty();
|
$(item.playerID).empty();
|
||||||
$(item.playerName).prop("disabled", true);
|
$(item.playerName).prop("disabled", true);
|
||||||
$(item.enterCode).prop("disabled", true);
|
$(item.enterCode).prop("disabled", true);
|
||||||
|
// $(item.playerName).prop("readonly", true);
|
||||||
|
// $(item.enterCode).prop("readonly", true);
|
||||||
$(item.editButton).prop("disabled", true);
|
$(item.editButton).prop("disabled", true);
|
||||||
$(item.deleteButton).prop("disabled", true);
|
$(item.deleteButton).prop("disabled", true);
|
||||||
}
|
}
|
||||||
@@ -60,6 +62,8 @@ class PlayerList {
|
|||||||
enableItem(item) {
|
enableItem(item) {
|
||||||
$(item.playerName).prop("disabled", false);
|
$(item.playerName).prop("disabled", false);
|
||||||
$(item.enterCode).prop("disabled", false);
|
$(item.enterCode).prop("disabled", false);
|
||||||
|
// $(item.playerName).prop("readonly", false);
|
||||||
|
// $(item.enterCode).prop("readonly", false);
|
||||||
$(item.editButton).prop("disabled", false);
|
$(item.editButton).prop("disabled", false);
|
||||||
$(item.deleteButton).prop("disabled", false);
|
$(item.deleteButton).prop("disabled", false);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,9 +22,7 @@ function loadMaestroExperienceAccount() {
|
|||||||
},
|
},
|
||||||
|
|
||||||
(errorMessage, errorCode) => {
|
(errorMessage, errorCode) => {
|
||||||
if($("#error_message").length) {
|
showErrorMessage(errorMessage, "error");
|
||||||
$("#error_message").text(errorMessage);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -69,15 +69,15 @@ function onChangePlayerCount() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tab-pane fade my-3" id="search" role="tabpanel" aria-labelledby="search-tab">
|
<div class="tab-pane fade my-3" id="search" role="tabpanel" aria-labelledby="search-tab">
|
||||||
<div id="section_search_player" class="hide"></div>
|
<div id="section_search_player"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tab-pane fade my-3" id="mouse" role="tabpanel" aria-labelledby="mouse-tab">
|
<div class="tab-pane fade my-3" id="mouse" role="tabpanel" aria-labelledby="mouse-tab">
|
||||||
<div id="mouse_app_list" class="hide"></div>
|
<div id="mouse_app_list"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tab-pane fade my-3" id="typing" role="tabpanel" aria-labelledby="typing-tab">
|
<div class="tab-pane fade my-3" id="typing" role="tabpanel" aria-labelledby="typing-tab">
|
||||||
<div id="typing_app_list" class="hide"></div>
|
<div id="typing_app_list"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -17,9 +17,7 @@ function loadMouseApp() {
|
|||||||
},
|
},
|
||||||
|
|
||||||
(errorMessage, errorCode) => {
|
(errorMessage, errorCode) => {
|
||||||
if($("#error_message").length) {
|
showErrorMessage(errorMessage, "error");
|
||||||
$("#error_message").text(errorMessage);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
);
|
);
|
||||||
@@ -31,14 +29,24 @@ function makeMouseAppList(appList) {
|
|||||||
for(let i = 0; i < appList.length; i++) {
|
for(let i = 0; i < appList.length; i++) {
|
||||||
let appData = appList[i];
|
let appData = appList[i];
|
||||||
|
|
||||||
$("#mouse_app_content").append(
|
$("#mouse_app_content").append('\
|
||||||
|
<div class="form-check col col-sm-2">\
|
||||||
|
<input class="form-check-input" type="checkbox" id="' + appData.appID + '" data-app-id="' + appData.appID + '" value="">\
|
||||||
|
<label class="form-check-label" for="' + appData.appID + '">\
|
||||||
|
' + appData.koreanName + '\
|
||||||
|
</label>\
|
||||||
|
</div>\
|
||||||
|
\
|
||||||
|
');
|
||||||
|
/*
|
||||||
"<span>"
|
"<span>"
|
||||||
+ "<input type='checkbox' id='checkbox" + appData.appID + "' data-app-id='" + appData.appID + "' />"
|
+ "<input type='checkbox' id='checkbox" + appData.appID + "' data-app-id='" + appData.appID + "' />"
|
||||||
+ "<label for='checkbox" + appData.appID + "'>" + appData.koreanName + "</label>"
|
+ "<label for='checkbox" + appData.appID + "'>" + appData.koreanName + "</label>"
|
||||||
+ "</span>"
|
+ "</span>"
|
||||||
);
|
);
|
||||||
|
*/
|
||||||
|
|
||||||
$("#checkbox" + appData.appID).change(function() {
|
$("#" + appData.appID).change(function() {
|
||||||
if($(this).is(":checked")) {
|
if($(this).is(":checked")) {
|
||||||
activateApp($(this).data("appId"));
|
activateApp($(this).data("appId"));
|
||||||
} else {
|
} else {
|
||||||
@@ -52,7 +60,7 @@ function activateMouseApp(activatedList) {
|
|||||||
for(let i = 0; i < activatedList.length; i++) {
|
for(let i = 0; i < activatedList.length; i++) {
|
||||||
let activatedAppID = activatedList[i].appID;
|
let activatedAppID = activatedList[i].appID;
|
||||||
|
|
||||||
let input = $("#checkbox" + activatedAppID);
|
let input = $("#" + activatedAppID);
|
||||||
input.prop("checked", true);
|
input.prop("checked", true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -68,9 +76,8 @@ function activateApp(appID) {
|
|||||||
},
|
},
|
||||||
|
|
||||||
(errorMessage, errorCode) => {
|
(errorMessage, errorCode) => {
|
||||||
if($("#error_message").length) {
|
console.log("errorMessage : " + errorMessage);
|
||||||
$("#error_message").text(errorMessage);
|
showErrorMessage(errorMessage, "error");
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
);
|
);
|
||||||
@@ -86,9 +93,8 @@ function deactivateApp(appID) {
|
|||||||
},
|
},
|
||||||
|
|
||||||
(errorMessage, errorCode) => {
|
(errorMessage, errorCode) => {
|
||||||
if($("#error_message").length) {
|
console.log("errorMessage : " + errorMessage);
|
||||||
$("#error_message").text(errorMessage);
|
showErrorMessage(errorMessage, "error");
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
);
|
);
|
||||||
@@ -98,21 +104,15 @@ function deactivateApp(appID) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div id="mouse_app_content">
|
<div class="row mx-1">
|
||||||
|
<div class="col">
|
||||||
|
|
||||||
<span>
|
<h5 class="mt-2 mb-2">마우스 연습</h5>
|
||||||
<input type="checkbox" id="checkbox1" checked="checked" />
|
|
||||||
<label for="checkbox1">Option 1</label>
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<span>
|
<form class="mx-4">
|
||||||
<input type="checkbox" id="checkbox2" checked="checked" />
|
<div class="form-row" id="mouse_app_content">
|
||||||
<label for="checkbox2">Option 2</label>
|
</div>
|
||||||
</span>
|
</form>
|
||||||
|
|
||||||
<span>
|
|
||||||
<input type="checkbox" id="checkbox3" checked="checked" />
|
|
||||||
<label for="checkbox3">Option 3</label>
|
|
||||||
</span>
|
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -17,10 +17,7 @@ function loadTypingApp() {
|
|||||||
},
|
},
|
||||||
|
|
||||||
(errorMessage, errorCode) => {
|
(errorMessage, errorCode) => {
|
||||||
console.log(errorMessage);
|
showErrorMessage(errorMessage, "error");
|
||||||
if($("#error_message").length) {
|
|
||||||
$("#error_message").text(errorMessage);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
);
|
);
|
||||||
@@ -49,14 +46,18 @@ function makeTypingAppList(appList) {
|
|||||||
divTag = $("#typing_test_eng");
|
divTag = $("#typing_test_eng");
|
||||||
else
|
else
|
||||||
divTag = $("#typing_app");
|
divTag = $("#typing_app");
|
||||||
divTag.append(
|
|
||||||
"<span>"
|
|
||||||
+ "<input type='checkbox' id='checkbox" + appData.appID + "' data-app-id='" + appData.appID + "' />"
|
|
||||||
+ "<label for='checkbox" + appData.appID + "'>" + appData.koreanName + "</label>"
|
|
||||||
+ "</span>"
|
|
||||||
);
|
|
||||||
|
|
||||||
$("#checkbox" + appData.appID).change(function() {
|
divTag.append('\
|
||||||
|
<div class="form-check col col-sm-2">\
|
||||||
|
<input class="form-check-input" type="checkbox" id="' + appData.appID + '" data-app-id="' + appData.appID + '" value="">\
|
||||||
|
<label class="form-check-label" for="' + appData.appID + '">\
|
||||||
|
' + appData.koreanName + '\
|
||||||
|
</label>\
|
||||||
|
</div>\
|
||||||
|
\
|
||||||
|
');
|
||||||
|
|
||||||
|
$("#" + appData.appID).change(function() {
|
||||||
if($(this).is(":checked")) {
|
if($(this).is(":checked")) {
|
||||||
activateApp($(this).data("appId"));
|
activateApp($(this).data("appId"));
|
||||||
} else {
|
} else {
|
||||||
@@ -70,7 +71,7 @@ function activateTypingApp(activatedList) {
|
|||||||
for(let i = 0; i < activatedList.length; i++) {
|
for(let i = 0; i < activatedList.length; i++) {
|
||||||
let activatedAppID = activatedList[i].appID;
|
let activatedAppID = activatedList[i].appID;
|
||||||
|
|
||||||
let input = $("#checkbox" + activatedAppID);
|
let input = $("#" + activatedAppID);
|
||||||
input.prop("checked", true);
|
input.prop("checked", true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -79,23 +80,42 @@ function activateTypingApp(activatedList) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div id="typing_app_content">
|
<div class="row mx-1">
|
||||||
|
<div class="col">
|
||||||
|
|
||||||
|
<h5 class="mt-2 mb-2">자리 연습</h5>
|
||||||
|
<form class="mx-4">
|
||||||
|
<p class="lead mb-0">한글</p>
|
||||||
|
<hr class="my-1"/>
|
||||||
|
<div class="form-row" id="typing_practice_kor">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p class="lead mt-3 mb-0">English</p>
|
||||||
|
<hr class="my-1"/>
|
||||||
|
<div class="form-row" id="typing_practice_eng">
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
|
||||||
|
<h5 class="mt-4 mb-2">타자 시험</h5>
|
||||||
|
<form class="mx-4">
|
||||||
|
<p class="lead mb-0">한글</p>
|
||||||
|
<hr class="my-1"/>
|
||||||
|
<div class="form-row" id="typing_test_kor">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p class="lead mt-3 mb-0">English</p>
|
||||||
|
<hr class="my-1"/>
|
||||||
|
<div class="form-row" id="typing_test_eng">
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
|
||||||
|
<h5 class="mt-4 mb-2">타자 앱</h5>
|
||||||
|
<form class="mx-4">
|
||||||
|
<div class="form-row" id="typing_app">
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
<div>
|
|
||||||
<h1>자리 연습</h1>
|
|
||||||
<div id="typing_practice_kor"></div>
|
|
||||||
<div id="typing_practice_eng"></div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
|
||||||
<h1>타자 시험</h1>
|
|
||||||
<div id="typing_test_kor"></div>
|
|
||||||
<div id="typing_test_eng"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<h1>타자 앱</h1>
|
|
||||||
<div id="typing_app"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -1,17 +1,18 @@
|
|||||||
<?php
|
<?php
|
||||||
header('Content-Type: application/json');
|
header('Content-Type: application/json');
|
||||||
|
|
||||||
|
include "./../lib/send_reply_json.php";
|
||||||
|
include "./../setup/connect_db.php";
|
||||||
|
|
||||||
$maestroID = $_POST["maestro_id"];
|
$maestroID = $_POST["maestro_id"];
|
||||||
$appID = $_POST["app_id"];
|
$appID = $_POST["app_id"];
|
||||||
|
|
||||||
include "./../setup/connect_db.php";
|
|
||||||
|
|
||||||
|
|
||||||
activate_app($maestroID, $appID);
|
activate_app($maestroID, $appID);
|
||||||
|
|
||||||
$replyJSON["RESULT"] = "ok";
|
set_data("activatedAppList", $activated_mouse_app_list);
|
||||||
echo json_encode($replyJSON, JSON_UNESCAPED_UNICODE);
|
send_result_success();
|
||||||
$db_conn->close();
|
exit;
|
||||||
|
|
||||||
|
|
||||||
function activate_app($maestroID, $appID) {
|
function activate_app($maestroID, $appID) {
|
||||||
|
|||||||
@@ -1,17 +1,18 @@
|
|||||||
<?php
|
<?php
|
||||||
header('Content-Type: application/json');
|
header('Content-Type: application/json');
|
||||||
|
|
||||||
|
include "./../lib/send_reply_json.php";
|
||||||
|
include "./../setup/connect_db.php";
|
||||||
|
|
||||||
$maestroID = $_POST["maestro_id"];
|
$maestroID = $_POST["maestro_id"];
|
||||||
$appID = $_POST["app_id"];
|
$appID = $_POST["app_id"];
|
||||||
|
|
||||||
include "./../setup/connect_db.php";
|
|
||||||
|
|
||||||
|
|
||||||
deactivate_app($maestroID, $appID);
|
deactivate_app($maestroID, $appID);
|
||||||
|
|
||||||
$replyJSON["RESULT"] = "ok";
|
set_data("activatedAppList", $activated_mouse_app_list);
|
||||||
echo json_encode($replyJSON, JSON_UNESCAPED_UNICODE);
|
send_result_success();
|
||||||
$db_conn->close();
|
exit;
|
||||||
|
|
||||||
|
|
||||||
function deactivate_app($maestroID, $appID) {
|
function deactivate_app($maestroID, $appID) {
|
||||||
|
|||||||
Reference in New Issue
Block a user