버튼 태그 수정

main
이범준 1 year ago
parent 5fcc7366b8
commit a37bb5a088

@ -45,8 +45,8 @@
</ul>
</div>
<span class="container-window-btn-right">
<a href="#" id="btnInsertByFile--${pageName}" class="btn btn-primary" title="단속 파일 등록">단속 파일 등록</a>
<a href="#" id="btnInsertByHand--${pageName}" class="btn btn-primary" title="단속 수기 등록">단속 수기 등록</a>
<button type="button" id="btnInsertByFile--${pageName}" class="btn btn-primary" title="단속 파일 등록">단속 파일 등록</button>
<button type="button" id="btnInsertByHand--${pageName}" class="btn btn-primary" title="단속 수기 등록">단속 수기 등록</button>
</span>
</span>
</div>

@ -133,8 +133,8 @@
</ul>
</div>
<span class="container-window-btn-right">
<a href="#" id="" class="btn btn-primary" title="업무처리1">업무 처리1</a>
<a href="#" id="" class="btn btn-primary" title="업무처리2">업무 처리2</a>
<button type="button" id="" class="btn btn-primary" title="업무처리1">업무 처리1</button>
<button type="button" id="" class="btn btn-primary" title="업무처리2">업무 처리2</button>
</span>
</div>
</div>

@ -10,8 +10,8 @@
<div>
<div class="container-page-btn">
<button type="button" id="btnReset--${pageName}" class="btn btn-outline-dark" title="초기화">초기화</button>
<a href="#" id="btnPhotoInspection--${pageName}" class="btn btn-blue" title="단속사진 비교">단속사진 비교</a>
<a href="#" id="btnSameVehicleInspection--${pageName}" class="btn btn-blue" title="동일단속차량 검사">동일단속차량 검사</a>
<button type="button" id="btnPhotoInspection--${pageName}" class="btn btn-blue" title="단속사진 비교">단속사진 비교</button>
<button type="button" id="btnSameVehicleInspection--${pageName}" class="btn btn-blue" title="동일단속차량 검사">동일단속차량 검사</button>
<span class="container-window-btn-right">
<button type="button" id="btnSearch--${pageName}" class="btn btn-search" title="검색">검색</button>
</span>

@ -47,7 +47,7 @@
</ul>
</div>
<span class="container-window-btn-right">
<a href="#" id="btnUpdateToConfirmData--${pageName}" class="btn btn-primary" title="개별 확인 자료로 수정">개별 확인 자료로 수정</a>
<button type="button" id="btnUpdateToConfirmData--${pageName}" class="btn btn-primary" title="개별 확인 자료로 수정">개별 확인 자료로 수정</button>
</span>
</span>
</div>

@ -65,9 +65,8 @@
</ul>
</div>
<span class="container-window-btn-right">
<a href="#" id="btnOpenCvlcptOrgnl--${pageName}" class="btn btn-primary" title="민원원본보기">민원원본보기</a>
<a href="#" id="btnHold--${pageName}" class="btn btn-primary" title="처리 잠시 보류">처리 잠시 보류</a>
<button type="button" id="btnOpenCvlcptOrgnl--${pageName}" class="btn btn-primary" title="민원원본보기">민원원본보기</button>
<button type="button" id="btnHold--${pageName}" class="btn btn-primary" title="처리 잠시 보류">처리 잠시 보류</button>
</span>
</span>
</div>
@ -133,8 +132,8 @@
</div>
</div>
위반장소 <input id="bottomCrdnPlc--${pageName}" type="text" size="100" />
<a href="#" id="btnDelete--${pageName}" class="btn btn-primary" title="선택자료 삭제">선택자료 삭제</a>
<a href="#" id="btnDeleteSameRcptYmd--${pageName}" class="btn btn-primary" title="접수일 전체 삭제">접수일 전체 삭제</a>
<button type="button" id="btnDelete--${pageName}" class="btn btn-primary" title="선택자료 삭제">선택자료 삭제</button>
<button type="button" id="btnDeleteSameRcptYmd--${pageName}" class="btn btn-primary" title="접수일 전체 삭제">접수일 전체 삭제</button>
</div>
<div class="toast-container position-fixed bottom-0 end-0 p-3">
<div id="divToast--${pageName}" class="toast" role="alert" aria-live="assertive" aria-atomic="true">

