From 3f97b1eac3f5d02c9c4900f9f04ccb56aad1e6fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8B=E1=85=A2=E1=84=91=E1=85=B3=E1=86=AF=20=E1=84=82?= =?UTF-8?q?=E1=85=A9=E1=84=90=E1=85=B3=E1=84=87=E1=85=AE=E1=86=A8?= Date: Tue, 3 Jul 2018 18:25:04 +0900 Subject: [PATCH] Fix: disable unused input, buttons --- src/web/css/maestro_main.css | 24 +++++------- src/web/js/player_list.js | 23 ++++++++--- .../module/maestro_section_add_player.html | 10 ++--- src/web/module/maestro_section_search.html | 38 ++++++++++--------- 4 files changed, 53 insertions(+), 42 deletions(-) diff --git a/src/web/css/maestro_main.css b/src/web/css/maestro_main.css index 49098ec..3feacce 100644 --- a/src/web/css/maestro_main.css +++ b/src/web/css/maestro_main.css @@ -41,50 +41,46 @@ vertical-align: top; } -#registered_player_list { +.player_list { list-style: none; } -#registered_player_list { - list-style: none; -} - -#registered_player_list > li > span { +.player_list > li > span { line-height: normal; } -#registered_player_list > li > .player_id { +.player_list > li > .player_id { display: none; } -#registered_player_list .player_id { +.player_list .player_id { background-color: #ffffff; } -#registered_player_list .player_name { +.player_list .player_name { width: 200px; background-color: #ffdddd; } -#registered_player_list .player_entercode { +.player_list .player_entercode { width: 200px; background-color: #ddffdd; } -#registered_player_list .registered_player_update { +.player_list .player_update { width: 200px; background-color: #ddddff; } -#player_list_navigator { +.player_list_navigator { text-align: center; } -#player_list_navigator > span { +.player_list_navigator > span { line-height: normal; } -#player_list_navigator a { +.player_list_navigator > span > a { cursor: pointer; } diff --git a/src/web/js/player_list.js b/src/web/js/player_list.js index 748c36e..81a3b5d 100644 --- a/src/web/js/player_list.js +++ b/src/web/js/player_list.js @@ -15,7 +15,7 @@ class PlayerList { constructor(parent) { let self = this; this.listParent = parent; - // console.log(parent); + console.log(parent); let id_list = parent.find(".player_id"); // console.log(id_list); @@ -30,6 +30,8 @@ class PlayerList { $(id_list[i]).siblings(".player_delete") ); + this.disableItem(this.listRows[i]); + $(id_list[i]).siblings(".player_edit").click(function() { self.editPlayer(this); }) @@ -42,11 +44,20 @@ class PlayerList { } } + disableItem(item) { + $(item.playerID).empty(); + $(item.playerName).prop("disabled", true); + $(item.enterCode).prop("disabled", true); + $(item.editButton).prop("disabled", true); + $(item.deleteButton).prop("disabled", true); + } + updatePlayerList(jsonData) { // console.log(jsonData); for(let i = 0; i < 10; i++) { - $(this.listRows[i].playerID).empty(); + // $(this.listRows[i].playerID).empty(); + this.disableItem(this.listRows[i]); if(i < jsonData.length) { $(this.listRows[i].playerID).append(jsonData[i]["UserID"]); @@ -61,13 +72,13 @@ class PlayerList { $(this.listRows[i].deleteButton).prop("disabled", false); } else { $(this.listRows[i].playerName).val(""); - $(this.listRows[i].playerName).prop("disabled", true); + // $(this.listRows[i].playerName).prop("disabled", true); $(this.listRows[i].enterCode).val(""); - $(this.listRows[i].enterCode).prop("disabled", true); + // $(this.listRows[i].enterCode).prop("disabled", true); - $(this.listRows[i].editButton).prop("disabled", true); - $(this.listRows[i].deleteButton).prop("disabled", true); + // $(this.listRows[i].editButton).prop("disabled", true); + // $(this.listRows[i].deleteButton).prop("disabled", true); } } } diff --git a/src/web/module/maestro_section_add_player.html b/src/web/module/maestro_section_add_player.html index aebc10a..e00a410 100644 --- a/src/web/module/maestro_section_add_player.html +++ b/src/web/module/maestro_section_add_player.html @@ -1,7 +1,7 @@  @@ -12,18 +13,21 @@ $(document).ready(function() {

+ + 검색 결과
-
    +
    • 이름 입장 코드 @@ -34,79 +38,79 @@ $(document).ready(function() { - +
    • - +
    • - +
    • - +
    • - +
    • - +
    • - +
    • - +
    • - +
    • - +
-
- << - < - - > - >> + \ No newline at end of file