선거문자 20건 분할발송 기능 추가
- 전체선택/해제 기능 추가 - 초기화 버튼 위치 변경 - 문자 발송 완료 메세지 토스트 메세지 방식으로 변경
This commit is contained in:
parent
7d084e2a6c
commit
16c2f518d8
@ -79,7 +79,6 @@
|
|||||||
</c:choose>
|
</c:choose>
|
||||||
<div class="list_bottom_right">
|
<div class="list_bottom_right">
|
||||||
<button type="button" class="btnType btn_gray fill" id="checkAll" name="receipt_number_check" value="N">전체선택</button>
|
<button type="button" class="btnType btn_gray fill" id="checkAll" name="receipt_number_check" value="N">전체선택</button>
|
||||||
<!-- <button type="button" class="btnType btn_gray fill" onclick="fnCallToListReset();">초기화</button> -->
|
|
||||||
<div class="btn_popup_wrap">
|
<div class="btn_popup_wrap">
|
||||||
<button type="button" class="btnType btn_yellow fill btn_check_one">1명씩 선택<i class="qmMark"></i></button>
|
<button type="button" class="btnType btn_yellow fill btn_check_one">1명씩 선택<i class="qmMark"></i></button>
|
||||||
<div class="error_hover_cont send_hover_cont">
|
<div class="error_hover_cont send_hover_cont">
|
||||||
|
|||||||
@ -283,37 +283,62 @@ function addTWCallToInfo(){
|
|||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
$(".receipt_number_table_wrap .tbody_ul").selectable({
|
$(".receipt_number_table_wrap .tbody_ul").selectable({
|
||||||
selecting: function (event, ui) {
|
filter: "li",
|
||||||
console.log("selecting");
|
stop: function () {
|
||||||
$(ui.selecting).find("input[type='checkbox']").attr("checked", "checked");
|
$(".ui-selected input",this).each(function () {
|
||||||
},
|
this.checked = !this.checked;
|
||||||
selected: function (event, ui) {
|
if ($(this).is(':checked')) {
|
||||||
if ($(ui.selected).find("input[type='checkbox']").attr("checked") == true) {
|
$(this).closest(".ui-widget-content").addClass("ui-selected");
|
||||||
console.log("selected remove");
|
|
||||||
$(ui.selected).find("input[type='checkbox']").removeAttr("checked");
|
|
||||||
} else {
|
} else {
|
||||||
console.log("selected checed");
|
$(this).closest(".ui-widget-content").removeClass("ui-selected");
|
||||||
$(ui.selected).find("input[type='checkbox']").attr("checked", "checked");
|
|
||||||
}
|
}
|
||||||
|
publishCommon.clickCheckPrice();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$(".receipt_number_table_wrap .tbody_ul input[type='checkbox']",".receipt_number_table_wrap .tbody_ul input[type='checkbox']+label").click(function () {
|
||||||
|
if ($(this).is(':checked')) {
|
||||||
|
$(this).closest(".ui-widget-content").addClass("ui-selected");
|
||||||
|
} else {
|
||||||
|
$(this).closest(".ui-widget-content").removeClass("ui-selected");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#checkAll").click(function(){
|
||||||
|
|
||||||
|
var checkbox = $('[name=chkCallTo]');
|
||||||
|
var btnAllVal = $("#checkAll").val();
|
||||||
|
|
||||||
|
if($(this).is(":checked") == true){
|
||||||
|
checkbox.prop("checked",false);
|
||||||
|
}else{
|
||||||
|
|
||||||
|
//전체선택 체크해주기
|
||||||
|
if(btnAllVal == 'N'){
|
||||||
|
|
||||||
|
//publishCommon.longMousePressCheck(checkbox, 20);
|
||||||
|
publishCommon.clickCheckAll();
|
||||||
|
|
||||||
|
}else{//전체선택 해제해주기
|
||||||
|
|
||||||
|
$("input:checkbox[name='chkCallTo']").each(function () {
|
||||||
|
$(this).prop("checked",false);
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#checkAll").val("N");
|
||||||
|
$("#checkAll").text("전체선택");
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
publishCommon.clickCheckPrice();
|
publishCommon.clickCheckPrice();
|
||||||
},
|
|
||||||
unselecting: function (event, ui) {
|
|
||||||
console.log("unselecting");
|
|
||||||
$(ui.unselecting).find("input[type='checkbox']").removeAttr("checked");
|
|
||||||
},
|
|
||||||
unselected: function (event, ui) {
|
|
||||||
$(ui.unselected).find("input[type='checkbox']").removeAttr("checked");
|
|
||||||
publishCommon.clickCheckPrice();
|
|
||||||
},
|
|
||||||
filter: "li"
|
|
||||||
});
|
});
|
||||||
|
|
||||||
onlongclick(".btn_check_one", 1000, function () {
|
onlongclick(".btn_check_one", 1000, function () {
|
||||||
var checkbox = $('[name=chkCallTo]');
|
var checkbox = $('[name=chkCallTo]');
|
||||||
publishCommon.longMousePressCheck(checkbox, 10, $(".btn_check_one"));
|
publishCommon.longMousePressCheck(checkbox, 10, $(".btn_check_one"));
|
||||||
publishCommon.clickCheckPrice();
|
publishCommon.clickCheckPrice();
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".btn_check_one").click(function(){
|
$(".btn_check_one").click(function(){
|
||||||
@ -322,17 +347,8 @@ function addTWCallToInfo(){
|
|||||||
publishCommon.clickCheckPrice();
|
publishCommon.clickCheckPrice();
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#checkAll").click(function(){
|
|
||||||
|
|
||||||
publishCommon.clickCheckAll();
|
|
||||||
publishCommon.clickCheckPrice();
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
|
||||||
//수신자 목록 추가된 건수 및 발송 금액 변경해주기
|
|
||||||
fnChkCallToChange();
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
//후보자 등록 체크
|
//후보자 등록 체크
|
||||||
@ -343,7 +359,6 @@ function addTWCallToInfo(){
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//받는사람 하단 페이징 처리
|
//받는사람 하단 페이징 처리
|
||||||
function fnCallToListPaging(pageIndex){
|
function fnCallToListPaging(pageIndex){
|
||||||
|
|
||||||
@ -3419,6 +3434,14 @@ function getMjMsgSentListAll(pageNo) {
|
|||||||
<input type="hidden" name="searchSortOrd" value="" />
|
<input type="hidden" name="searchSortOrd" value="" />
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<!-- 문자 전송 완료 후 toast(시작) -->
|
||||||
|
<div class="toast_popup success">
|
||||||
|
<i class="icon check"></i>
|
||||||
|
<p class="title">처리가 완료되었습니다.</p>
|
||||||
|
<button type="button" class="btn_close" onclick="publishCommon.toastsUtil('','active','success')"><i></i></button>
|
||||||
|
</div>
|
||||||
|
<!-- 문자 전송 완료 후 toast(끝) -->
|
||||||
|
|
||||||
<!-- 2023 10 16 재전송 : 상세내용 팝업 -->
|
<!-- 2023 10 16 재전송 : 상세내용 팝업 -->
|
||||||
<div class="tooltip-wrap" style="z-index:110;">
|
<div class="tooltip-wrap" style="z-index:110;">
|
||||||
<div class="popup-com adr_layer rev_popup01" tabindex="0" data-tooltip-con="rev_popup01"
|
<div class="popup-com adr_layer rev_popup01" tabindex="0" data-tooltip-con="rev_popup01"
|
||||||
@ -4295,7 +4318,6 @@ function getMjMsgSentListAll(pageNo) {
|
|||||||
</ul>
|
</ul>
|
||||||
<div class="list_bottom_right">
|
<div class="list_bottom_right">
|
||||||
<button type="button" class="btnType btn_gray fill" id="checkAll" name="receipt_number_check" value="N">전체선택</button>
|
<button type="button" class="btnType btn_gray fill" id="checkAll" name="receipt_number_check" value="N">전체선택</button>
|
||||||
<!-- <button type="button" class="btnType btn_gray fill" onclick="fnCallToListReset();">초기화</button> -->
|
|
||||||
<div class="btn_popup_wrap">
|
<div class="btn_popup_wrap">
|
||||||
<button type="button" class="btnType btn_yellow fill btn_check_one">1명씩 선택<i class="qmMark"></i></button>
|
<button type="button" class="btnType btn_yellow fill btn_check_one">1명씩 선택<i class="qmMark"></i></button>
|
||||||
<div class="error_hover_cont send_hover_cont">
|
<div class="error_hover_cont send_hover_cont">
|
||||||
|
|||||||
@ -1663,7 +1663,7 @@ function sendMsgAjax(paramSmsCnt, paramBlockCnt){
|
|||||||
|
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
$('.pop_msg_success').css({'display':'block','opacity':'1','left':'50%','top':'50%','transform':'translate(-50%,-50%)'});
|
/* $('.pop_msg_success').css({'display':'block','opacity':'1','left':'50%','top':'50%','transform':'translate(-50%,-50%)'});
|
||||||
|
|
||||||
//예약발송 건의 경우 결과 팝업 문구 변경
|
//예약발송 건의 경우 결과 팝업 문구 변경
|
||||||
if(reserYn == 'Y'){
|
if(reserYn == 'Y'){
|
||||||
@ -1672,7 +1672,17 @@ function sendMsgAjax(paramSmsCnt, paramBlockCnt){
|
|||||||
$('.pop_msg_success .msg_text').html("발송 성공 : <strong>"+ smsCnt + "</strong>건,수신거부 : <span>" + blockCnt + "</span>건의<br>문자가 발송 되었습니다.");
|
$('.pop_msg_success .msg_text').html("발송 성공 : <strong>"+ smsCnt + "</strong>건,수신거부 : <span>" + blockCnt + "</span>건의<br>문자가 발송 되었습니다.");
|
||||||
}
|
}
|
||||||
|
|
||||||
$('.mask').addClass('on');
|
$('.mask').addClass('on'); */
|
||||||
|
|
||||||
|
//문자 예약 및 발송이 완료되면 토스트 메세지 띄워 주기
|
||||||
|
if(reserYn == 'Y'){
|
||||||
|
publishCommon.toastsUtil('문자 예약이 완료되었습니다.','active','success');
|
||||||
|
}else{
|
||||||
|
publishCommon.toastsUtil('문자 발송이 완료되었습니다.','active','success');
|
||||||
|
}
|
||||||
|
|
||||||
|
//받는사람 리스트 새로 갱신해주기
|
||||||
|
addTWCallToInfo();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -883,6 +883,36 @@ function setCursorInsertText(pTxtArea, pAddTxt) {
|
|||||||
txtArea.focus();
|
txtArea.focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//받는사람 목록의 체크박스가 20개가 모두 체크 되었는지 확인
|
||||||
|
function fnCallToChkAllCnt(){
|
||||||
|
|
||||||
|
var chkCnt = 0;
|
||||||
|
var totChkCnt = $("input:checkbox[name='chkCallTo']").length;
|
||||||
|
var btnAllVal = $("#checkAll").val();
|
||||||
|
|
||||||
|
//체크박스 체크된 갯수 구하기
|
||||||
|
$("input:checkbox[name='chkCallTo']").each(function () {
|
||||||
|
if($(this).is(':checked')){
|
||||||
|
chkCnt++;
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
//전체선택 체크 여부 값 변경해 주기
|
||||||
|
//현재 체크된 체크박스 갯수와 전체 체크박스 갯수 비교하기
|
||||||
|
if(totChkCnt > 0 && totChkCnt == chkCnt){
|
||||||
|
|
||||||
|
if(btnAllVal == 'N'){
|
||||||
|
$("#checkAll").val("Y");
|
||||||
|
$("#checkAll").text("선택해제");
|
||||||
|
}else{
|
||||||
|
$("#checkAll").val("N");
|
||||||
|
$("#checkAll").text("전체선택");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
//선거문자 20건 수신자 목록 추가된 건수 및 발송 금액 변경해주기
|
//선거문자 20건 수신자 목록 추가된 건수 및 발송 금액 변경해주기
|
||||||
function fnChkCallToChange(){
|
function fnChkCallToChange(){
|
||||||
|
|
||||||
@ -895,6 +925,9 @@ function fnChkCallToChange(){
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//체크박스가 모두 체크 되어있는지 확인 하기
|
||||||
|
fnCallToChkAllCnt();
|
||||||
|
|
||||||
updateTotCnt(callToCnt); //전체 데이터 갯수 구하기
|
updateTotCnt(callToCnt); //전체 데이터 갯수 구하기
|
||||||
totalPriceSum(callToCnt);
|
totalPriceSum(callToCnt);
|
||||||
|
|
||||||
|
|||||||
@ -19,8 +19,8 @@ var publishCommon = {
|
|||||||
if (this.count == 0) {} else if (cnt >= checkLength) {
|
if (this.count == 0) {} else if (cnt >= checkLength) {
|
||||||
clearInterval(checkEvent); // 자동체크 끝.
|
clearInterval(checkEvent); // 자동체크 끝.
|
||||||
}
|
}
|
||||||
//$(checkTarget[cnt]).prop('checked', true); // 체크박스 체크.
|
$(checkTarget[cnt]).prop('checked', true); // 체크박스 체크.
|
||||||
$(checkTarget[cnt]).attr("checked", "checked"); // 체크박스 체크.
|
//$(checkTarget[cnt]).attr("checked", "checked"); // 체크박스 체크.
|
||||||
$($target).on("mouseup", function () {
|
$($target).on("mouseup", function () {
|
||||||
//마우스떼면 멈춤
|
//마우스떼면 멈춤
|
||||||
clearInterval(checkEvent);
|
clearInterval(checkEvent);
|
||||||
@ -37,8 +37,8 @@ var publishCommon = {
|
|||||||
var chkSts = $(this).is(":checked");
|
var chkSts = $(this).is(":checked");
|
||||||
|
|
||||||
if (!chkSts) {
|
if (!chkSts) {
|
||||||
$(this).attr("checked", "checked");
|
//$(this).attr("checked", "checked");
|
||||||
//$(this).prop("checked","true");
|
$(this).prop("checked",true);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -61,22 +61,16 @@ var publishCommon = {
|
|||||||
$("input:checkbox[name='chkCallTo']").each(function () {
|
$("input:checkbox[name='chkCallTo']").each(function () {
|
||||||
|
|
||||||
if (btnAllVal == 'N') {
|
if (btnAllVal == 'N') {
|
||||||
$(this).attr("checked", "checked");
|
//$(this).attr("checked", "checked");
|
||||||
//$(this).prop("checked",true);
|
$(this).prop("checked",true);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$(this).removeAttr("checked");
|
//$(this).removeAttr("checked");
|
||||||
//$(this).prop("checked",false);
|
$(this).prop("checked",false);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
//전체선택 체크 여부 값 변경해 주기
|
|
||||||
if(btnAllVal == 'N'){
|
|
||||||
$("#checkAll").val("Y");
|
|
||||||
}else{
|
|
||||||
$("#checkAll").val("N");
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
clickCheckPrice: function () {
|
clickCheckPrice: function () {
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user