--- src/main/webapp/WEB-INF/jsp/web/addr/AddrList.jsp
+++ src/main/webapp/WEB-INF/jsp/web/addr/AddrList.jsp
... | ... | @@ -326,16 +326,17 @@ |
| 326 | 326 |
// } |
| 327 | 327 |
if (confirm(confirmMsg)) {
|
| 328 | 328 |
//로딩창 show |
| 329 |
-// $('.loading_layer').addClass('active');
|
|
| 329 |
+ fn_loadAddActive(); |
|
| 330 | 330 |
|
| 331 |
-// setTimeout(setSenderList_advc, 1000); |
|
| 332 |
- $('.loading_layer').addClass('active');
|
|
| 333 |
- setSenderList_advc(); |
|
| 331 |
+ setTimeout(setSenderList_advc, 1000); |
|
| 332 |
+ |
|
| 333 |
+// fn_loadAddActive(); |
|
| 334 |
+// setSenderList_advc(); |
|
| 334 | 335 |
} |
| 335 | 336 |
} |
| 336 | 337 |
|
| 337 | 338 |
// 주소록 등록 advc |
| 338 |
-function setSenderList_advc(){
|
|
| 339 |
+/* function setSenderList_advc(){
|
|
| 339 | 340 |
|
| 340 | 341 |
// tab에 해당하는 타블레이터 가져오기 |
| 341 | 342 |
var $objTabul = fn_utils_getTabulator(); |
... | ... | @@ -388,33 +389,36 @@ |
| 388 | 389 |
}); |
| 389 | 390 |
} |
| 390 | 391 |
|
| 391 |
- |
|
| 392 |
- /* |
|
| 392 |
+ */ |
|
| 393 |
+ |
|
| 393 | 394 |
function setSenderList_advc(){
|
| 394 | 395 |
var $objTabul = fn_utils_getTabulator(); |
| 395 | 396 |
var dataToSend = $objTabul.getData(); |
| 396 | 397 |
var addrGrpIdInfo = $("#addrGrpIdInfo").val();
|
| 397 | 398 |
var addrGrpNmInfo = $("#addrGrpNm").val();
|
| 398 | 399 |
|
| 399 |
- var batchSize = 20000; // 배치 크기 |
|
| 400 |
+ var batchSize = 50000; // 배치 크기 |
|
| 400 | 401 |
var totalBatches = Math.ceil(dataToSend.length / batchSize); // 총 배치 수 |
| 401 | 402 |
var currentBatch = 0; // 현재 배치 인덱스 |
| 402 | 403 |
|
| 404 |
+ |
|
| 403 | 405 |
fn_loadAddActive(); |
| 404 |
- |
|
| 405 | 406 |
|
| 406 | 407 |
function sendBatch() {
|
| 407 | 408 |
if (currentBatch < totalBatches) {
|
| 409 |
+ fn_loadAddActive(); |
|
| 408 | 410 |
var start = currentBatch * batchSize; |
| 409 | 411 |
var end = Math.min(start + batchSize, dataToSend.length); |
| 410 | 412 |
var batchData = dataToSend.slice(start, end); |
| 411 | 413 |
|
| 414 |
+ console.time('updateData');
|
|
| 412 | 415 |
var updateData = batchData.map(row => {
|
| 413 | 416 |
row.addrGrpId = addrGrpIdInfo; |
| 414 | 417 |
row.addrGrpNm = addrGrpNmInfo; |
| 415 | 418 |
return row; |
| 416 | 419 |
}); |
| 417 |
- |
|
| 420 |
+ console.timeEnd('updateData');
|
|
| 421 |
+ |
|
| 418 | 422 |
$.ajax({
|
| 419 | 423 |
type: "POST", |
| 420 | 424 |
url: "/web/mjon/addr/addrMassInsertByTempAjax_advc.do", |
... | ... | @@ -423,6 +427,10 @@ |
| 423 | 427 |
contentType: 'application/json', |
| 424 | 428 |
async: true, |
| 425 | 429 |
success: function (data) {
|
| 430 |
+ |
|
| 431 |
+ |
|
| 432 |
+ fn_loadRemoveActive(); |
|
| 433 |
+ |
|
| 426 | 434 |
console.log('Batch ' + (currentBatch + 1) + ' success: ', data);
|
| 427 | 435 |
if (data.status == 'OK') {
|
| 428 | 436 |
if (currentBatch === totalBatches - 1) {
|
... | ... | @@ -444,18 +452,20 @@ |
| 444 | 452 |
beforeSend: function(xmlHttpRequest) {
|
| 445 | 453 |
}, |
| 446 | 454 |
complete: function(xhr, textStatus) {
|
| 447 |
- console.log('end : ', end);
|
|
| 448 |
- $('#lodingTxt').text(end);
|
|
| 455 |
+ if (currentBatch === totalBatches - 1) {
|
|
| 456 |
+ $('#lodingTxt').text('Loading');
|
|
| 457 |
+ } else {
|
|
| 458 |
+ $('#lodingTxt').text(end+'...');
|
|
| 459 |
+ } |
|
| 449 | 460 |
} |
| 450 | 461 |
}); |
| 451 | 462 |
} |
| 452 | 463 |
} |
| 453 | 464 |
// 첫 번째 배치 전송 시작 |
| 454 | 465 |
sendBatch(); |
| 455 |
- $('.loading_layer').removeClass('active');
|
|
| 456 | 466 |
} |
| 457 | 467 |
|
| 458 |
- */ |
|
| 468 |
+ |
|
| 459 | 469 |
|
| 460 | 470 |
//주소록그룹 콤보박스 유지 |
| 461 | 471 |
function setSelectMassSetting(selectMassVal) {
|
--- src/main/webapp/WEB-INF/jsp/web/custom/MsgCustomPopupAjax.jsp
+++ src/main/webapp/WEB-INF/jsp/web/custom/MsgCustomPopupAjax.jsp
... | ... | @@ -53,6 +53,19 @@ |
| 53 | 53 |
$(".radio12_input").css("display","none");
|
| 54 | 54 |
} |
| 55 | 55 |
}) |
| 56 |
+ |
|
| 57 |
+ |
|
| 58 |
+ // 요청사항 글자수 제한 |
|
| 59 |
+ $("textarea[name='customRequest']").on('input', function() {
|
|
| 60 |
+ var maxLength = 2000; |
|
| 61 |
+ var currentLength = $(this).val().length; |
|
| 62 |
+ |
|
| 63 |
+ if (currentLength > maxLength) {
|
|
| 64 |
+ $(this).val($(this).val().substring(0, maxLength)); |
|
| 65 |
+ } |
|
| 66 |
+ }); |
|
| 67 |
+ |
|
| 68 |
+ |
|
| 56 | 69 |
}); |
| 57 | 70 |
|
| 58 | 71 |
//샘플 이미지 리스트 |
--- src/main/webapp/WEB-INF/jsp/web/msgdata/MsgDataSMLView.jsp
+++ src/main/webapp/WEB-INF/jsp/web/msgdata/MsgDataSMLView.jsp
... | ... | @@ -10,6 +10,90 @@ |
| 10 | 10 |
|
| 11 | 11 |
<% pageContext.setAttribute("newLineChar", "\r\n"); %>
|
| 12 | 12 |
<script type="text/javascript"> |
| 13 |
+ |
|
| 14 |
+ |
|
| 15 |
+ |
|
| 16 |
+ |
|
| 17 |
+$(document).ready(function(){
|
|
| 18 |
+ var currentIndex = 0; |
|
| 19 |
+ var dataLength = tableL.getData().length; |
|
| 20 |
+ |
|
| 21 |
+ |
|
| 22 |
+ $('#btnFirst').on('click', function(){
|
|
| 23 |
+ currentIndex = 0; |
|
| 24 |
+ updateButtons(); |
|
| 25 |
+ fn_previewText(currentIndex); |
|
| 26 |
+ }); |
|
| 27 |
+ |
|
| 28 |
+ $('#btnPrev').on('click', function(){
|
|
| 29 |
+ if (currentIndex > 0) {
|
|
| 30 |
+ currentIndex--; |
|
| 31 |
+ updateButtons(); |
|
| 32 |
+ fn_previewText(currentIndex); |
|
| 33 |
+ } |
|
| 34 |
+ }); |
|
| 35 |
+ |
|
| 36 |
+ $('#btnNext').on('click', function(){
|
|
| 37 |
+ console.log('currentIndex : ', currentIndex);
|
|
| 38 |
+ console.log('dataLength : ', dataLength);
|
|
| 39 |
+ if (currentIndex < dataLength - 1) {
|
|
| 40 |
+ currentIndex++; |
|
| 41 |
+ updateButtons(); |
|
| 42 |
+ fn_previewText(currentIndex); |
|
| 43 |
+ } |
|
| 44 |
+ }); |
|
| 45 |
+ |
|
| 46 |
+ $('#btnLast').on('click', function(){
|
|
| 47 |
+ currentIndex = dataLength - 1; |
|
| 48 |
+ updateButtons(); |
|
| 49 |
+ fn_previewText(currentIndex); |
|
| 50 |
+ }); |
|
| 51 |
+ |
|
| 52 |
+ // Initialize buttons on page load |
|
| 53 |
+ updateButtons(); |
|
| 54 |
+ |
|
| 55 |
+}); |
|
| 56 |
+ |
|
| 57 |
+function updateButtons() {
|
|
| 58 |
+ $('#btnPrev').data('index', currentIndex - 1);
|
|
| 59 |
+ $('#btnNext').data('index', currentIndex + 1);
|
|
| 60 |
+ |
|
| 61 |
+ if (currentIndex <= 0) {
|
|
| 62 |
+ $('#btnPrev').attr('disabled', true);
|
|
| 63 |
+ } else {
|
|
| 64 |
+ $('#btnPrev').attr('disabled', false);
|
|
| 65 |
+ } |
|
| 66 |
+ |
|
| 67 |
+ if (currentIndex >= dataLength - 1) {
|
|
| 68 |
+ $('#btnNext').attr('disabled', true);
|
|
| 69 |
+ } else {
|
|
| 70 |
+ $('#btnNext').attr('disabled', false);
|
|
| 71 |
+ } |
|
| 72 |
+} |
|
| 73 |
+ |
|
| 74 |
+function fn_previewText(rowIndex){
|
|
| 75 |
+ |
|
| 76 |
+ var smsText = $('#smsTxtArea').val()
|
|
| 77 |
+ // 데이터 가져오기 |
|
| 78 |
+ var data = tableL.getData(); |
|
| 79 |
+ |
|
| 80 |
+ // 특정 인덱스(예: 1)로 행을 선택하여 치환 |
|
| 81 |
+ var row = data[rowIndex]; // 인덱스 1의 행을 선택 |
|
| 82 |
+ |
|
| 83 |
+ // 이름 치환 |
|
| 84 |
+ smsText = smsText.replace(/\[\*이름\*\]/g, row.name); |
|
| 85 |
+ |
|
| 86 |
+ // rep1, rep2, rep3, rep4 치환 |
|
| 87 |
+ smsText = smsText.replace(/\[\*1\*\]/g, row.rep1 || ''); |
|
| 88 |
+ smsText = smsText.replace(/\[\*2\*\]/g, row.rep2 || ''); |
|
| 89 |
+ smsText = smsText.replace(/\[\*3\*\]/g, row.rep3 || ''); |
|
| 90 |
+ smsText = smsText.replace(/\[\*4\*\]/g, row.rep4 || ''); |
|
| 91 |
+ |
|
| 92 |
+ // 결과 출력 또는 다른 곳에 사용 |
|
| 93 |
+ console.log(smsText); |
|
| 94 |
+ $('.realtime').text(smsText);
|
|
| 95 |
+} |
|
| 96 |
+ |
|
| 13 | 97 |
var tableErrorData = []; |
| 14 | 98 |
var totRows = 0; // 좌측 받는사람 총 갯수 |
| 15 | 99 |
|
... | ... | @@ -29,8 +113,11 @@ |
| 29 | 113 |
|
| 30 | 114 |
//주소록 불러오기에서 수신자 리스트 tabulator에 데이터 추가해주기 |
| 31 | 115 |
function addPhoneInfo_advc(tableAddr){
|
| 32 |
- |
|
| 33 | 116 |
|
| 117 |
+ // 기존 tableL의 데이터를 가져옵니다. |
|
| 118 |
+ var existingData = tableL.getData(); |
|
| 119 |
+ |
|
| 120 |
+ // 새로운 addrData를 만듭니다. |
|
| 34 | 121 |
var addrData = tableAddr.getData().map((row, index) => ({
|
| 35 | 122 |
name: row.addrName, |
| 36 | 123 |
phone: removeDash(row.addrPhone), |
... | ... | @@ -39,9 +126,13 @@ |
| 39 | 126 |
rep3: row.addrRep3, |
| 40 | 127 |
rep4: row.addrRep4, |
| 41 | 128 |
})); |
| 42 |
- |
|
| 43 |
- tableL.setData(addrData); |
|
| 44 | 129 |
|
| 130 |
+ // 기존 데이터와 새로운 데이터를 합칩니다. |
|
| 131 |
+ var combinedData = existingData.concat(addrData); |
|
| 132 |
+ |
|
| 133 |
+ // 합쳐진 데이터를 tableL에 설정합니다. |
|
| 134 |
+ tableL.setData(combinedData); |
|
| 135 |
+ |
|
| 45 | 136 |
/* |
| 46 | 137 |
var idx = 0; |
| 47 | 138 |
var newData = data;//중복 연락처는 하나만 남기고 모두 제거 |
... | ... | @@ -590,6 +681,8 @@ |
| 590 | 681 |
|
| 591 | 682 |
//문자 내용 입력시 바이트수 계산하기 |
| 592 | 683 |
$('#smsTxtArea').keyup(function(e){
|
| 684 |
+ console.log("11$('.preview_auto').test() :: ",$('.realtime').html())
|
|
| 685 |
+ console.log("11$('.preview_auto').test() :: ",$('.realtime').text())
|
|
| 593 | 686 |
|
| 594 | 687 |
var contents = $(this).val(); |
| 595 | 688 |
var adrYn = $("input[name=send_adYn]:checked").val();
|
... | ... | @@ -614,7 +707,7 @@ |
| 614 | 707 |
fnByteString(contents); |
| 615 | 708 |
|
| 616 | 709 |
} |
| 617 |
- |
|
| 710 |
+ |
|
| 618 | 711 |
|
| 619 | 712 |
|
| 620 | 713 |
|
... | ... | @@ -2140,7 +2233,7 @@ |
| 2140 | 2233 |
$('.none_txt').text("내용을 입력해주세요.");
|
| 2141 | 2234 |
|
| 2142 | 2235 |
} |
| 2143 |
- |
|
| 2236 |
+ |
|
| 2144 | 2237 |
//미리보기에 내용 입력해 주기 |
| 2145 | 2238 |
$('.realtime').text(contents);
|
| 2146 | 2239 |
|
... | ... | @@ -4159,14 +4252,14 @@ |
| 4159 | 4252 |
<!-- //텍스트 미리보기 --> |
| 4160 | 4253 |
</div> |
| 4161 | 4254 |
</div> |
| 4162 |
- <p class="addText">※ 단말기 설정에 따라 다르게 보일 수 있습니다</p> |
|
| 4163 |
- <div class="preview_util"> |
|
| 4164 |
- <button type="button"><img src="/publish/images/content/page_first.png"></button> |
|
| 4165 |
- <button type="button"><img src="/publish/images/content/page_prev.png"></button> |
|
| 4166 |
- <p>미리보기</p> |
|
| 4167 |
- <button type="button"><img src="/publish/images/content/page_next.png"></button> |
|
| 4168 |
- <button type="button"><img src="/publish/images/content/page_last.png"></button> |
|
| 4169 |
- </div> |
|
| 4255 |
+ <p class="addText">※ 단말기 설정에 따라 다르게 보일 수 있습니다</p> |
|
| 4256 |
+ <div class="preview_util"> |
|
| 4257 |
+ <button type="button" id="btnFirst"><img src="/publish/images/content/page_first.png"></button> |
|
| 4258 |
+ <button type="button" id="btnPrev" data-index="0"><img src="/publish/images/content/page_prev.png"></button> |
|
| 4259 |
+ <p>미리보기</p> |
|
| 4260 |
+ <button type="button" id="btnNext" data-index="1"><img src="/publish/images/content/page_next.png"></button> |
|
| 4261 |
+ <button type="button" id="btnLast"><img src="/publish/images/content/page_last.png"></button> |
|
| 4262 |
+ </div> |
|
| 4170 | 4263 |
</div> |
| 4171 | 4264 |
<div class="phone_bottom"> |
| 4172 | 4265 |
<div class="send_rev"> |
--- src/main/webapp/WEB-INF/jsp/web/msgdata/MsgDataView.jsp
+++ src/main/webapp/WEB-INF/jsp/web/msgdata/MsgDataView.jsp
... | ... | @@ -1136,7 +1136,7 @@ |
| 1136 | 1136 |
if(!emojiCheck(form.mmsSubject.value)) return false; |
| 1137 | 1137 |
} |
| 1138 | 1138 |
|
| 1139 |
- //문자내용에 이모지가 있는지 체크 |
|
| 1139 |
+ //문자내용에 이모지가 있는지 체크 |
|
| 1140 | 1140 |
if(!emojiCheck(strCont)) return false; |
| 1141 | 1141 |
|
| 1142 | 1142 |
if(rtnStr.length > 0){
|
--- src/main/webapp/WEB-INF/jsp/web/msgdata/include/msgDataIncludeExcel.jsp
+++ src/main/webapp/WEB-INF/jsp/web/msgdata/include/msgDataIncludeExcel.jsp
... | ... | @@ -245,7 +245,18 @@ |
| 245 | 245 |
rep4: row.addrInfo4, |
| 246 | 246 |
})); |
| 247 | 247 |
|
| 248 |
- tableL.setData(addrData); |
|
| 248 |
+ |
|
| 249 |
+ |
|
| 250 |
+ |
|
| 251 |
+ |
|
| 252 |
+ |
|
| 253 |
+ // 기존 tableL의 데이터를 가져옵니다. |
|
| 254 |
+ var existingData = tableL.getData(); |
|
| 255 |
+ // 기존 데이터와 새로운 데이터를 합칩니다. |
|
| 256 |
+ var combinedData = existingData.concat(addrData); |
|
| 257 |
+ // 합쳐진 데이터를 tableL에 설정합니다. |
|
| 258 |
+ tableL.setData(combinedData); |
|
| 259 |
+ |
|
| 249 | 260 |
|
| 250 | 261 |
var totRows = tableL.getRows().length; |
| 251 | 262 |
updateTotCnt(totRows); //전체 데이터 갯수 구하기 |
... | ... | @@ -330,10 +341,12 @@ |
| 330 | 341 |
|
| 331 | 342 |
|
| 332 | 343 |
// 3번째 행부터 입력 |
| 333 |
- data.slice(2).forEach((row, index) => {
|
|
| 344 |
+ data.slice(0).forEach((row, index) => {
|
|
| 334 | 345 |
var rowData = {};
|
| 335 | 346 |
keys.forEach((key, idx) => { // index 변수명 변경 (내부와 외부에서 사용되므로 충돌 방지)
|
| 336 |
- rowData[key] = row[idx] ? row[idx].trim() : ""; // 각 컬럼에 대해 기본값을 설정 |
|
| 347 |
+// console.log('row[idx] : ', row[idx]);
|
|
| 348 |
+// rowData[key] = row[idx] ? row[idx].trim() : ""; // 각 컬럼에 대해 기본값을 설정 |
|
| 349 |
+ rowData[key] = (typeof row[idx] === 'string') ? row[idx].trim() : row[idx]; |
|
| 337 | 350 |
}); |
| 338 | 351 |
tableData.push(rowData); |
| 339 | 352 |
|
--- src/main/webapp/js/txtSpecialReplace.js
+++ src/main/webapp/js/txtSpecialReplace.js
... | ... | @@ -28,6 +28,7 @@ |
| 28 | 28 |
} |
| 29 | 29 |
|
| 30 | 30 |
|
| 31 |
+ console.log('???smsTxtArea :: ', smsTxtArea);
|
|
| 31 | 32 |
if(smsTxtArea.indexOf("[*이름*]") > -1
|
| 32 | 33 |
|| smsTxtArea.indexOf("[*1*]") > -1
|
| 33 | 34 |
|| smsTxtArea.indexOf("[*2*]") > -1
|
... | ... | @@ -87,6 +88,9 @@ |
| 87 | 88 |
|
| 88 | 89 |
if(typeof recTableData[j].getData().name != 'undefined' && recTableData[j].getData().name != null && recTableData[j].getData().name != ""){
|
| 89 | 90 |
|
| 91 |
+// console.log('name : ', name);
|
|
| 92 |
+// console.log('smsTxt : ', smsTxt);
|
|
| 93 |
+// console.log('orgSmsTxt : ', orgSmsTxt);
|
|
| 90 | 94 |
var name = recTableData[j].getData().name; |
| 91 | 95 |
smsTxt = stringReplaceAll(smsTxt, "[*이름*]", name); |
| 92 | 96 |
orgSmsTxt = stringReplaceAll(orgSmsTxt, "[*이름*]", name);//광고, 선거 문자인 경우 상하단 문구 제거한 문자내용만 보여주도록 함. 치환문자 있으면 변환해서 보여줌 |
... | ... | @@ -216,6 +220,7 @@ |
| 216 | 220 |
//첫번째 수신자의 변환 텍스트 내용을 적용하여 미리보기 문자내용에 보여주자. |
| 217 | 221 |
if(j == 0){
|
| 218 | 222 |
|
| 223 |
+ console.log('adverTxt : ', adverTxt);
|
|
| 219 | 224 |
//미리보기에 내용 입력해 주기 |
| 220 | 225 |
if(adverTxt.length > 0){
|
| 221 | 226 |
|
--- src/main/webapp/publish/js/content.js
+++ src/main/webapp/publish/js/content.js
... | ... | @@ -52,13 +52,13 @@ |
| 52 | 52 |
/* 실시간 글 적용 */ |
| 53 | 53 |
/*var jbTxt = $("#textarea").text();
|
| 54 | 54 |
$(".realtime").text(jbTxt);*/
|
| 55 |
- |
|
| 55 |
+/* |
|
| 56 | 56 |
$("#textarea, #smsTxtArea").on("change keyup paste", function () {
|
| 57 | 57 |
var crtTxt = $(this).val(); |
| 58 | 58 |
$(".realtime").text(crtTxt);
|
| 59 | 59 |
$(".none_txt").empty();
|
| 60 | 60 |
}); |
| 61 |
- |
|
| 61 |
+*/ |
|
| 62 | 62 |
$(".kakaotalksend_cont #textarea,.kakaotalkset_cont #textarea").on("change keyup paste", function () {
|
| 63 | 63 |
var crtTxt = $(this).val(); |
| 64 | 64 |
$(".template_text").text(crtTxt);
|
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?