html태그 아이디 중복으로 인한 조회 오류 수정

dev
이범준 4 months ago
parent ab9aa77140
commit b73345d5ec

@ -10,12 +10,12 @@
<h5 class="mt-3">기능 그룹</h5> <h5 class="mt-3">기능 그룹</h5>
<div class="d-flex flex-row justify-content-between p-3"> <div class="d-flex flex-row justify-content-between p-3">
<div> <div>
<div class="input-group" id="DataTables_Table_0_length"> <div class="input-group" id="${infoPrefix}-query">
<select id="by" onchange="document.getElementById('term').focus();" aria-controls="DataTables_Table_0" class="form-select"> <select id="${infoPrefix}by" name="by" onchange="document.getElementById('term').focus();" aria-controls="DataTables_Table_0" class="form-select">
<option value="${infoPrefix}Name">이름</option> <option value="${infoPrefix}Name">이름</option>
<option value="${infoPrefix}ID">아이디</option> <option value="${infoPrefix}ID">아이디</option>
</select> </select>
<input id="term" autofocus type="text" placeholder="조회 조건을 입력하십시오." class="form-control"> <input id="${infoPrefix}term" name="term" autofocus type="text" placeholder="조회 조건을 입력하십시오." class="form-control">
</div> </div>
</div> </div>
<div> <div>
@ -99,8 +99,8 @@ var action${infoPrefix}Control = new ActionGroupControl();
function searchaction${infoPrefix}s() { function searchaction${infoPrefix}s() {
action${infoPrefix}Control.groups.query = { action${infoPrefix}Control.groups.query = {
by:$("#by").val(), by:$("#${infoPrefix}-query [name='by']").val(),
term:$("#term").val() term:$("#${infoPrefix}-query [name='term']").val()
}; };
action${infoPrefix}Control.groups.load(1); action${infoPrefix}Control.groups.load(1);
} }
@ -207,7 +207,7 @@ action${infoPrefix}Control.onActionSelect = selected => {
$("#btnRemoveActions").prop("disabled", keys.length < 1); $("#btnRemoveActions").prop("disabled", keys.length < 1);
}; };
$("#term").onEnterPress(searchaction${infoPrefix}s); $("#${infoPrefix}term").onEnterPress(searchaction${infoPrefix}s);
$(function(){ $(function(){
${onload} ${onload}

@ -10,12 +10,12 @@
<h5 class="mt-3">권한</h5> <h5 class="mt-3">권한</h5>
<div class="d-flex flex-row justify-content-between p-3"> <div class="d-flex flex-row justify-content-between p-3">
<div> <div>
<div class="input-group" id="DataTables_Table_0_length"> <div class="input-group" id="${infoPrefix}-query">
<select id="by" onchange="document.getElementById('term').focus();" aria-controls="DataTables_Table_0" class="form-select"> <select id="${infoPrefix}by" name="by" onchange="document.getElementById('term').focus();" aria-controls="DataTables_Table_0" class="form-select">
<option value="authName">이름</option> <option value="authName">이름</option>
<option value="authID">아이디</option> <option value="authID">아이디</option>
</select> </select>
<input id="term" autofocus type="text" placeholder="조회 조건을 입력하십시오." class="form-control"> <input id="${infoPrefix}term" name="term" autofocus type="text" placeholder="조회 조건을 입력하십시오." class="form-control">
</div> </div>
</div> </div>
<div> <div>
@ -83,8 +83,8 @@ var ${infoPrefix}Control = new AuthorityControl();
function search${infoPrefix}s() { function search${infoPrefix}s() {
${infoPrefix}Control.authorities.query = { ${infoPrefix}Control.authorities.query = {
by:$("#by").val(), by:$("#${infoPrefix}-query [name='by']").val(),
term:$("#term").val() term:$("#${infoPrefix}-query [name='term']").val()
}; };
${infoPrefix}Control.authorities.load(1); ${infoPrefix}Control.authorities.load(1);
} }
@ -148,7 +148,7 @@ ${infoPrefix}Control.onAuthoritySelect = selected => {
${userFunc} ${userFunc}
${actionGroupFunc} ${actionGroupFunc}
$("#term").onEnterPress(search${infoPrefix}s); $("#${infoPrefix}term").onEnterPress(search${infoPrefix}s);
$(function(){ $(function(){
${onload} ${onload}

@ -10,12 +10,12 @@
<h5 class="mt-3">${prefixName}</h5> <h5 class="mt-3">${prefixName}</h5>
<div class="d-flex flex-row justify-content-between p-3"> <div class="d-flex flex-row justify-content-between p-3">
<%--div> <%--div>
<div class="input-group" id="DataTables_Table_0_length"> <div class="input-group" id="${infoPrefix}-query">
<select id="by" onchange="document.getElementById('term').focus();" aria-controls="DataTables_Table_0" class="form-select"> <select id="${infoPrefix}by" name="by" onchange="document.getElementById('term').focus();" aria-controls="DataTables_Table_0" class="form-select">
<option value="groupName">이름</option> <option value="groupName">이름</option>
<option value="groupID">아이디</option> <option value="groupID">아이디</option>
</select> </select>
<input id="term" autofocus type="text" placeholder="조회 조건을 입력하십시오." class="form-control"> <input id="${infoPrefix}term" name="term" autofocus type="text" placeholder="조회 조건을 입력하십시오." class="form-control">
</div> </div>
</div--%> </div--%>
<div> <div>
@ -101,8 +101,8 @@ var codeControl = new CodeControl();
function searchGroups() { function searchGroups() {
codeControl.groups.query = { codeControl.groups.query = {
by:$("#by").val(), by:$("#${infoPrefix}-query [name='by']").val(),
term:$("#term").val() term:$("#${infoPrefix}-query [name='term']").val()
}; };
codeControl.groups.load(1); codeControl.groups.load(1);
} }
@ -218,7 +218,7 @@ codeControl.onCodeSelect = selected => {
$("#btnRemoveCodes").prop("disabled", selected.length < 1); $("#btnRemoveCodes").prop("disabled", selected.length < 1);
}; };
$("#term").onEnterPress(searchGroups); $("#${infoPrefix}term").onEnterPress(searchGroups);
$(function(){ $(function(){
${onload} ${onload}

@ -8,7 +8,7 @@
<div id="${infoPrefix}-query" class="d-flex flex-row justify-content-between p-3"> <div id="${infoPrefix}-query" class="d-flex flex-row justify-content-between p-3">
<div class="d-flex flex-row"> <div class="d-flex flex-row">
<div class="input-group"> <div class="input-group">
<select id="logType" class="form-select"> <select id="${infoPrefix}logType" name="logType" class="form-select">
<option value="">로그유형</option> <option value="">로그유형</option>
<option value="log-inout">로그인/아웃</option> <option value="log-inout">로그인/아웃</option>
<option value="download">다운로드</option> <option value="download">다운로드</option>
@ -16,17 +16,17 @@
</select> </select>
</div> </div>
<div class="input-group" style="margin: 0 1rem 0 1rem"> <div class="input-group" style="margin: 0 1rem 0 1rem">
<select id="by" onchange="document.getElementById('term').focus();" class="form-select"> <select id="${infoPrefix}by" name="by" onchange="document.getElementById('term').focus();" class="form-select">
<option value="userName">사용자 이름</option> <option value="userName">사용자 이름</option>
<option value="userAccount">사용자 계정</option> <option value="userAccount">사용자 계정</option>
<option value="userID">사용자 아이디</option> <option value="userID">사용자 아이디</option>
</select> </select>
<input id="term" type="text" placeholder="조회 조건을 입력하십시오." class="form-control"> <input id="${infoPrefix}term" name="term" type="text" placeholder="조회 조건을 입력하십시오." class="form-control">
</div> </div>
<div class="input-group"> <div class="input-group">
<input id="fromDate" type="text" value="${fromDate}" required placeholder="시작일자" class="form-control"> <input id="${infoPrefix}fromDate" name="fromDate" type="text" value="${fromDate}" required placeholder="시작일자" class="form-control">
<span style="margin: 0 .5rem 0 .5rem"> ~ </span> <span style="margin: 0 .5rem 0 .5rem"> ~ </span>
<input id="toDate" type="text" value="${toDate}" required placeholder="종료일자" class="form-control"> <input id="${infoPrefix}toDate" name="toDate" type="text" value="${toDate}" required placeholder="종료일자" class="form-control">
</div> </div>
</div> </div>
<div> <div>
@ -88,15 +88,15 @@ var ${infoPrefix}Control = new DatasetControl({
}); });
function search${infoPrefix}s() { function search${infoPrefix}s() {
let logType = $("#logType").val(), let logType = $("#${infoPrefix}logType").val(),
params = { params = {
logTypes: logType ? [logType] : [], logTypes: logType ? [logType] : [],
fromDate: $("#fromDate").val().replace(/-/gi, ""), fromDate: $("#${infoPrefix}fromDate").val().replace(/-/gi, ""),
toDate: $("#toDate").val().replace(/-/gi, "") toDate: $("#${infoPrefix}toDate").val().replace(/-/gi, "")
}, },
terms = $("#${infoPrefix}-query #term").val(); terms = $("#${infoPrefix}-query [name='term']").val();
if (terms) { if (terms) {
switch ($("#${infoPrefix}-query #by").val()) { switch ($("#${infoPrefix}-query [name='by']").val()) {
case "userName": params.userName = terms; break; case "userName": params.userName = terms; break;
case "userAccount": params.userAccounts = [terms]; break; case "userAccount": params.userAccounts = [terms]; break;
case "userID": params.userIDs = [terms]; break; case "userID": params.userIDs = [terms]; break;
@ -139,7 +139,7 @@ ${infoPrefix}Control.onCurrentChange = item => {
$("#${infoPrefix}List").setCurrentRow(key); $("#${infoPrefix}List").setCurrentRow(key);
}; };
$("#term").onEnterPress(search${infoPrefix}s); $("#${infoPrefix}term").onEnterPress(search${infoPrefix}s);
$(function(){ $(function(){
${onload} ${onload}
@ -149,7 +149,7 @@ $(function(){
${infoPrefix}Fetch:${syslogFetch}, ${infoPrefix}Fetch:${syslogFetch},
${infoPrefix}Total:${syslogTotal} ${infoPrefix}Total:${syslogTotal}
}); });
$("#${infoPrefix}-query #fromDate, #${infoPrefix}-query #toDate").datePicker(); $("#${infoPrefix}-query #${infoPrefix}fromDate, #${infoPrefix}-query #${infoPrefix}toDate").datePicker();
}); });
//# sourceURL=${infoPrefix}-main.jsp //# sourceURL=${infoPrefix}-main.jsp
</script> </script>

@ -10,12 +10,12 @@
<h5 class="mt-3">${prefixName}</h5> <h5 class="mt-3">${prefixName}</h5>
<div class="d-flex flex-row justify-content-between p-3"> <div class="d-flex flex-row justify-content-between p-3">
<%--div> <%--div>
<div class="input-group" id="DataTables_Table_0_length"> <div class="input-group" id="${infoPrefix}-query">
<select id="by" onchange="document.getElementById('term').focus();" aria-controls="DataTables_Table_0" class="form-select"> <select id="${infoPrefix}by" name="by" onchange="document.getElementById('term').focus();" aria-controls="DataTables_Table_0" class="form-select">
<option value="sggName">이름</option> <option value="sggName">이름</option>
<option value="sggID">아이디</option> <option value="sggID">아이디</option>
</select> </select>
<input id="term" autofocus type="text" placeholder="조회 조건을 입력하십시오." class="form-control"> <input id="${infoPrefix}term" name="term" autofocus type="text" placeholder="조회 조건을 입력하십시오." class="form-control">
</div> </div>
</div--%> </div--%>
<div> <div>
@ -102,8 +102,8 @@ sggDeptControl.sggs.query = {includeAll: true};
<%-- <%--
function searchSggs() { function searchSggs() {
sggDeptControl.sggs.query = { sggDeptControl.sggs.query = {
by:$("#by").val(), by:$("#${infoPrefix}-query [name='by']").val(),
term:$("#term").val(), term:$("#${infoPrefix}-query [name='term']").val()
includeAll: true includeAll: true
}; };
sggDeptControl.sggs.load(1); sggDeptControl.sggs.load(1);
@ -240,7 +240,7 @@ $(function(){
deptTotal:${deptTotal} deptTotal:${deptTotal}
}); });
<%-- $("#term").onEnterPress(searchSggs); --%> <%-- $("#${infoPrefix}term").onEnterPress(searchSggs); --%>
}); });
//# sourceURL=sgg-dept.jsp //# sourceURL=sgg-dept.jsp
</script> </script>

@ -7,7 +7,7 @@
<div class="d-flex flex-row justify-content-between p-3"> <div class="d-flex flex-row justify-content-between p-3">
<div> <div>
<div class="input-group" id="DataTables_Table_0_length"> <div class="input-group" id="${infoPrefix}-query">
<select id="by" onchange="document.getElementById('term').focus();" aria-controls="DataTables_Table_0" class="form-select"> <select id="by" onchange="document.getElementById('term').focus();" aria-controls="DataTables_Table_0" class="form-select">
<option value="${infoPrefix}Name">이름</option> <option value="${infoPrefix}Name">이름</option>
<option value="${infoPrefix}Account">계정</option> <option value="${infoPrefix}Account">계정</option>
@ -64,8 +64,8 @@ var ${infoPrefix}Control = new UserControl();
function search${infoPrefix}s() { function search${infoPrefix}s() {
${infoPrefix}Control.query = { ${infoPrefix}Control.query = {
by:$("#by").val(), by:$("#${infoPrefix}-query [name='by']").val(),
term:$("#term").val() term:$("#${infoPrefix}-query [name='term']").val()
}; };
${infoPrefix}Control.load(1); ${infoPrefix}Control.load(1);
} }
@ -134,7 +134,7 @@ ${infoPrefix}Control.onSelectionChange = selected => {
$("#btnRemove${infoPrefix}s").prop("disabled", keys.length < 1); $("#btnRemove${infoPrefix}s").prop("disabled", keys.length < 1);
}; };
$("#term").onEnterPress(search${infoPrefix}s); $("#${infoPrefix}term").onEnterPress(search${infoPrefix}s);
$(function(){ $(function(){
${onload} ${onload}

Loading…
Cancel
Save