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> <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> </tr>
</thead> </thead>
<tbody id="${infoPrefix}List"> <tbody id="_${infoPrefix}List">
</tbody> </tbody>
<template id="${infoPrefix}Row"> <template id="${infoPrefix}Row">
<tr data-key="{GRP_ID}"> <tr data-key="{GRP_ID}">
@ -78,7 +78,7 @@ ${infoPrefix}Control.onGroupListChange = obj => {
let trs = empty ? let trs = empty ?
[document.getElementById("${infoPrefix}NotFound").innerHTML] : <%-- from template#${infoPrefix}NotFound --%> [document.getElementById("${infoPrefix}NotFound").innerHTML] : <%-- from template#${infoPrefix}NotFound --%>
${infoPrefix}List.inStrings(document.getElementById("${infoPrefix}Row").innerHTML); <%-- from template#${infoPrefix}Row --%> ${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); $("th input[type='checkbox']").prop("checked", false);
$("#${infoPrefix}Paging").setPaging({ $("#${infoPrefix}Paging").setPaging({
@ -95,13 +95,13 @@ ${infoPrefix}Control.onCurrentGroupChange = item => {
if (!item) return; if (!item) return;
let key = item.data.GRP_ID; let key = item.data.GRP_ID;
$("#${infoPrefix}List").setCurrentRow(key); $("#_${infoPrefix}List").setCurrentRow(key);
}; };
${infoPrefix}Control.onGroupSelect = selected => { ${infoPrefix}Control.onGroupSelect = selected => {
let ${infoPrefix}List = ${infoPrefix}Control.groups.dataset; let ${infoPrefix}List = ${infoPrefix}Control.groups.dataset;
let keys = selected.map(e => ${infoPrefix}List.getKey(e)); 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); let checkbox = $(this);
checkbox.prop("checked", keys.includes(checkbox.val())); checkbox.prop("checked", keys.includes(checkbox.val()));
}); });

@ -8,14 +8,14 @@
</div> </div>
<table class="datatables-ajax table table-bordered dataTable no-footer" id="DataTables_Table_0" aria-describedby="DataTables_Table_0_info"> <table class="datatables-ajax table table-bordered dataTable no-footer" id="DataTables_Table_0" aria-describedby="DataTables_Table_0_info">
<thead> <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="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> <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> </tr>
</thead> </thead>
<tbody id="userList"> <tbody id="authUsers">
</tbody> </tbody>
<template id="userRow"> <template id="authUserRow">
<tr data-key="{AUTH_ID}-{USER_ID}"> <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 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> <td onclick="${infoPrefix}Control.users.setCurrent('{AUTH_ID}-{USER_ID}')">{USER_ACNT}</td>
@ -57,9 +57,9 @@ ${infoPrefix}Control.onUserListChange = obj => {
let trs = let trs =
${infoPrefix}Control.authorities.isImplicit() ? [document.getElementById("implicitActions").innerHTML.replace(/{authority}/, authority)] : ${infoPrefix}Control.authorities.isImplicit() ? [document.getElementById("implicitActions").innerHTML.replace(/{authority}/, authority)] :
empty ? [document.getElementById("userNotFound").innerHTML] : <%-- from template#${infoPrefix}NotFound --%> empty ? [document.getElementById("userNotFound").innerHTML] : <%-- from template#${infoPrefix}NotFound --%>
${infoPrefix}List.inStrings(document.getElementById("userRow").innerHTML); <%-- from template#${infoPrefix}Row --%> ${infoPrefix}List.inStrings(document.getElementById("authUserRow").innerHTML); <%-- from template#${infoPrefix}Row --%>
$("#userList").html(trs.join()); $("#authUsers").html(trs.join());
$("#userToggler").prop("checked", false); $("#authUserToggler").prop("checked", false);
$("#userPaging").setPaging({ $("#userPaging").setPaging({
list:${infoPrefix}Control.users.dataset, list:${infoPrefix}Control.users.dataset,
@ -76,13 +76,13 @@ ${infoPrefix}Control.onCurrentUserChange = item => {
let data = item.data; let data = item.data;
let key = data.AUTH_ID + "-" + data.USER_ID; let key = data.AUTH_ID + "-" + data.USER_ID;
$("#userList").setCurrentRow(key); $("#authUsers").setCurrentRow(key);
}; };
${infoPrefix}Control.onUserSelect = selected => { ${infoPrefix}Control.onUserSelect = selected => {
let ${infoPrefix}List = ${infoPrefix}Control.users.dataset; let ${infoPrefix}List = ${infoPrefix}Control.users.dataset;
let keys = selected.map(e => ${infoPrefix}List.getKey(e)); let keys = selected.map(e => ${infoPrefix}List.getKey(e));
$("#userList input[type='checkbox']").each(function() { $("#authUsers input[type='checkbox']").each(function() {
let checkbox = $(this); let checkbox = $(this);
checkbox.prop("checked", keys.includes(checkbox.val())); checkbox.prop("checked", keys.includes(checkbox.val()));
}); });

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

Loading…
Cancel
Save