테이블 sort 수정

dev^2
mjkhan21 4 months ago
parent 8fe9ce445f
commit 83c42b8211

@ -24,8 +24,8 @@
<table class="datatables-ajax table table-bordered dataTable no-footer"> <table class="datatables-ajax table table-bordered dataTable no-footer">
<thead name="userThead"> <thead name="userThead">
<tr><th tabindex="0" style="width: 158.828px; text-align:center;"><input onchange="userCtrl.select(this.checked);" type="checkbox" class="form-check-input"></th> <tr><th tabindex="0" style="width: 158.828px; text-align:center;"><input onchange="userCtrl.select(this.checked);" type="checkbox" class="form-check-input"></th>
<th onclick="userCtrl.sort(this.getAttribute('data-field'));" data-field="USER_ACNT" class="sorting" style="width: 223.719px;">계정</th> <th data-field="USER_ACNT" class="sorting" style="width: 223.719px;">계정</th>
<th onclick="userCtrl.sort(this.getAttribute('data-field'));" data-field="USER_NM" class="sorting" style="width: 146.156px;">이름</th> <th data-field="USER_NM" class="sorting" style="width: 146.156px;">이름</th>
<th class="sorting" style="width: 195.688px;">이메일</th> <th class="sorting" style="width: 195.688px;">이메일</th>
<th class="sorting" style="width: 160.141px;">전화번호(무선)</th> <th class="sorting" style="width: 160.141px;">전화번호(무선)</th>
<th class="sorting" style="width: 230.469px;">등록일자</th> <th class="sorting" style="width: 230.469px;">등록일자</th>
@ -106,12 +106,6 @@ userCtrl.onDatasetChange = obj => {
}); });
}; };
userCtrl.onSort = sorter => {
userCtrl.renderList();
sorting.setHeaders(userCtrl.querySelectorAll("th[data-field]"), sorter);
};
userCtrl.onCurrentChange = item => { userCtrl.onCurrentChange = item => {
if (!item) return; if (!item) return;
@ -137,6 +131,8 @@ $(userCtrl.selector("[name='term']")).onEnterPress(userCtrl.search);
$(function(){ $(function(){
${onload} ${onload}
tableSorter(userCtrl, "th[data-field]");
userCtrl.setData({ userCtrl.setData({
userList:${userList}, userList:${userList},
${infoPrefix}Start:${userStart}, ${infoPrefix}Start:${userStart},

Loading…
Cancel
Save