|
|
|
@ -7,7 +7,7 @@
|
|
|
|
|
<div class="d-flex flex-row justify-content-between p-3">
|
|
|
|
|
<div>
|
|
|
|
|
<div class="input-group">
|
|
|
|
|
<select name="by" onchange="userCtrl.find('term').focus();" class="form-select">
|
|
|
|
|
<select name="by" onchange="userCtrl.find('name', 'term').focus();" class="form-select">
|
|
|
|
|
<option value="userName">이름</option>
|
|
|
|
|
<option value="userAccount">계정</option>
|
|
|
|
|
</select>
|
|
|
|
@ -24,11 +24,11 @@
|
|
|
|
|
<table class="datatables-ajax table table-bordered dataTable no-footer">
|
|
|
|
|
<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>
|
|
|
|
|
<th data-field="USER_ACNT" class="sorting" style="width: 223.719px;">계정</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: 160.141px;">전화번호(무선)</th>
|
|
|
|
|
<th class="sorting" style="width: 230.469px;">등록일자</th>
|
|
|
|
|
<th style="width: 223.719px;">계정</th>
|
|
|
|
|
<th style="width: 146.156px;">이름</th>
|
|
|
|
|
<th style="width: 195.688px;">이메일</th>
|
|
|
|
|
<th style="width: 160.141px;">전화번호(무선)</th>
|
|
|
|
|
<th style="width: 230.469px;">등록일자</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody name="userList">
|
|
|
|
@ -62,8 +62,8 @@ var userCtrl = newUserControl();
|
|
|
|
|
|
|
|
|
|
userCtrl.search = () => {
|
|
|
|
|
userCtrl.query = {
|
|
|
|
|
by: userCtrl.find("by").value,
|
|
|
|
|
term: userCtrl.find("term").value
|
|
|
|
|
by: userCtrl.find("name", "by").value,
|
|
|
|
|
term: userCtrl.find("name", "term").value
|
|
|
|
|
};
|
|
|
|
|
userCtrl.load(1);
|
|
|
|
|
}
|
|
|
|
@ -82,15 +82,15 @@ userCtrl.renderList = () => {
|
|
|
|
|
empty = userList.empty;
|
|
|
|
|
|
|
|
|
|
let trs = empty ?
|
|
|
|
|
[userCtrl.find("userNotFound").innerHTML] :
|
|
|
|
|
[userCtrl.find("name", "userNotFound").innerHTML] :
|
|
|
|
|
userList.inStrings(
|
|
|
|
|
userCtrl.find("userRow").innerHTML,
|
|
|
|
|
userCtrl.find("name", "userRow").innerHTML,
|
|
|
|
|
(str, dataItem) => str
|
|
|
|
|
.replace(/{onclick}=""/gi, 'onclick="userCtrl.setCurrent(\'' + dataItem.getValue("USER_ID") + '\');"')
|
|
|
|
|
.replace(/{ondblclick}=""/gi, 'ondblclick="userCtrl.getInfo(\'' + dataItem.getValue("USER_ID") + '\')"')
|
|
|
|
|
.replace(/{onclick}=""/gi, 'onclick="userCtrl.setCurrent(\'{USER_ID}\');"')
|
|
|
|
|
.replace(/{ondblclick}=""/gi, 'ondblclick="userCtrl.getInfo({userID: \'{USER_ID}\'});"')
|
|
|
|
|
);
|
|
|
|
|
userCtrl.find("userList").innerHTML = trs.join("");
|
|
|
|
|
userCtrl.querySelector("[name='userThead'] th input[type='checkbox']").checked = false;
|
|
|
|
|
userCtrl.find("name", "userList").innerHTML = trs.join("");
|
|
|
|
|
userCtrl.find("[name='userThead'] th input[type='checkbox']").checked = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
userCtrl.onDatasetChange = obj => {
|
|
|
|
@ -116,12 +116,12 @@ userCtrl.onCurrentChange = item => {
|
|
|
|
|
userCtrl.onSelectionChange = selected => {
|
|
|
|
|
let userList = userCtrl.dataset;
|
|
|
|
|
let keys = selected.map(e => userList.getKey(e));
|
|
|
|
|
userCtrl.querySelectorAll("[name='userList'] input[type='checkbox']")
|
|
|
|
|
userCtrl.findAll("[name='userList'] input[type='checkbox']")
|
|
|
|
|
.forEach(node => {
|
|
|
|
|
node.checked = keys.includes(node.value);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
userCtrl.querySelectorAll(".enable-onfound")
|
|
|
|
|
userCtrl.findAll(".enable-onfound")
|
|
|
|
|
.forEach(node => {
|
|
|
|
|
node.disabled = keys.length < 1;
|
|
|
|
|
});
|
|
|
|
@ -131,7 +131,6 @@ $(userCtrl.selector("[name='term']")).onEnterPress(userCtrl.search);
|
|
|
|
|
|
|
|
|
|
$(function(){
|
|
|
|
|
${onload}
|
|
|
|
|
tableSorter(userCtrl, "th[data-field]");
|
|
|
|
|
|
|
|
|
|
userCtrl.setData({
|
|
|
|
|
userList:${userList},
|
|
|
|
|