jsp dataset 이름, element id 수정

main
mjkhan21 1 year ago
parent f034c1fe15
commit 641229f732

@ -27,7 +27,7 @@
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" aria-label="Start date: activate to sort column ascending" style="">등록일자</th>
</tr>
</thead>
<tbody id="${infoPrefix}List">
<tbody id="_${infoPrefix}List">
</tbody>
<template id="${infoPrefix}Row">
<tr data-key="{GRP_ID}">
@ -78,7 +78,7 @@ ${infoPrefix}Control.onGroupListChange = obj => {
let trs = empty ?
[document.getElementById("${infoPrefix}NotFound").innerHTML] : <%-- from template#${infoPrefix}NotFound --%>
${infoPrefix}List.inStrings(document.getElementById("${infoPrefix}Row").innerHTML); <%-- from template#${infoPrefix}Row --%>
$("#${infoPrefix}List").html(trs.join());
$("#_${infoPrefix}List").html(trs.join());
$("th input[type='checkbox']").prop("checked", false);
$("#${infoPrefix}Paging").setPaging({
@ -95,13 +95,13 @@ ${infoPrefix}Control.onCurrentGroupChange = item => {
if (!item) return;
let key = item.data.GRP_ID;
$("#${infoPrefix}List").setCurrentRow(key);
$("#_${infoPrefix}List").setCurrentRow(key);
};
${infoPrefix}Control.onGroupSelect = selected => {
let ${infoPrefix}List = ${infoPrefix}Control.groups.dataset;
let keys = selected.map(e => ${infoPrefix}List.getKey(e));
$("#${infoPrefix}List input[type='checkbox']").each(function() {
$("#_${infoPrefix}List input[type='checkbox']").each(function() {
let checkbox = $(this);
checkbox.prop("checked", keys.includes(checkbox.val()));
});

@ -8,14 +8,14 @@
</div>
<table class="datatables-ajax table table-bordered dataTable no-footer" id="DataTables_Table_0" aria-describedby="DataTables_Table_0_info">
<thead>
<tr><th tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="text-align:center;"><input id="userToggler" onchange="${infoPrefix}Control.users.select(this.checked);" type="checkbox" class="form-check-input"></th>
<tr><th tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="text-align:center;"><input id="authUserToggler" onchange="${infoPrefix}Control.users.select(this.checked);" type="checkbox" class="form-check-input"></th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" aria-label="Email: activate to sort column ascending" style="">사용자</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" aria-label="Start date: activate to sort column ascending" style="">등록일자</th>
</tr>
</thead>
<tbody id="userList">
<tbody id="authUsers">
</tbody>
<template id="userRow">
<template id="authUserRow">
<tr data-key="{AUTH_ID}-{USER_ID}">
<td style="text-align:center;"><input value="{AUTH_ID}-{USER_ID}" onchange="${infoPrefix}Control.users.select('{AUTH_ID}-{USER_ID}', this.checked);" type="checkbox" class="form-check-input"></td>
<td onclick="${infoPrefix}Control.users.setCurrent('{AUTH_ID}-{USER_ID}')">{USER_ACNT}</td>
@ -57,9 +57,9 @@ ${infoPrefix}Control.onUserListChange = obj => {
let trs =
${infoPrefix}Control.authorities.isImplicit() ? [document.getElementById("implicitActions").innerHTML.replace(/{authority}/, authority)] :
empty ? [document.getElementById("userNotFound").innerHTML] : <%-- from template#${infoPrefix}NotFound --%>
${infoPrefix}List.inStrings(document.getElementById("userRow").innerHTML); <%-- from template#${infoPrefix}Row --%>
$("#userList").html(trs.join());
$("#userToggler").prop("checked", false);
${infoPrefix}List.inStrings(document.getElementById("authUserRow").innerHTML); <%-- from template#${infoPrefix}Row --%>
$("#authUsers").html(trs.join());
$("#authUserToggler").prop("checked", false);
$("#userPaging").setPaging({
list:${infoPrefix}Control.users.dataset,
@ -76,13 +76,13 @@ ${infoPrefix}Control.onCurrentUserChange = item => {
let data = item.data;
let key = data.AUTH_ID + "-" + data.USER_ID;
$("#userList").setCurrentRow(key);
$("#authUsers").setCurrentRow(key);
};
${infoPrefix}Control.onUserSelect = selected => {
let ${infoPrefix}List = ${infoPrefix}Control.users.dataset;
let keys = selected.map(e => ${infoPrefix}List.getKey(e));
$("#userList input[type='checkbox']").each(function() {
$("#authUsers input[type='checkbox']").each(function() {
let checkbox = $(this);
checkbox.prop("checked", keys.includes(checkbox.val()));
});

@ -66,6 +66,7 @@ class ActionGroupControl {
dialog.open({
title:"기능그룹 선택",
content:resp,
size: "lg",
getData:() => {return getSelectedActionGroup();},
onOK:(selected) => resolve(selected)
});

Loading…
Cancel
Save