Fix: apply bootstrap - mouse, typing app
This commit is contained in:
@@ -17,9 +17,7 @@ function loadMouseApp() {
|
||||
},
|
||||
|
||||
(errorMessage, errorCode) => {
|
||||
if($("#error_message").length) {
|
||||
$("#error_message").text(errorMessage);
|
||||
}
|
||||
showErrorMessage(errorMessage, "error");
|
||||
}
|
||||
|
||||
);
|
||||
@@ -31,14 +29,24 @@ function makeMouseAppList(appList) {
|
||||
for(let i = 0; i < appList.length; 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>"
|
||||
+ "<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() {
|
||||
$("#" + appData.appID).change(function() {
|
||||
if($(this).is(":checked")) {
|
||||
activateApp($(this).data("appId"));
|
||||
} else {
|
||||
@@ -52,7 +60,7 @@ function activateMouseApp(activatedList) {
|
||||
for(let i = 0; i < activatedList.length; i++) {
|
||||
let activatedAppID = activatedList[i].appID;
|
||||
|
||||
let input = $("#checkbox" + activatedAppID);
|
||||
let input = $("#" + activatedAppID);
|
||||
input.prop("checked", true);
|
||||
}
|
||||
}
|
||||
@@ -68,9 +76,8 @@ function activateApp(appID) {
|
||||
},
|
||||
|
||||
(errorMessage, errorCode) => {
|
||||
if($("#error_message").length) {
|
||||
$("#error_message").text(errorMessage);
|
||||
}
|
||||
console.log("errorMessage : " + errorMessage);
|
||||
showErrorMessage(errorMessage, "error");
|
||||
}
|
||||
|
||||
);
|
||||
@@ -86,9 +93,8 @@ function deactivateApp(appID) {
|
||||
},
|
||||
|
||||
(errorMessage, errorCode) => {
|
||||
if($("#error_message").length) {
|
||||
$("#error_message").text(errorMessage);
|
||||
}
|
||||
console.log("errorMessage : " + 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>
|
||||
<input type="checkbox" id="checkbox1" checked="checked" />
|
||||
<label for="checkbox1">Option 1</label>
|
||||
</span>
|
||||
<h5 class="mt-2 mb-2">마우스 연습</h5>
|
||||
|
||||
<span>
|
||||
<input type="checkbox" id="checkbox2" checked="checked" />
|
||||
<label for="checkbox2">Option 2</label>
|
||||
</span>
|
||||
|
||||
<span>
|
||||
<input type="checkbox" id="checkbox3" checked="checked" />
|
||||
<label for="checkbox3">Option 3</label>
|
||||
</span>
|
||||
<form class="mx-4">
|
||||
<div class="form-row" id="mouse_app_content">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user