Fix: player list navigator refactoring

This commit is contained in:
2018-07-28 23:30:32 +09:00
parent 7d463fc292
commit d0be19ef0a
7 changed files with 296 additions and 298 deletions
+114 -115
View File
@@ -3,8 +3,8 @@
$(document).ready(function() {
searchPlayerListManager = new PlayerListManager(
$("#search_player_list"),
// $("#search_player_list_navigator > #page_no_area")
$(".pagination")
// $(".pagination")
$("[aria-label='search_player_list'] > .pagination")
);
});
@@ -25,119 +25,125 @@ function searchPlayer() {
<div class="row mx-1">
<div class="col">
<div id="message_box"></div>
</div>
</div>
<div class="col-5">
<h5 class="my-3">학생 검색</h5>
<span id="search_player_name">
<h1>검색</h1>
학생 이름
<input type="text" id="search_name"><input type="submit" name="찾기" onClick="searchPlayer()"><br/>
<br/>
</span>
<span id="search_result">
검색 결과
<div id="player_list_result_contents">
<form id="search_player_list">
<div class="form-group row mx-2">
<label class="col-form-label text-center d-none">ID</label>
<label class="col-form-label text-center col-sm">이름</label>
<label class="col-form-label text-center col-sm">입장번호</label>
<label class="col-form-label text-center col-sm-1"></label>
<label class="col-form-label text-center col-sm-1"></label>
<form class="mx-2">
<div class="form-group row">
<label for="search_name" class="col-sm-3 col-form-label">이름</label>
<div class="col-sm-9">
<input type="text" class="form-control col-sm-9" id="search_name" placeholder="이름 입력">
<!-- <small class="form-text text-muted">1~8 글자 / [ 한글,영문,숫자,-,_ ]</small> -->
</div>
</div>
<div class="form-group player-list row mx-2">
<input type="text" class="player_id d-none" value="test1">
<input type="text" class="player_name col-sm" value="test">
<input type="text" class="player_entercode col-sm" value="test">
<input type="button" class="player_edit col-sm-1" value="+">
<input type="button" class="player_delete col-sm-1" value="-">
<div class="form-group row">
<div class="offset-sm-3 col-sm-9">
<button type="button" class="col-sm-7 btn btn-primary btn-lg mt-3" onClick="searchPlayer()">검색</button>
</div>
</div>
<div class="form-group player-list row mx-2">
<input type="text" class="player_id d-none" value="test2">
<input type="text" class="player_name col-sm" value="test">
<input type="text" class="player_entercode col-sm" value="test">
<input type="button" class="player_edit col-sm-1" value="+">
<input type="button" class="player_delete col-sm-1" value="-">
</div>
</form>
<div class="form-group player-list row mx-2">
<input type="text" class="player_id d-none" value="test3">
<input type="text" class="player_name col-sm" value="test">
<input type="text" class="player_entercode col-sm" value="test">
<input type="button" class="player_edit col-sm-1" value="+">
<input type="button" class="player_delete col-sm-1" value="-">
</div>
<div class="form-group player-list row mx-2">
<input type="text" class="player_id d-none" value="test4">
<input type="text" class="player_name col-sm" value="test">
<input type="text" class="player_entercode col-sm" value="test">
<input type="button" class="player_edit col-sm-1" value="+">
<input type="button" class="player_delete col-sm-1" value="-">
</div>
<div class="form-group player-list row mx-2">
<input type="text" class="player_id d-none" value="test5">
<input type="text" class="player_name col-sm" value="test">
<input type="text" class="player_entercode col-sm" value="test">
<input type="button" class="player_edit col-sm-1" value="+">
<input type="button" class="player_delete col-sm-1" value="-">
</div>
<div class="form-group player-list row mx-2">
<input type="text" class="player_id d-none" value="test6">
<input type="text" class="player_name col-sm" value="test">
<input type="text" class="player_entercode col-sm" value="test">
<input type="button" class="player_edit col-sm-1" value="+">
<input type="button" class="player_delete col-sm-1" value="-">
</div>
<div class="form-group player-list row mx-2">
<input type="text" class="player_id d-none" value="test7">
<input type="text" class="player_name col-sm" value="test">
<input type="text" class="player_entercode col-sm" value="test">
<input type="button" class="player_edit col-sm-1" value="+">
<input type="button" class="player_delete col-sm-1" value="-">
</div>
<div class="form-group player-list row mx-2">
<input type="text" class="player_id d-none" value="test8">
<input type="text" class="player_name col-sm" value="test">
<input type="text" class="player_entercode col-sm" value="test">
<input type="button" class="player_edit col-sm-1" value="+">
<input type="button" class="player_delete col-sm-1" value="-">
</div>
<div class="form-group player-list row mx-2">
<input type="text" class="player_id d-none" value="test9">
<input type="text" class="player_name col-sm" value="test">
<input type="text" class="player_entercode col-sm" value="test">
<input type="button" class="player_edit col-sm-1" value="+">
<input type="button" class="player_delete col-sm-1" value="-">
</div>
<div class="form-group player-list row mx-2">
<input type="text" class="player_id d-none" value="test10">
<input type="text" class="player_name col-sm" value="test">
<input type="text" class="player_entercode col-sm" value="test">
<input type="button" class="player_edit col-sm-1" value="+">
<input type="button" class="player_delete col-sm-1" value="-">
</div>
</form>
</div> <!-- 학생 검색 -->
<nav>
<div class="col-7" style="background-color: #ffce54">
<h5 class="my-3">검색 결과</h5>
<form id="search_player_list">
<div class="form-group row mx-2 mb-0 font-weight-bold">
<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 col-sm-1"></label>
<label class="col-form-label col-sm-1"></label>
</div>
<div class="form-group player-list row mx-2 mb-1">
<input type="text" class="player_id d-none" value="test1">
<input type="text" class="player_name col-sm" value="test">
<input type="text" class="player_entercode col-sm" value="test">
<input type="button" class="player_edit col-sm-1" value="+">
<input type="button" class="player_delete col-sm-1" value="-">
</div>
<div class="form-group player-list row mx-2 mb-1">
<input type="text" class="player_id d-none" value="test2">
<input type="text" class="player_name col-sm" value="test">
<input type="text" class="player_entercode col-sm" value="test">
<input type="button" class="player_edit col-sm-1" value="+">
<input type="button" class="player_delete col-sm-1" value="-">
</div>
<div class="form-group player-list row mx-2 mb-1">
<input type="text" class="player_id d-none" value="test3">
<input type="text" class="player_name col-sm" value="test">
<input type="text" class="player_entercode col-sm" value="test">
<input type="button" class="player_edit col-sm-1" value="+">
<input type="button" class="player_delete col-sm-1" value="-">
</div>
<div class="form-group player-list row mx-2 mb-1">
<input type="text" class="player_id d-none" value="test4">
<input type="text" class="player_name col-sm" value="test">
<input type="text" class="player_entercode col-sm" value="test">
<input type="button" class="player_edit col-sm-1" value="+">
<input type="button" class="player_delete col-sm-1" value="-">
</div>
<div class="form-group player-list row mx-2 mb-1">
<input type="text" class="player_id d-none" value="test5">
<input type="text" class="player_name col-sm" value="test">
<input type="text" class="player_entercode col-sm" value="test">
<input type="button" class="player_edit col-sm-1" value="+">
<input type="button" class="player_delete col-sm-1" value="-">
</div>
<div class="form-group player-list row mx-2 mb-1">
<input type="text" class="player_id d-none" value="test6">
<input type="text" class="player_name col-sm" value="test">
<input type="text" class="player_entercode col-sm" value="test">
<input type="button" class="player_edit col-sm-1" value="+">
<input type="button" class="player_delete col-sm-1" value="-">
</div>
<div class="form-group player-list row mx-2 mb-1">
<input type="text" class="player_id d-none" value="test7">
<input type="text" class="player_name col-sm" value="test">
<input type="text" class="player_entercode col-sm" value="test">
<input type="button" class="player_edit col-sm-1" value="+">
<input type="button" class="player_delete col-sm-1" value="-">
</div>
<div class="form-group player-list row mx-2 mb-1">
<input type="text" class="player_id d-none" value="test8">
<input type="text" class="player_name col-sm" value="test">
<input type="text" class="player_entercode col-sm" value="test">
<input type="button" class="player_edit col-sm-1" value="+">
<input type="button" class="player_delete col-sm-1" value="-">
</div>
<div class="form-group player-list row mx-2 mb-1">
<input type="text" class="player_id d-none" value="test9">
<input type="text" class="player_name col-sm" value="test">
<input type="text" class="player_entercode col-sm" value="test">
<input type="button" class="player_edit col-sm-1" value="+">
<input type="button" class="player_delete col-sm-1" value="-">
</div>
<div class="form-group player-list row mx-2 mb-1">
<input type="text" class="player_id d-none" value="test10">
<input type="text" class="player_name col-sm" value="test">
<input type="text" class="player_entercode col-sm" value="test">
<input type="button" class="player_edit col-sm-1" value="+">
<input type="button" class="player_delete col-sm-1" value="-">
</div>
</form>
<nav aria-label="search_player_list">
<ul class="pagination pagination-sm justify-content-center">
<li class="page-item disabled">
<a class="page-link" href="#" aria-label="Previous">
@@ -180,13 +186,6 @@ function searchPlayer() {
</ul>
</nav>
</div> <!-- 학생 목록 -->
<div id="search_player_list_navigator" class="player_list_navigator">
<span><a onClick="onClickPageNo(this, 'first')"></a></span>
<span><a onClick="onClickPageNo(this, 'prev')"> </a></span>
<span id="page_no_area"></span>
<span><a onClick="onClickPageNo(this, 'next')"> </a></span>
<span><a onClick="onClickPageNo(this, 'last')"></a></span>
</div>
</span>
</div>