@ -75,10 +75,10 @@
</ul>
</div>
<span class="container-window-btn-right">
<a href="#" id="btnOpenCvlcptOrgnl--${pageName}" class="btn btn-primary" title="민원원본보기">민원원본보기</a>
<a href="#" id="btnOpenAnswerPreview--${pageName}" class="btn btn-primary" title="답변미리보기">답변미리보기</a>
<a href="#" id="" class="btn btn-primary" title="답변등록 실행">&#x2611; 답변등록 실행</a>
<a href="#" id="" class="btn btn-primary" title="답변완료로 수정">&#x2611; 답변완료로 수정</a>
<button type="button" id="btnOpenCvlcptOrgnl--${pageName}" class="btn btn-primary" title="민원원본보기">민원원본보기</button>
<button type="button" id="btnOpenAnswerPreview--${pageName}" class="btn btn-primary" title="답변미리보기">답변미리보기</button>
<button type="button" id="btnAnswerExecute--${pageName}" class="btn btn-primary" title="답변등록 실행">&#x2611; 답변등록 실행</button>
<button type="button" id="btnAnswerComplete--${pageName}" class="btn btn-primary" title="답변완료로 수정">&#x2611; 답변완료로 수정</button>
</span>
</span>
</div>
@ -93,7 +93,10 @@
<tr data-by="by--${pageName}" data-by-output="byOutput--${pageName}"
data-main-option="mainOption--${pageName}" data-sub-option="subOption--${pageName}">
<th style="min-width: 80px;">No.</th>
<th style="min-width: 50px;"><input type="checkbox" name="gridAllCheckbox" /></th>
<th style="min-width: 50px;">
<input type="checkbox" name="gridAllCheckbox"
onchange="pageObject['${pageName}'].crdnControl.select(this.checked);" />
</th>
<th onclick="searchFromGridTitle('VLTN_ARTCL',this.innerText);"
style="min-width: 80px;">위반내용</th>
<th onclick="searchFromGridTitle('CVLCPT_APLCNT_NM',this.innerText,'match','part');"
@ -122,7 +125,10 @@
<template id="crdnRow--${pageName}">
<tr data-key="{CRDN_ID}">
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{ROW_NUM}</td>
<td class="text-end"><input type="checkbox" name="gridCheckbox" /></td>
<td class="text-end">
<input type="checkbox" name="gridCheckbox" value="{CRDN_ID}"
onchange="pageObject['${pageName}'].crdnControl.select('{CRDN_ID}', this.checked);" />
</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{VLTN_ARTCL}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{CVLCPT_APLCNT_NM}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{CVLCPT_PRCS_PIC_NM}</td>
@ -175,7 +181,7 @@ $(document).ready(function(){
* DatasetControl
**************************************************************************/
$P.crdnControl = new DatasetControl({
urls : { load : "", getInfo : "" },
urls : { load : "", getInfo : "", update : "" },
dataGetter : obj => obj["List"], appendData:true,
keymapper : info => info ? info.CRDN_ID : "",
formats : {
@ -216,6 +222,30 @@ $(document).ready(function(){
return;
}
if($P.crdnControl.beforeCurrent != null){
var beforeCurrentKey = $P.crdnControl.beforeCurrent.key;
var beforeCurrentIndex = $P.crdnControl.beforeCurrent.index;
$P.crdnControl.beforeCurrent = null;
if(!$P.crdnControl.dataset.empty){
var info = $P.crdnControl.dataset.getData(beforeCurrentKey);
if(info != null){
$P.crdnControl.setCurrent(beforeCurrentKey);
return;
}
if(beforeCurrentIndex > ($P.crdnControl.dataset.length - 1)){
info = $P.crdnControl.dataset.getDataset()[$P.crdnControl.dataset.length - 1];
} else {
info = $P.crdnControl.dataset.getDataset()[beforeCurrentIndex];
}
$P.crdnControl.setCurrent(info["CRDN_ID"]);
return;
}
}
$P.crdnControl.tableRenderComplete = false;
if(!item){
$P.clickCrdnList("", true);
@ -224,6 +254,20 @@ $(document).ready(function(){
}
}
$P.crdnControl.onSelectionChange = (selected) => {
var crdnList = $P.crdnControl.dataset;
var keys = selected.map(e => crdnList.getKey(e));
$("#table-responsive--${pageName}").find("input[name='gridCheckbox']").each(function() {
var checkbox = $(this);
checkbox.prop("checked", keys.includes(checkbox.val()));
});
$("#btnAnswerExecute--${pageName}").prop("disabled", keys.length < 1);
$("#btnAnswerComplete--${pageName}").prop("disabled", keys.length < 1);
};
/**************************************************************************
* pageObject.function
**************************************************************************/
@ -237,12 +281,17 @@ $(document).ready(function(){
$P.fnReset();
$P.crdnControl.urls.load = wctx.url("/"+taskSeCd+"/cvlc/cvlc01/030/list.do");
$P.crdnControl.urls.getInfo = wctx.url("/"+taskSeCd+"/sprt/sprt01/020/info.do");
$P.crdnControl.urls.update = wctx.url("/"+taskSeCd+"/sprt/cvlc01/030/update.do");
}
$P.refreshCrdnList = () => {
$P.crdnControl.untilPageNum = $P.crdnControl.query.pageNum;
$P.crdnControl.query.fetchSize = $P.crdnControl.defaultFetchSize * $P.crdnControl.query.pageNum;
$P.crdnControl.load(1);
$P.crdnControl.untilPageNum = $P.crdnControl.query.pageNum;
$P.crdnControl.query.fetchSize = $P.crdnControl.defaultFetchSize * $P.crdnControl.query.pageNum;
$P.crdnControl.beforeCurrent = {
key : $P.crdnControl.getCurrent()["CRDN_ID"],
index : $P.crdnControl.getCurrent()["ROW_NUM"] - 1
};
$P.crdnControl.load(1);
}
$P.searchCrdnList = () => {
@ -325,10 +374,6 @@ $(document).ready(function(){
});
if($("#table-responsive--${pageName}").find("input[name='gridAllCheckbox']").is(":checked")){
$("#table-responsive--${pageName}").find("input[name='gridCheckbox']").prop("checked",true);
}
}
$P.getParams = () => {
@ -452,14 +497,10 @@ $(document).ready(function(){
$('#btnSearch--${pageName}').on('click', () => $P.searchCrdnList());
$("#btnOpenCvlcptOrgnl--${pageName}").on("click", () => $P.fnOpenCvlcptOrgnl());
$("#btnOpenAnswerPreview--${pageName}").on("click", () => $P.fnOpenAnswerPreview());
$("#btnAnswerExecute--${pageName}").on("click", () => {});
$("#btnAnswerComplete--${pageName}").on("click", () => {});
$("#table-responsive--${pageName}").scroll(function(){ $P.scrollEnd(this); });
$("#table-responsive--${pageName}").find("input[name='gridAllCheckbox']").on("click", function(){
var checkYn = $(this).is(":checked");
$("#table-responsive--${pageName}").find("input[name='gridCheckbox']").prop("checked", checkYn);
});
/**************************************************************************
* 초기화
**************************************************************************/

Loading…
Cancel
Save