선거문자 20건 분할발송 기능 추가 - 전체선택/해제 기능 추가 - 초기화 버튼 위치 변경 - 문자 발송 완료 메세지 토스트 메세지 방식으로 변경
- 전체선택/해제 기능 추가 - 초기화 버튼 위치 변경 - 문자 발송 완료 메세지 토스트 메세지 방식으로 변경
@16c2f518d8189313682c01dc547c6f78355b8895
--- src/main/webapp/WEB-INF/jsp/web/msgcampain/tw/MsgTWDataCallToListView.jsp
+++ src/main/webapp/WEB-INF/jsp/web/msgcampain/tw/MsgTWDataCallToListView.jsp
... | ... | @@ -79,7 +79,6 @@ |
| 79 | 79 |
</c:choose> |
| 80 | 80 |
<div class="list_bottom_right"> |
| 81 | 81 |
<button type="button" class="btnType btn_gray fill" id="checkAll" name="receipt_number_check" value="N">전체선택</button> |
| 82 |
- <!-- <button type="button" class="btnType btn_gray fill" onclick="fnCallToListReset();">초기화</button> --> |
|
| 83 | 82 |
<div class="btn_popup_wrap"> |
| 84 | 83 |
<button type="button" class="btnType btn_yellow fill btn_check_one">1명씩 선택<i class="qmMark"></i></button> |
| 85 | 84 |
<div class="error_hover_cont send_hover_cont"> |
--- src/main/webapp/WEB-INF/jsp/web/msgcampain/tw/MsgTWDataSMLView.jsp
+++ src/main/webapp/WEB-INF/jsp/web/msgcampain/tw/MsgTWDataSMLView.jsp
... | ... | @@ -283,37 +283,62 @@ |
| 283 | 283 |
|
| 284 | 284 |
$(document).ready(function () {
|
| 285 | 285 |
$(".receipt_number_table_wrap .tbody_ul").selectable({
|
| 286 |
- selecting: function (event, ui) {
|
|
| 287 |
- console.log("selecting");
|
|
| 288 |
- $(ui.selecting).find("input[type='checkbox']").attr("checked", "checked");
|
|
| 289 |
- }, |
|
| 290 |
- selected: function (event, ui) {
|
|
| 291 |
- if ($(ui.selected).find("input[type='checkbox']").attr("checked") == true) {
|
|
| 292 |
- console.log("selected remove");
|
|
| 293 |
- $(ui.selected).find("input[type='checkbox']").removeAttr("checked");
|
|
| 294 |
- } else {
|
|
| 295 |
- console.log("selected checed");
|
|
| 296 |
- $(ui.selected).find("input[type='checkbox']").attr("checked", "checked");
|
|
| 297 |
- } |
|
| 286 |
+ filter: "li", |
|
| 287 |
+ stop: function () {
|
|
| 288 |
+ $(".ui-selected input",this).each(function () {
|
|
| 289 |
+ this.checked = !this.checked; |
|
| 290 |
+ if ($(this).is(':checked')) {
|
|
| 291 |
+ $(this).closest(".ui-widget-content").addClass("ui-selected");
|
|
| 292 |
+ } else {
|
|
| 293 |
+ $(this).closest(".ui-widget-content").removeClass("ui-selected");
|
|
| 294 |
+ } |
|
| 295 |
+ publishCommon.clickCheckPrice(); |
|
| 296 |
+ }); |
|
| 297 |
+ } |
|
| 298 |
+ }); |
|
| 299 |
+ |
|
| 300 |
+ $(".receipt_number_table_wrap .tbody_ul input[type='checkbox']",".receipt_number_table_wrap .tbody_ul input[type='checkbox']+label").click(function () {
|
|
| 301 |
+ if ($(this).is(':checked')) {
|
|
| 302 |
+ $(this).closest(".ui-widget-content").addClass("ui-selected");
|
|
| 303 |
+ } else {
|
|
| 304 |
+ $(this).closest(".ui-widget-content").removeClass("ui-selected");
|
|
| 305 |
+ } |
|
| 306 |
+ }); |
|
| 307 |
+ |
|
| 308 |
+ $("#checkAll").click(function(){
|
|
| 309 |
+ |
|
| 310 |
+ var checkbox = $('[name=chkCallTo]');
|
|
| 311 |
+ var btnAllVal = $("#checkAll").val();
|
|
| 312 |
+ |
|
| 313 |
+ if($(this).is(":checked") == true){
|
|
| 314 |
+ checkbox.prop("checked",false);
|
|
| 315 |
+ }else{
|
|
| 298 | 316 |
|
| 317 |
+ //전체선택 체크해주기 |
|
| 318 |
+ if(btnAllVal == 'N'){
|
|
| 319 |
+ |
|
| 320 |
+ //publishCommon.longMousePressCheck(checkbox, 20); |
|
| 321 |
+ publishCommon.clickCheckAll(); |
|
| 322 |
+ |
|
| 323 |
+ }else{//전체선택 해제해주기
|
|
| 324 |
+ |
|
| 325 |
+ $("input:checkbox[name='chkCallTo']").each(function () {
|
|
| 326 |
+ $(this).prop("checked",false);
|
|
| 327 |
+ }); |
|
| 328 |
+ |
|
| 329 |
+ $("#checkAll").val("N");
|
|
| 330 |
+ $("#checkAll").text("전체선택");
|
|
| 331 |
+ |
|
| 332 |
+ } |
|
| 333 |
+ } |
|
| 299 | 334 |
publishCommon.clickCheckPrice(); |
| 300 |
- }, |
|
| 301 |
- unselecting: function (event, ui) {
|
|
| 302 |
- console.log("unselecting");
|
|
| 303 |
- $(ui.unselecting).find("input[type='checkbox']").removeAttr("checked");
|
|
| 304 |
- }, |
|
| 305 |
- unselected: function (event, ui) {
|
|
| 306 |
- $(ui.unselected).find("input[type='checkbox']").removeAttr("checked");
|
|
| 307 |
- publishCommon.clickCheckPrice(); |
|
| 308 |
- }, |
|
| 309 |
- filter: "li" |
|
| 335 |
+ |
|
| 310 | 336 |
}); |
| 311 | 337 |
|
| 312 | 338 |
onlongclick(".btn_check_one", 1000, function () {
|
| 313 | 339 |
var checkbox = $('[name=chkCallTo]');
|
| 314 | 340 |
publishCommon.longMousePressCheck(checkbox, 10, $(".btn_check_one"));
|
| 315 | 341 |
publishCommon.clickCheckPrice(); |
| 316 |
- |
|
| 317 | 342 |
}); |
| 318 | 343 |
|
| 319 | 344 |
$(".btn_check_one").click(function(){
|
... | ... | @@ -322,16 +347,7 @@ |
| 322 | 347 |
publishCommon.clickCheckPrice(); |
| 323 | 348 |
}); |
| 324 | 349 |
|
| 325 |
- $("#checkAll").click(function(){
|
|
| 326 |
- |
|
| 327 |
- publishCommon.clickCheckAll(); |
|
| 328 |
- publishCommon.clickCheckPrice(); |
|
| 329 |
- |
|
| 330 |
- }); |
|
| 331 |
- |
|
| 332 | 350 |
}); |
| 333 |
- //수신자 목록 추가된 건수 및 발송 금액 변경해주기 |
|
| 334 |
- fnChkCallToChange(); |
|
| 335 | 351 |
|
| 336 | 352 |
}); |
| 337 | 353 |
|
... | ... | @@ -342,7 +358,6 @@ |
| 342 | 358 |
}; |
| 343 | 359 |
|
| 344 | 360 |
} |
| 345 |
- |
|
| 346 | 361 |
|
| 347 | 362 |
//받는사람 하단 페이징 처리 |
| 348 | 363 |
function fnCallToListPaging(pageIndex){
|
... | ... | @@ -3419,6 +3434,14 @@ |
| 3419 | 3434 |
<input type="hidden" name="searchSortOrd" value="" /> |
| 3420 | 3435 |
</form> |
| 3421 | 3436 |
|
| 3437 |
+ <!-- 문자 전송 완료 후 toast(시작) --> |
|
| 3438 |
+ <div class="toast_popup success"> |
|
| 3439 |
+ <i class="icon check"></i> |
|
| 3440 |
+ <p class="title">처리가 완료되었습니다.</p> |
|
| 3441 |
+ <button type="button" class="btn_close" onclick="publishCommon.toastsUtil('','active','success')"><i></i></button>
|
|
| 3442 |
+ </div> |
|
| 3443 |
+ <!-- 문자 전송 완료 후 toast(끝) --> |
|
| 3444 |
+ |
|
| 3422 | 3445 |
<!-- 2023 10 16 재전송 : 상세내용 팝업 --> |
| 3423 | 3446 |
<div class="tooltip-wrap" style="z-index:110;"> |
| 3424 | 3447 |
<div class="popup-com adr_layer rev_popup01" tabindex="0" data-tooltip-con="rev_popup01" |
... | ... | @@ -4295,7 +4318,6 @@ |
| 4295 | 4318 |
</ul> |
| 4296 | 4319 |
<div class="list_bottom_right"> |
| 4297 | 4320 |
<button type="button" class="btnType btn_gray fill" id="checkAll" name="receipt_number_check" value="N">전체선택</button> |
| 4298 |
- <!-- <button type="button" class="btnType btn_gray fill" onclick="fnCallToListReset();">초기화</button> --> |
|
| 4299 | 4321 |
<div class="btn_popup_wrap"> |
| 4300 | 4322 |
<button type="button" class="btnType btn_yellow fill btn_check_one">1명씩 선택<i class="qmMark"></i></button> |
| 4301 | 4323 |
<div class="error_hover_cont send_hover_cont"> |
--- src/main/webapp/WEB-INF/jsp/web/msgcampain/tw/MsgTWDataView.jsp
+++ src/main/webapp/WEB-INF/jsp/web/msgcampain/tw/MsgTWDataView.jsp
... | ... | @@ -1663,7 +1663,7 @@ |
| 1663 | 1663 |
|
| 1664 | 1664 |
}else{
|
| 1665 | 1665 |
|
| 1666 |
- $('.pop_msg_success').css({'display':'block','opacity':'1','left':'50%','top':'50%','transform':'translate(-50%,-50%)'});
|
|
| 1666 |
+ /* $('.pop_msg_success').css({'display':'block','opacity':'1','left':'50%','top':'50%','transform':'translate(-50%,-50%)'});
|
|
| 1667 | 1667 |
|
| 1668 | 1668 |
//예약발송 건의 경우 결과 팝업 문구 변경 |
| 1669 | 1669 |
if(reserYn == 'Y'){
|
... | ... | @@ -1672,7 +1672,17 @@ |
| 1672 | 1672 |
$('.pop_msg_success .msg_text').html("발송 성공 : <strong>"+ smsCnt + "</strong>건,수신거부 : <span>" + blockCnt + "</span>건의<br>문자가 발송 되었습니다.");
|
| 1673 | 1673 |
} |
| 1674 | 1674 |
|
| 1675 |
- $('.mask').addClass('on');
|
|
| 1675 |
+ $('.mask').addClass('on'); */
|
|
| 1676 |
+ |
|
| 1677 |
+ //문자 예약 및 발송이 완료되면 토스트 메세지 띄워 주기 |
|
| 1678 |
+ if(reserYn == 'Y'){
|
|
| 1679 |
+ publishCommon.toastsUtil('문자 예약이 완료되었습니다.','active','success');
|
|
| 1680 |
+ }else{
|
|
| 1681 |
+ publishCommon.toastsUtil('문자 발송이 완료되었습니다.','active','success');
|
|
| 1682 |
+ } |
|
| 1683 |
+ |
|
| 1684 |
+ //받는사람 리스트 새로 갱신해주기 |
|
| 1685 |
+ addTWCallToInfo(); |
|
| 1676 | 1686 |
|
| 1677 | 1687 |
} |
| 1678 | 1688 |
|
--- src/main/webapp/js/MJUtill.js
+++ src/main/webapp/js/MJUtill.js
... | ... | @@ -883,6 +883,36 @@ |
| 883 | 883 |
txtArea.focus(); |
| 884 | 884 |
} |
| 885 | 885 |
|
| 886 |
+//받는사람 목록의 체크박스가 20개가 모두 체크 되었는지 확인 |
|
| 887 |
+function fnCallToChkAllCnt(){
|
|
| 888 |
+ |
|
| 889 |
+ var chkCnt = 0; |
|
| 890 |
+ var totChkCnt = $("input:checkbox[name='chkCallTo']").length;
|
|
| 891 |
+ var btnAllVal = $("#checkAll").val();
|
|
| 892 |
+ |
|
| 893 |
+ //체크박스 체크된 갯수 구하기 |
|
| 894 |
+ $("input:checkbox[name='chkCallTo']").each(function () {
|
|
| 895 |
+ if($(this).is(':checked')){
|
|
| 896 |
+ chkCnt++; |
|
| 897 |
+ }; |
|
| 898 |
+ }); |
|
| 899 |
+ |
|
| 900 |
+ //전체선택 체크 여부 값 변경해 주기 |
|
| 901 |
+ //현재 체크된 체크박스 갯수와 전체 체크박스 갯수 비교하기 |
|
| 902 |
+ if(totChkCnt > 0 && totChkCnt == chkCnt){
|
|
| 903 |
+ |
|
| 904 |
+ if(btnAllVal == 'N'){
|
|
| 905 |
+ $("#checkAll").val("Y");
|
|
| 906 |
+ $("#checkAll").text("선택해제");
|
|
| 907 |
+ }else{
|
|
| 908 |
+ $("#checkAll").val("N");
|
|
| 909 |
+ $("#checkAll").text("전체선택");
|
|
| 910 |
+ } |
|
| 911 |
+ |
|
| 912 |
+ } |
|
| 913 |
+ |
|
| 914 |
+} |
|
| 915 |
+ |
|
| 886 | 916 |
//선거문자 20건 수신자 목록 추가된 건수 및 발송 금액 변경해주기 |
| 887 | 917 |
function fnChkCallToChange(){
|
| 888 | 918 |
|
... | ... | @@ -895,6 +925,9 @@ |
| 895 | 925 |
} |
| 896 | 926 |
}); |
| 897 | 927 |
|
| 928 |
+ //체크박스가 모두 체크 되어있는지 확인 하기 |
|
| 929 |
+ fnCallToChkAllCnt(); |
|
| 930 |
+ |
|
| 898 | 931 |
updateTotCnt(callToCnt); //전체 데이터 갯수 구하기 |
| 899 | 932 |
totalPriceSum(callToCnt); |
| 900 | 933 |
|
--- src/main/webapp/publish/js/publish.js
+++ src/main/webapp/publish/js/publish.js
... | ... | @@ -19,8 +19,8 @@ |
| 19 | 19 |
if (this.count == 0) {} else if (cnt >= checkLength) {
|
| 20 | 20 |
clearInterval(checkEvent); // 자동체크 끝. |
| 21 | 21 |
} |
| 22 |
- //$(checkTarget[cnt]).prop('checked', true); // 체크박스 체크.
|
|
| 23 |
- $(checkTarget[cnt]).attr("checked", "checked"); // 체크박스 체크.
|
|
| 22 |
+ $(checkTarget[cnt]).prop('checked', true); // 체크박스 체크.
|
|
| 23 |
+ //$(checkTarget[cnt]).attr("checked", "checked"); // 체크박스 체크.
|
|
| 24 | 24 |
$($target).on("mouseup", function () {
|
| 25 | 25 |
//마우스떼면 멈춤 |
| 26 | 26 |
clearInterval(checkEvent); |
... | ... | @@ -37,8 +37,8 @@ |
| 37 | 37 |
var chkSts = $(this).is(":checked");
|
| 38 | 38 |
|
| 39 | 39 |
if (!chkSts) {
|
| 40 |
- $(this).attr("checked", "checked");
|
|
| 41 |
- //$(this).prop("checked","true");
|
|
| 40 |
+ //$(this).attr("checked", "checked");
|
|
| 41 |
+ $(this).prop("checked",true);
|
|
| 42 | 42 |
return false; |
| 43 | 43 |
} |
| 44 | 44 |
|
... | ... | @@ -61,22 +61,16 @@ |
| 61 | 61 |
$("input:checkbox[name='chkCallTo']").each(function () {
|
| 62 | 62 |
|
| 63 | 63 |
if (btnAllVal == 'N') {
|
| 64 |
- $(this).attr("checked", "checked");
|
|
| 65 |
- //$(this).prop("checked",true);
|
|
| 64 |
+ //$(this).attr("checked", "checked");
|
|
| 65 |
+ $(this).prop("checked",true);
|
|
| 66 | 66 |
|
| 67 | 67 |
} else {
|
| 68 |
- $(this).removeAttr("checked");
|
|
| 69 |
- //$(this).prop("checked",false);
|
|
| 68 |
+ //$(this).removeAttr("checked");
|
|
| 69 |
+ $(this).prop("checked",false);
|
|
| 70 | 70 |
} |
| 71 | 71 |
|
| 72 | 72 |
}); |
| 73 | 73 |
|
| 74 |
- //전체선택 체크 여부 값 변경해 주기 |
|
| 75 |
- if(btnAllVal == 'N'){
|
|
| 76 |
- $("#checkAll").val("Y");
|
|
| 77 |
- }else{
|
|
| 78 |
- $("#checkAll").val("N");
|
|
| 79 |
- } |
|
| 80 | 74 |
}, |
| 81 | 75 |
clickCheckPrice: function () {
|
| 82 | 76 |
|
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?