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

main
이범준 4 months ago
parent e6ab6b5e74
commit b956b8d7be

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

@ -17,12 +17,12 @@
<h5 class="mt-3">권한</h5>
<div class="d-flex flex-row justify-content-between p-3">
<div>
<div class="input-group" id="DataTables_Table_0_length">
<select id="by" onchange="document.getElementById('term').focus();" aria-controls="DataTables_Table_0" class="form-select">
<div class="input-group" id="${infoPrefix}-query">
<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="authID">아이디</option>
</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>
@ -87,11 +87,25 @@
<!--/ Page Body -->
<script >
var ${infoPrefix}Control = new AuthorityControl();
${infoPrefix}Control.authorities.onSave = (resp) => {
if (resp.saved) {
dialog.alert("저장됐습니다.");
dialog.close(${infoPrefix}Control.authorities.prefixed("dialog"));
${infoPrefix}Control.authorities.query.fetchAll = true;
${infoPrefix}Control.authorities.load(1);
}
}
${infoPrefix}Control.authorities.onRemove = (selected, resp) => {
if (resp.saved){
${infoPrefix}Control.authorities.query.fetchAll = true;
${infoPrefix}Control.authorities.load(1);
}
}
function search${infoPrefix}s() {
${infoPrefix}Control.authorities.query = {
by:$("#by").val(),
term:$("#term").val()
by:$("#${infoPrefix}-query [name='by']").val(),
term:$("#${infoPrefix}-query [name='term']").val()
};
${infoPrefix}Control.authorities.query.fetchAll = true;
${infoPrefix}Control.authorities.load(1);
@ -156,7 +170,7 @@ ${infoPrefix}Control.onAuthoritySelect = selected => {
${userFunc}
${actionGroupFunc}
$("#term").onEnterPress(search${infoPrefix}s);
$("#${infoPrefix}term").onEnterPress(search${infoPrefix}s);
$(function(){
${onload}

@ -10,12 +10,12 @@
<h5 class="mt-3">${prefixName}</h5>
<div class="d-flex flex-row justify-content-between p-3">
<%--div>
<div class="input-group" id="DataTables_Table_0_length">
<select id="by" onchange="document.getElementById('term').focus();" aria-controls="DataTables_Table_0" class="form-select">
<div class="input-group" id="${infoPrefix}-query">
<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="groupID">아이디</option>
</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>
@ -101,8 +101,8 @@ var codeControl = new CodeControl();
function searchGroups() {
codeControl.groups.query = {
by:$("#by").val(),
term:$("#term").val()
by:$("#${infoPrefix}-query [name='by']").val(),
term:$("#${infoPrefix}-query [name='term']").val()
};
codeControl.groups.load(1);
}
@ -218,7 +218,7 @@ codeControl.onCodeSelect = selected => {
$("#btnRemoveCodes").prop("disabled", selected.length < 1);
};
$("#term").onEnterPress(searchGroups);
$("#${infoPrefix}term").onEnterPress(searchGroups);
$(function(){
${onload}

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

@ -10,12 +10,12 @@
<h5 class="mt-3">${prefixName}</h5>
<div class="d-flex flex-row justify-content-between p-3">
<%--div>
<div class="input-group" id="DataTables_Table_0_length">
<select id="by" onchange="document.getElementById('term').focus();" aria-controls="DataTables_Table_0" class="form-select">
<div class="input-group" id="${infoPrefix}-query">
<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="sggID">아이디</option>
</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>
@ -102,8 +102,8 @@ sggDeptControl.sggs.query = {includeAll: true};
<%--
function searchSggs() {
sggDeptControl.sggs.query = {
by:$("#by").val(),
term:$("#term").val(),
by:$("#${infoPrefix}-query [name='by']").val(),
term:$("#${infoPrefix}-query [name='term']").val()
includeAll: true
};
sggDeptControl.sggs.load(1);
@ -240,7 +240,7 @@ $(function(){
deptTotal:${deptTotal}
});
<%-- $("#term").onEnterPress(searchSggs); --%>
<%-- $("#${infoPrefix}term").onEnterPress(searchSggs); --%>
});
//# sourceURL=sgg-dept.jsp
</script>

@ -7,18 +7,18 @@
<div class="d-flex flex-row justify-content-between p-3">
<div>
<div class="input-group" id="DataTables_Table_0_length">
<select id="by" onchange="document.getElementById('term').focus();" aria-controls="DataTables_Table_0" class="form-select">
<div class="input-group" id="${infoPrefix}-query">
<select id="by${infoPrefix}" name="by" onchange="document.getElementById('term').focus();" aria-controls="DataTables_Table_0" class="form-select">
<option value="${infoPrefix}Name">이름</option>
<option value="${infoPrefix}Account">계정</option>
</select>
<input id="term" autofocus type="text" placeholder="조회 조건을 입력하십시오." class="form-control">
<input id="term${infoPrefix}" name="term" autofocus type="text" placeholder="조회 조건을 입력하십시오." class="form-control">
</div>
</div>
<div>
<button onclick="search${infoPrefix}s();" class="btn btn-primary">찾기</button>
<button onclick="${infoPrefix}Control.newInfo();" class="btn btn-primary">+ 추가</button>
<button onclick="remove${infoPrefix}s();" class="btn btn-primary on-select">- 제거</button>
<button id="btnRemove${infoPrefix}s" onclick="remove${infoPrefix}s();" class="btn btn-primary">- 제거</button>
</div>
</div>
<div class="table-responsive">
@ -68,8 +68,8 @@ var ${infoPrefix}Control = new UserControl();
function search${infoPrefix}s() {
${infoPrefix}Control.query = {
by:$("#by").val(),
term:$("#term").val()
by:$("#${infoPrefix}-query [name='by']").val(),
term:$("#${infoPrefix}-query [name='term']").val()
};
${infoPrefix}Control.load(1);
}
@ -135,10 +135,10 @@ ${infoPrefix}Control.onSelectionChange = selected => {
checkbox.prop("checked", keys.includes(checkbox.val()));
});
$("button.on-select").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(){
${onload}

Loading…
Cancel
Save