액션 그룹 목록 표시 수정

main
mjkhan21 1 year ago
parent e9069c777e
commit 8146336d62

@ -13,9 +13,9 @@
<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="actionList">
<tbody id="authActions">
</tbody>
<template id="actionRow">
<template id="authActionRow">
<tr data-key="{AUTH_ID}-{GRP_ID}">
<td style="text-align:center;"><input value="{AUTH_ID}-{GRP_ID}" onchange="${infoPrefix}Control.actions.select('{AUTH_ID}-{GRP_ID}', this.checked);" type="checkbox" class="form-check-input"></td>
<td onclick="${infoPrefix}Control.actions.setCurrent('{AUTH_ID}-{GRP_ID}')">{GRP_ID}</td>
@ -57,8 +57,8 @@ ${infoPrefix}Control.onActionListChange = obj => {
${infoPrefix}Control.authorities.isAdmin() ? [document.getElementById("adminActions").innerHTML.replace(/{authority}/, authority)] :
empty ?
[document.getElementById("actionNotFound").innerHTML] : <%-- from template#${infoPrefix}NotFound --%>
${infoPrefix}List.inStrings(document.getElementById("actionRow").innerHTML); <%-- from template#${infoPrefix}Row --%>
$("#actionList").html(trs.join());
${infoPrefix}List.inStrings(document.getElementById("authActionRow").innerHTML); <%-- from template#${infoPrefix}Row --%>
$("#authActions").html(trs.join());
$("#actionToggler").prop("checked", false);
$("#actionPaging").setPaging({
@ -76,13 +76,13 @@ ${infoPrefix}Control.onCurrentActionChange = item => {
let data = item.data;
let key = data.AUTH_ID + "-" + data.GRP_ID;
$("#actionList").setCurrentRow(key);
$("#authActions").setCurrentRow(key);
};
${infoPrefix}Control.onActionSelect = selected => {
let ${infoPrefix}List = ${infoPrefix}Control.actions.dataset;
let keys = selected.map(e => ${infoPrefix}List.getKey(e));
$("#actionList input[type='checkbox']").each(function() {
$("#authActions input[type='checkbox']").each(function() {
let checkbox = $(this);
checkbox.prop("checked", keys.includes(checkbox.val()));
});

Loading…
Cancel
Save