이지우 - 관리자 협의회관리 등록 및 수정 > 참여위원 검색 및 체크 기능 수정
This commit is contained in:
parent
297a57b045
commit
88e1765511
@ -58,12 +58,12 @@
|
||||
<!-- js -->
|
||||
|
||||
<script type="text/javascript">
|
||||
var parentId;
|
||||
$(document).ready(function(){
|
||||
|
||||
parentId = $("#parentId").val();
|
||||
listCall();
|
||||
/* 참석위원 팝업의 경우 히든 테이블 생성
|
||||
검색 후 기존에 체크한 체크박스 유지하기 위함 */
|
||||
var parentId = $("#parentId").val()
|
||||
if(parentId == 'cham'){
|
||||
listChamHiddenCall()
|
||||
}
|
||||
@ -82,11 +82,31 @@
|
||||
if(flag){
|
||||
//input태그가 checkbox인 태그들을 찾아서 checked옵션을 true로 정의
|
||||
//클릭이 안되있으면
|
||||
$("input:checkbox").prop("checked",true);
|
||||
if(parentId == 'cham'){
|
||||
$(".table_col input:checkbox").prop("checked",true);
|
||||
|
||||
$(".table_col input:checkbox:checked").each(function() {
|
||||
$("#chkHid"+this.value).prop("checked", true);
|
||||
});
|
||||
|
||||
}else{
|
||||
$("input:checkbox").prop("checked",true);
|
||||
}
|
||||
flag = false;
|
||||
}else{
|
||||
//input태그가 checkbox인 태그들을 찾아서 checked옵션을 false로 정의
|
||||
$("input:checkbox").prop("checked",false);
|
||||
if(parentId == 'cham'){
|
||||
$(".table_col input:checkbox").prop("checked",false);
|
||||
|
||||
$(".table_col input:checkbox").each(function() {
|
||||
if (!$(this).is(":checked")) {
|
||||
$("#chkHid"+this.value).prop("checked", false);
|
||||
}
|
||||
});
|
||||
|
||||
}else{
|
||||
$("input:checkbox").prop("checked",false);
|
||||
}
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
@ -116,6 +136,8 @@
|
||||
if(parentId == 'cham'){
|
||||
$("#list").html('');
|
||||
cnt = 0;
|
||||
$("#allChk").prop("checked",false);
|
||||
flag = true;
|
||||
}
|
||||
if(r.data.length != 0){
|
||||
$.each(r.data, function(k,v) {
|
||||
@ -179,7 +201,7 @@
|
||||
html += '<tr>';
|
||||
//참여위원
|
||||
/* html += '<td><input type="checkbox" id="chk'+ k +'" name="chk" value="'+v.memberNo+'" alt="'+v.caseField+'" /></td>'; */
|
||||
html += '<td><input type="checkbox" id="chk'+ v.memberNo +'" name="hiddenChk" value="'+v.memberNo+'" alt="'+v.caseField+'" onclick="chamChk(this);"/></td>';
|
||||
html += '<td><input type="checkbox" id="chkHid'+ v.memberNo +'" name="hiddenChk" value="'+v.memberNo+'" alt="'+v.caseField+'" onclick="chamChk(this);"/></td>';
|
||||
html += '<td>'+cnt+'</td>';
|
||||
html += '<td>'+v.caseGubunName+'</td>';
|
||||
html += '<td>'+v.caseFieldName+'</td>';
|
||||
@ -269,9 +291,9 @@
|
||||
|
||||
function chamChk(chkbox){
|
||||
if(chkbox.checked){
|
||||
$("#chk"+chkbox.value).prop("checked", true);;
|
||||
$("#chkHid"+chkbox.value).prop("checked", true);
|
||||
}else{
|
||||
$("#chk"+chkbox.value).prop("checked", false);
|
||||
$("#chkHid"+chkbox.value).prop("checked", false);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -333,7 +355,7 @@
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="row" style="text-align: center;"><input type="checkbox" onclick="checkAll();"></th>
|
||||
<th scope="row" style="text-align: center;"><input type="checkbox" id="allChk" onclick="checkAll();"></th>
|
||||
<c:if test="${parentId eq 'sim' or parentId eq 'bogo' or parentId eq 'josu'}">
|
||||
<th scope="row" style="text-align: center;">순번</th>
|
||||
<th scope="row" style="text-align: center;">사건번호</th>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user