카카오 친구톡 발송화면 개발 진행 중
@56469d64d8acdbee48b43afaaa3ff641703337d5
--- src/main/java/itn/let/kakao/user/kakaoFt/web/KakaoFriendsTalkSendController.java
+++ src/main/java/itn/let/kakao/user/kakaoFt/web/KakaoFriendsTalkSendController.java
... | ... | @@ -25,6 +25,7 @@ |
| 25 | 25 |
import itn.let.kakao.kakaoComm.KakaoSendUtil; |
| 26 | 26 |
import itn.let.kakao.kakaoComm.KakaoVO; |
| 27 | 27 |
import itn.let.kakao.kakaoComm.kakaoApi.service.KakaoApiService; |
| 28 |
+import itn.let.kakao.user.kakaoFt.service.KakaoFriendsTalkTemplateService; |
|
| 28 | 29 |
import itn.let.mjo.msgdata.service.MjonMsgDataService; |
| 29 | 30 |
import itn.let.mjo.msgdata.service.MjonMsgDataVO; |
| 30 | 31 |
import itn.let.mjo.symbol.service.MjonSymbolService; |
... | ... | @@ -46,6 +47,9 @@ |
| 46 | 47 |
|
| 47 | 48 |
@Resource(name = "MjonMsgDataService") |
| 48 | 49 |
private MjonMsgDataService mjonMsgDataService; |
| 50 |
+ |
|
| 51 |
+ @Resource(name = "kakaoFriendsTalkTemplateService") |
|
| 52 |
+ private KakaoFriendsTalkTemplateService kakaoFtTemplateService; |
|
| 49 | 53 |
|
| 50 | 54 |
@Autowired |
| 51 | 55 |
KakaoSendUtil kakaoSendUtil; |
... | ... | @@ -134,6 +138,21 @@ |
| 134 | 138 |
|
| 135 | 139 |
// 사용자 정의 단가 정보 불러오기(시스템 단가 혹은 협의 단가) |
| 136 | 140 |
model.addAttribute("sendPrice", kakaoSendUtil.selectSendPriceOfKakaoAtAndSmsAndMms(userId));
|
| 141 |
+ |
|
| 142 |
+ |
|
| 143 |
+ //사용자 템플릿 정보 조회 |
|
| 144 |
+ String friendId = kakaoVO.getFriendId(); |
|
| 145 |
+ KakaoVO resultTemplateVO = new KakaoVO(); |
|
| 146 |
+ |
|
| 147 |
+ if(!friendId.equals("") || friendId != null) {
|
|
| 148 |
+ |
|
| 149 |
+ System.out.println("+++++++++++++++++++++++ friendId ::: "+friendId);
|
|
| 150 |
+ |
|
| 151 |
+ resultTemplateVO = kakaoFtTemplateService.selectKakaoFriendsTemplateDetail(kakaoVO); |
|
| 152 |
+ |
|
| 153 |
+ } |
|
| 154 |
+ |
|
| 155 |
+ model.addAttribute("resultTemplateVO", resultTemplateVO);
|
|
| 137 | 156 |
|
| 138 | 157 |
} |
| 139 | 158 |
|
--- src/main/webapp/WEB-INF/jsp/web/kakao/include/KaKaoAlimtalkTopMenuTap.jsp
+++ src/main/webapp/WEB-INF/jsp/web/kakao/include/KaKaoAlimtalkTopMenuTap.jsp
... | ... | @@ -60,6 +60,7 @@ |
| 60 | 60 |
}else if(tabInfo == 'tabFriend'){
|
| 61 | 61 |
|
| 62 | 62 |
/* alert("친구톡 메뉴는 현재 개발이 진행 중입니다."); */
|
| 63 |
+ $("input[name=friendId]").val("");
|
|
| 63 | 64 |
url = "<c:url value='/web/mjon/kakao/friendstalk/kakaoFriendsTalkMsgDataView.do'/>"; |
| 64 | 65 |
|
| 65 | 66 |
}else if(tabInfo == 'tabAlimtalkIntrd'){
|
--- src/main/webapp/WEB-INF/jsp/web/kakao/msgdata/ft/KakaoFriendsTalkMsgDataView.jsp
+++ src/main/webapp/WEB-INF/jsp/web/kakao/msgdata/ft/KakaoFriendsTalkMsgDataView.jsp
... | ... | @@ -6,6 +6,10 @@ |
| 6 | 6 |
|
| 7 | 7 |
<script src="/js/kakao/templateComm.js"></script> |
| 8 | 8 |
|
| 9 |
+<script type="text/javascript" src="<c:out value='/js/kakao/at/tabulator.js' />"></script> |
|
| 10 |
+<script type="text/javascript" src="<c:out value='/js/kakao/at/addr.js' />"></script> |
|
| 11 |
+<script type="text/javascript" src="<c:out value='/js/common/popup.js' />"></script> |
|
| 12 |
+<script type="text/javascript" src="<c:out value='/js/kakao/at/friendstalkExcel.js' />"></script> |
|
| 9 | 13 |
|
| 10 | 14 |
<script type="text/javascript"> |
| 11 | 15 |
/* 파일등록 */ |
... | ... | @@ -15,21 +19,8 @@ |
| 15 | 19 |
|
| 16 | 20 |
$(document).ready(function (){
|
| 17 | 21 |
|
| 18 |
- //광고성 정보 포함 선택에 따른 텍스트 표시 부분 처리 |
|
| 19 |
- $(".inputAdFlag").change(function(){
|
|
| 20 |
- var adFlagVal = $(this).val(); |
|
| 21 |
- if(adFlagVal == 'N'){//광고 표시 숨김처리
|
|
| 22 |
- $('.adFlag').hide();
|
|
| 23 |
- $('.kakao_block_text').hide();
|
|
| 24 |
- $('#adFlagFront').hide();
|
|
| 25 |
- $('.adFlagAfter').hide();
|
|
| 26 |
- }else{
|
|
| 27 |
- $('.adFlag').show();
|
|
| 28 |
- $('.kakao_block_text').show();
|
|
| 29 |
- $('#adFlagFront').show();
|
|
| 30 |
- $('.adFlagAfter').show();
|
|
| 31 |
- } |
|
| 32 |
- }); |
|
| 22 |
+ //화면 초기 로딩시 화면 처리해주기 - 템플릿 불러오기 했을 경우를 위함 |
|
| 23 |
+ initFormChk(); |
|
| 33 | 24 |
|
| 34 | 25 |
//이모티콘 삽입 기능 처리 |
| 35 | 26 |
$(".symbolButton, .changeWord").on('click', function(){
|
... | ... | @@ -57,6 +48,59 @@ |
| 57 | 48 |
|
| 58 | 49 |
}); |
| 59 | 50 |
}); |
| 51 |
+ |
|
| 52 |
+function initFormChk(){
|
|
| 53 |
+ |
|
| 54 |
+ //첫로딩시 우측 미리보기 화면 숨김처리 |
|
| 55 |
+ $('.emphasis_title_text').hide(); //강조유형 타이틀
|
|
| 56 |
+ $('.emphasis_side_text').hide(); //강조유형 보조문구
|
|
| 57 |
+ //$('.template_text').hide(); //내용 미리보기
|
|
| 58 |
+ $('.side_info_text').hide(); //부가정보 내용
|
|
| 59 |
+ $('.channel_info_text').hide(); //채널추가 텍스트 내용
|
|
| 60 |
+ $('.btnAd').hide(); //샘플 채널추가 버튼
|
|
| 61 |
+ $('.btnEmpty').hide(); //샘플 버튼
|
|
| 62 |
+ |
|
| 63 |
+ //채널ID 정보 미리보기에 표시해주기 |
|
| 64 |
+ fnAgentCodeChg(); |
|
| 65 |
+ |
|
| 66 |
+ //템플릿 등록 이미지가 있는 경우 이미지 정보 표시해 주기 |
|
| 67 |
+ var imgType = $("input[name=img_file_add]:checked").val();
|
|
| 68 |
+ |
|
| 69 |
+ if(!imgType == ''){
|
|
| 70 |
+ |
|
| 71 |
+ if($("input[name='img_file_add']:checked").attr("id")=="img_file_1"){
|
|
| 72 |
+ $(".basic_img_add_wrap").show().siblings(".img_add_info_wrap").hide();
|
|
| 73 |
+ $(".img_file_add_wrap").show();
|
|
| 74 |
+ }else if($("input[name='img_file_add']:checked").attr("id")=="img_file_2"){
|
|
| 75 |
+ $(".wide_img_add_wrap").show().siblings(".img_add_info_wrap").hide();
|
|
| 76 |
+ $(".img_file_add_wrap").show();
|
|
| 77 |
+ } else{
|
|
| 78 |
+ $(".img_add_info_wrap, .img_file_add_wrap").hide();
|
|
| 79 |
+ } |
|
| 80 |
+ |
|
| 81 |
+ }else{
|
|
| 82 |
+ |
|
| 83 |
+ $("#img_file_0").prop('checked',true);
|
|
| 84 |
+ |
|
| 85 |
+ } |
|
| 86 |
+ var imageFileName = '${resultTemplateVO.imageFileName}';
|
|
| 87 |
+ $("#imgNm").text(imageFileName);
|
|
| 88 |
+ |
|
| 89 |
+ //미리보기에 이미지 표시해주기 |
|
| 90 |
+ var imgUrl = '${resultTemplateVO.templateImageUrl}';
|
|
| 91 |
+ $('.kakao_image').css("display", "block");
|
|
| 92 |
+ $("#kakaoImg").attr("src", imgUrl);
|
|
| 93 |
+ |
|
| 94 |
+ |
|
| 95 |
+ //초기 템플릿 내용 글자수 처리해주기 |
|
| 96 |
+ var tmpContents = $('#inputTemplateContent').val();
|
|
| 97 |
+ setContentsLengForFriends(tmpContents); |
|
| 98 |
+ |
|
| 99 |
+ //초기 광고포함 여부 처리 |
|
| 100 |
+ var adFlagVal = $("input[name=ad_flag]:checked").val();
|
|
| 101 |
+ advTextChange(adFlagVal); |
|
| 102 |
+ |
|
| 103 |
+} |
|
| 60 | 104 |
|
| 61 | 105 |
//우측 미리보기 화면 채널 아이디 정보 변경해 주기 |
| 62 | 106 |
function fnAgentCodeChg(){
|
... | ... | @@ -288,6 +332,16 @@ |
| 288 | 332 |
|
| 289 | 333 |
} |
| 290 | 334 |
|
| 335 |
+ var tmpFriendId = $("#tmpFriendId").val();
|
|
| 336 |
+ |
|
| 337 |
+ if(tmpFriendId != ''){
|
|
| 338 |
+ |
|
| 339 |
+ if(!confirm("불러온 템플릿의 이미지도 함께 삭제 됩니다. 계속하시겠습니까?")){
|
|
| 340 |
+ return false; |
|
| 341 |
+ } |
|
| 342 |
+ |
|
| 343 |
+ } |
|
| 344 |
+ |
|
| 291 | 345 |
var data = new FormData(bizForm); |
| 292 | 346 |
|
| 293 | 347 |
if(confirm("등록된 이미지를 삭제하시겠습니까?")){
|
... | ... | @@ -348,6 +402,190 @@ |
| 348 | 402 |
$('.nowChar').text("0 /");
|
| 349 | 403 |
} |
| 350 | 404 |
|
| 405 |
+//저장 템플릿 불러오기 선택시 |
|
| 406 |
+function myTemplateSelect(ftId){
|
|
| 407 |
+ |
|
| 408 |
+ //alert(ftId); |
|
| 409 |
+ console.log(ftId); |
|
| 410 |
+ |
|
| 411 |
+ var form = document.templateForm; |
|
| 412 |
+ |
|
| 413 |
+ form.friendId.value = ftId; |
|
| 414 |
+ |
|
| 415 |
+ form.action="/web/mjon/kakao/friendstalk/kakaoFriendsTalkMsgDataView.do"; |
|
| 416 |
+ form.submit(); |
|
| 417 |
+ |
|
| 418 |
+ |
|
| 419 |
+} |
|
| 420 |
+ |
|
| 421 |
+//광고성 정보 포함 선택에 따른 텍스트 표시 부분 처리 |
|
| 422 |
+$(document).on('change', '.inputAdFlag', function(){
|
|
| 423 |
+ |
|
| 424 |
+ var adFlagVal = $(this).val(); |
|
| 425 |
+ advTextChange(adFlagVal); |
|
| 426 |
+ |
|
| 427 |
+}); |
|
| 428 |
+ |
|
| 429 |
+function advTextChange(adFlagVal){
|
|
| 430 |
+ |
|
| 431 |
+ if(typeof adFlagVal == "undefined" || adFlagVal == null || adFlagVal == ""){
|
|
| 432 |
+ |
|
| 433 |
+ $("#ad_Y").prop('checked',true);
|
|
| 434 |
+ |
|
| 435 |
+ }else if(adFlagVal == 'N'){//광고 표시 숨김처리
|
|
| 436 |
+ |
|
| 437 |
+ $('.adFlag').hide();
|
|
| 438 |
+ $('.kakao_block_text').hide();
|
|
| 439 |
+ $('#adFlagFront').hide();
|
|
| 440 |
+ $('.adFlagAfter').hide();
|
|
| 441 |
+ |
|
| 442 |
+ }else{
|
|
| 443 |
+ $('.adFlag').show();
|
|
| 444 |
+ $('.kakao_block_text').show();
|
|
| 445 |
+ $('#adFlagFront').show();
|
|
| 446 |
+ $('.adFlagAfter').show();
|
|
| 447 |
+ } |
|
| 448 |
+ |
|
| 449 |
+} |
|
| 450 |
+ |
|
| 451 |
+ |
|
| 452 |
+//친구톡 내용 템플릿으로 저장하기 - 내용 저장하기 |
|
| 453 |
+function myTemplateSave(){
|
|
| 454 |
+ |
|
| 455 |
+ var selectAgentCode = $("select[name='selectAgentCode']").val(); // 선택 채널ID
|
|
| 456 |
+ var yellowId = $("select[name='selectAgentCode'] option:selected").text().replaceAll('@',''); // 선택 채널명
|
|
| 457 |
+ var inputTemplateName = $("#inputTemplateName").val(); // 입력 템플릿 이름
|
|
| 458 |
+ var imageType = $("input[name=img_file_add]:checked").val(); // 첨부 이미지 종류(없음, 일반, 와이드 이미지)
|
|
| 459 |
+ var imageTitle = $("#imgTitle").val(); //첨부이미지 제목
|
|
| 460 |
+ var imageLink = $("#imgLink").val(); //첨부이미지 클릭시 이동 링크 주소
|
|
| 461 |
+ var inputTemplateAd = $("input[name=ad_flag]:checked").val(); // 광고성메시지 선택 여부
|
|
| 462 |
+ var inputTemplateContent = $("#inputTemplateContent").val(); // 템플릿 내용
|
|
| 463 |
+ |
|
| 464 |
+ var inputTemplateImageName = $("#templateImageName").val(); // 템플릿 이미지 파일명
|
|
| 465 |
+ var inputTemplateImageUrl = $("#templateImageUrl").val(); // 템플릿 이미지 링크
|
|
| 466 |
+ |
|
| 467 |
+ // 공통 유효성 검사 조회 |
|
| 468 |
+ if(selectAgentCode == null || selectAgentCode == ""){
|
|
| 469 |
+ alert("채널ID를 선택해 주세요");
|
|
| 470 |
+ return; |
|
| 471 |
+ }; |
|
| 472 |
+ |
|
| 473 |
+ if(inputTemplateName == null || inputTemplateName == ""){
|
|
| 474 |
+ alert("템플릿 명을 입력해 주세요");
|
|
| 475 |
+ $("#inputTemplateName").focus();
|
|
| 476 |
+ return; |
|
| 477 |
+ }; |
|
| 478 |
+ |
|
| 479 |
+ if(imageType == 'I' || imageType == 'W'){
|
|
| 480 |
+ |
|
| 481 |
+ if(imageTitle == ''){
|
|
| 482 |
+ |
|
| 483 |
+ alert("이미지 제목을 입력해 주세요.");
|
|
| 484 |
+ return false; |
|
| 485 |
+ |
|
| 486 |
+ } |
|
| 487 |
+ |
|
| 488 |
+ if(imageLink == ''){
|
|
| 489 |
+ |
|
| 490 |
+ alert("이미지 클릭시 이동할 URL을 입력해 주세요.");
|
|
| 491 |
+ return false; |
|
| 492 |
+ |
|
| 493 |
+ }else{
|
|
| 494 |
+ |
|
| 495 |
+ if(imageLink.search("http://") == -1 && imageLink.search("https://") == -1){
|
|
| 496 |
+ |
|
| 497 |
+ alert("이미지 URL 주소에는 http:// 또는 https://를 포함하여 입력해야 합니다.");
|
|
| 498 |
+ return false; |
|
| 499 |
+ |
|
| 500 |
+ } |
|
| 501 |
+ |
|
| 502 |
+ } |
|
| 503 |
+ |
|
| 504 |
+ if(inputTemplateImageUrl == ''){
|
|
| 505 |
+ |
|
| 506 |
+ alert("이미지를 선택해 주세요.");
|
|
| 507 |
+ return false; |
|
| 508 |
+ |
|
| 509 |
+ } |
|
| 510 |
+ |
|
| 511 |
+ } |
|
| 512 |
+ |
|
| 513 |
+ |
|
| 514 |
+ if(inputTemplateContent == null || inputTemplateContent == ""){
|
|
| 515 |
+ alert("템플릿 내용을 입력해 주세요.");
|
|
| 516 |
+ return; |
|
| 517 |
+ }; |
|
| 518 |
+ |
|
| 519 |
+ var bizForm = document.bizForm; |
|
| 520 |
+ bizForm.senderKey.value = selectAgentCode; |
|
| 521 |
+ //bizForm.yellowId.value = yellowId; |
|
| 522 |
+ bizForm.templateName.value = inputTemplateName; |
|
| 523 |
+ //bizForm.imageType.value = imageType; |
|
| 524 |
+ //bizForm.imgTitle.value = imageTitle; |
|
| 525 |
+ //bizForm.imgLink.value = imageLink; |
|
| 526 |
+ bizForm.adFlag.value = inputTemplateAd; |
|
| 527 |
+ bizForm.templateContent.value = inputTemplateContent; |
|
| 528 |
+ |
|
| 529 |
+ var data = new FormData(bizForm); |
|
| 530 |
+ |
|
| 531 |
+ if(confirm("템플릿을 저장하시겠습니까?")){
|
|
| 532 |
+ |
|
| 533 |
+ $.ajax({
|
|
| 534 |
+ type: "POST" |
|
| 535 |
+ , url: "/web/mjon/kakao/template/insertKakaoFriendsTemplateDataAjax.do" |
|
| 536 |
+ , data: data |
|
| 537 |
+ , dataType: 'json' |
|
| 538 |
+ , async: false |
|
| 539 |
+ , processData: false |
|
| 540 |
+ , contentType: false |
|
| 541 |
+ , cache: false |
|
| 542 |
+ , success: function (returnData, status) {
|
|
| 543 |
+ |
|
| 544 |
+ var result = returnData.result; |
|
| 545 |
+ |
|
| 546 |
+ if(result == "loginFail") {//차단 발신번호인 경우 등록 불가
|
|
| 547 |
+ alert("로그인후 진행이 가능합니다.");
|
|
| 548 |
+ }else if(returnData.result == "success") {
|
|
| 549 |
+ alert("템플릿 저장이 완료되었습니다.");
|
|
| 550 |
+ return false; |
|
| 551 |
+ }else{
|
|
| 552 |
+ |
|
| 553 |
+ alert("템플릿 저장에 오류가 발생하였습니다.");
|
|
| 554 |
+ return false; |
|
| 555 |
+ |
|
| 556 |
+ } |
|
| 557 |
+ } |
|
| 558 |
+ ,error: function (e) {
|
|
| 559 |
+ console.log("ERROR : ", e);
|
|
| 560 |
+ alert("템플릿 저장에 오류가 발생하였습니다.");
|
|
| 561 |
+ } |
|
| 562 |
+ }); |
|
| 563 |
+ |
|
| 564 |
+ } |
|
| 565 |
+ |
|
| 566 |
+} |
|
| 567 |
+ |
|
| 568 |
+//주소록 불러오기 버튼 클릭시 |
|
| 569 |
+$('.popupAddr').click(function(){
|
|
| 570 |
+ |
|
| 571 |
+ if(loginVO == "" || loginVO == null){
|
|
| 572 |
+ alert("주소록 불러오기 서비스는 로그인 후 이용 가능합니다.");
|
|
| 573 |
+ location.href="<c:url value='/web/user/login/login.do'/>"; |
|
| 574 |
+ return false; |
|
| 575 |
+ } |
|
| 576 |
+ |
|
| 577 |
+ $("#addrGroupLoad").load("/web/mjon/msgdata/selectAddrGroupListAjax.do", "" ,function(response, status, xhr){
|
|
| 578 |
+ //리스트 스크롤 처리해주기 |
|
| 579 |
+ $(".adr_pop_list").mCustomScrollbar({
|
|
| 580 |
+ axis: 'y', |
|
| 581 |
+ scrollbarPosition: "outside", |
|
| 582 |
+ theme: "dark", |
|
| 583 |
+ autoHideScrollbar: false |
|
| 584 |
+ }); |
|
| 585 |
+ }); |
|
| 586 |
+ |
|
| 587 |
+}); |
|
| 588 |
+ |
|
| 351 | 589 |
</script> |
| 352 | 590 |
|
| 353 | 591 |
<!-- 로딩바 --> |
... | ... | @@ -379,10 +617,14 @@ |
| 379 | 617 |
|
| 380 | 618 |
<form id="bizForm" name="bizForm" method="multipart/form-data"> |
| 381 | 619 |
<input type="hidden" id="menuTopTab" name="menuTopTab" value="tabFriend"> |
| 382 |
- <input type="hidden" id="imageType" name="imageType" value=""/> |
|
| 383 |
- <input type="hidden" id="inputSenderKey" name="senderKey" value=""/> |
|
| 384 |
- <input type="hidden" id="imageFileName" name="imageFileName" value=""> |
|
| 385 |
- <input type="hidden" id="templateImageUrl" name="templateImageUrl" value=""> |
|
| 620 |
+ <input type="hidden" id="imageType" name="imageType" value="<c:out value='${resultTemplateVO.imageType}'/>"/>
|
|
| 621 |
+ <input type="hidden" id="inputSenderKey" name="senderKey" value="<c:out value='${resultTemplateVO.senderKey}'/>"/>
|
|
| 622 |
+ <input type="hidden" id="imageFileName" name="imageFileName" value="<c:out value='${resultTemplateVO.imageFileName}'/>">
|
|
| 623 |
+ <input type="hidden" id="templateImageUrl" name="templateImageUrl" value="<c:out value='${resultTemplateVO.templateImageUrl}'/>">
|
|
| 624 |
+ <input type="hidden" id="tmpFriendId" name="friendId" value="<c:out value='${resultTemplateVO.friendId}'/>">
|
|
| 625 |
+ <input type="hidden" id="templateName" name="templateName" value=""/> |
|
| 626 |
+ <input type="hidden" id="adFlag" name="adFlag" value=""/> |
|
| 627 |
+ <input type="hidden" id="templateContent" name="templateContent" value=""/> |
|
| 386 | 628 |
|
| 387 | 629 |
<div class="send_general friend_talk_wrap kakao_wrap"> |
| 388 | 630 |
<div class="send_left"> |
... | ... | @@ -399,18 +641,25 @@ |
| 399 | 641 |
<select class="select_gray_type" name="selectAgentCode" id="selectAgentCode" onchange="javascript:fnAgentCodeChg();"> |
| 400 | 642 |
<option value="">채널ID 선택</option> |
| 401 | 643 |
<c:forEach var="kakaoProfileInfo" items="${resultProfileList}" varStatus="status">
|
| 402 |
- <option value="${kakaoProfileInfo.senderKey}"><c:out value='${kakaoProfileInfo.yellowId}'/></option>
|
|
| 644 |
+ <option value="${kakaoProfileInfo.senderKey}" <c:if test="${kakaoProfileInfo.senderKey eq resultTemplateVO.senderKey}">selected</c:if> ><c:out value='${kakaoProfileInfo.yellowId}'/></option>
|
|
| 403 | 645 |
</c:forEach> |
| 404 | 646 |
</select> |
| 405 | 647 |
</td> |
| 406 | 648 |
</tr> |
| 407 | 649 |
<tr> |
| 650 |
+ <th>템플릿명</th> |
|
| 651 |
+ <td> |
|
| 652 |
+ <input type="text" class="template_name" id="inputTemplateName" name="inputTemplateName" value="<c:out value='${resultTemplateVO.templateName}'/>" placeholder="템플릿명을 입력해주세요. (최대 50자)">
|
|
| 653 |
+ <p class="template_name_cf">최대 50자, 템플릿 관리용</p> |
|
| 654 |
+ </td> |
|
| 655 |
+ </tr> |
|
| 656 |
+ <tr> |
|
| 408 | 657 |
<th>이미지 첨부</th> |
| 409 | 658 |
<td> |
| 410 | 659 |
<div class="img_sort_wrap"> |
| 411 |
- <input type="radio" name="img_file_add" id="img_file_0" value="" checked> <label for="img_file_0">첨부안함</label> |
|
| 412 |
- <input type="radio" name="img_file_add" id="img_file_1" value="I"> <label for="img_file_1">이미지 첨부</label> |
|
| 413 |
- <input type="radio" name="img_file_add" id="img_file_2" value="W"> <label for="img_file_2">와이드 이미지 첨부</label> |
|
| 660 |
+ <input type="radio" name="img_file_add" id="img_file_0" value="" <c:if test="${resultTemplateVO.imageType eq ''}">checked</c:if> > <label for="img_file_0">첨부안함</label>
|
|
| 661 |
+ <input type="radio" name="img_file_add" id="img_file_1" value="I" <c:if test="${resultTemplateVO.imageType eq 'I'}">checked</c:if> > <label for="img_file_1">이미지 첨부</label>
|
|
| 662 |
+ <input type="radio" name="img_file_add" id="img_file_2" value="W" <c:if test="${resultTemplateVO.imageType eq 'W'}">checked</c:if> > <label for="img_file_2">와이드 이미지 첨부</label>
|
|
| 414 | 663 |
<div class="img_add_info_wrap basic_img_add_wrap"> |
| 415 | 664 |
<p class="info_title_text"><span class="c_e40000">*</span> 이미지 첨부 안내</p> |
| 416 | 665 |
<ul class="info_text"> |
... | ... | @@ -434,11 +683,11 @@ |
| 434 | 683 |
<ul class="img_file_info_wrap"> |
| 435 | 684 |
<li> |
| 436 | 685 |
<p>이미지 제목</p> |
| 437 |
- <input type="text" id="imgTitle" name="imgTitle" class="img_url" maxLength="50"> |
|
| 686 |
+ <input type="text" id="imgTitle" name="imgTitle" value="<c:out value='${resultTemplateVO.imgTitle}'/>" class="img_url" maxLength="50">
|
|
| 438 | 687 |
</li> |
| 439 | 688 |
<li> |
| 440 | 689 |
<p>이미지 클릭시 이동할 URL</p> |
| 441 |
- <input type="text" id="imgLink" name="imgLink" placeholder="http://" class="img_url" maxLength="1000"> |
|
| 690 |
+ <input type="text" id="imgLink" name="imgLink" value="<c:out value='${resultTemplateVO.imgLink}'/>" placeholder="http://" class="img_url" maxLength="1000">
|
|
| 442 | 691 |
</li> |
| 443 | 692 |
<li> |
| 444 | 693 |
<p class="file_name" id="imgNm" name="imgNm">첨부파일 이미지</p> |
... | ... | @@ -455,21 +704,20 @@ |
| 455 | 704 |
<tr> |
| 456 | 705 |
<th>광고포함 여부</th> |
| 457 | 706 |
<td> |
| 458 |
- <input type="radio" class="inputAdFlag" name="ad_flag" id="ad_Y" value="Y" checked><label for="ad_Y">광고성 정보 포함</label> |
|
| 459 |
- <input type="radio" class="inputAdFlag" name="ad_flag" id="ad_N" value="N"><label for="ad_N">포함 안함</label> |
|
| 707 |
+ <input type="radio" class="inputAdFlag" name="ad_flag" id="ad_Y" value="Y" <c:if test="${resultTemplateVO.adFlag eq 'Y'}">checked</c:if> ><label for="ad_Y">광고성 정보 포함</label>
|
|
| 708 |
+ <input type="radio" class="inputAdFlag" name="ad_flag" id="ad_N" value="N" <c:if test="${resultTemplateVO.adFlag eq 'N'}">checked</c:if> ><label for="ad_N">포함 안함</label>
|
|
| 460 | 709 |
</td> |
| 461 | 710 |
</tr> |
| 462 | 711 |
<tr> |
| 463 | 712 |
<th>내용</th> |
| 464 | 713 |
<td class="kakao_template_text"> |
| 465 | 714 |
<div class="put_left short"> |
| 466 |
- <input type="text" class="template_name" placeholder="템플릿명을 입력해주세요. (최대 50자)"> |
|
| 467 | 715 |
<div class="put_text_wrap"> |
| 468 | 716 |
<div class="ad_txt"> |
| 469 | 717 |
<p><span id="adFlagFront">(광고)</span> <span id="yellowIdCon" >채널ID</span></p> |
| 470 | 718 |
</div> |
| 471 | 719 |
<label for="inputTemplateContent" class="label"></label> |
| 472 |
- <textarea id="inputTemplateContent" name="inputTemplateContent" class="put_text" placeholder="내용을 입력해주세요."></textarea> |
|
| 720 |
+ <textarea id="inputTemplateContent" name="inputTemplateContent" class="put_text" placeholder="내용을 입력해주세요."><c:out value="${resultTemplateVO.templateContent}"/></textarea>
|
|
| 473 | 721 |
<div class="text_length"> |
| 474 | 722 |
<div> |
| 475 | 723 |
<p class="adFlagAfter">수신거부 : 홈 > 채널차단</p> |
... | ... | @@ -598,7 +846,7 @@ |
| 598 | 846 |
<button type="button" class="btnType btnType8" onclick="window.open('/web/mjon/kakao/template/selectKakaoFriendsTemplateListPopupAjax.do','_blank','width=930, height=780, top=100, left=100, fullscreen=no, menubar=no, status=no, toolbar=no, titlebar=yes, location=no, scrollbars=yes')">템플릿 불러오기</button>
|
| 599 | 847 |
</div> |
| 600 | 848 |
<div class="send_btnWrap"> |
| 601 |
- <button type="button" class="btnType btn_text_save">내용 저장하기</button> |
|
| 849 |
+ <button type="button" class="btnType btn_text_save" onclick="javascript:myTemplateSave();">내용 저장하기</button> |
|
| 602 | 850 |
<button type="button" class="btnType btnType9" onclick="javascript:fnContentsReset();">초기화</button> |
| 603 | 851 |
</div> |
| 604 | 852 |
</div> |
... | ... | @@ -619,7 +867,132 @@ |
| 619 | 867 |
<span class="c_e40000 fwBold">*</span> 버튼 타입중 <span class="c_e40000">봇키워드, 메시지전달</span>은 <span class="c_222">카카오톡 채널 관리자센터(https://center-pf.kakao.com)</span>에서 설정을 직접 한 후 이용하셔야 동작합니다. (최대 5개까지 등록가능) |
| 620 | 868 |
</p> |
| 621 | 869 |
<div class="button_add_wrap"> |
| 622 |
- </div> |
|
| 870 |
+ <c:forEach var="buttonList" items="${resultTemplateVO.buttonVOList}" varStatus="status">
|
|
| 871 |
+ |
|
| 872 |
+ <c:if test="${buttonList.linkType eq 'DS'}">
|
|
| 873 |
+ <!-- 배송조회 버튼 --> |
|
| 874 |
+ <dl class="button_type_wrap type1"> |
|
| 875 |
+ <dt>배송조회</dt> |
|
| 876 |
+ <dd class="button_type_input"> |
|
| 877 |
+ <input type="hidden" id="buttonLikeTypeDeliv" name="buttonVOList[${status.index}].linkType" value="DS"/>
|
|
| 878 |
+ <input type="text" id="btnNmDeliv" name="buttonVOList[${status.index}].name" value="<c:out value='${buttonList.name}'/>" placeholder="버튼명 입력(최대 14자)">
|
|
| 879 |
+ <p class="cf_text">*이용가능 택배사 : KG로지스, 우체국택배,일양로지스, GTX로지스, FedEx, 경동택배, 합동택배, 롯데택배</p> |
|
| 880 |
+ </dd> |
|
| 881 |
+ <dd> |
|
| 882 |
+ <button type="button" class="btn_del" onclick="buttonTypeDel(this);"><img src="/publish/images/btn_delete.png" alt=""></button> |
|
| 883 |
+ </dd> |
|
| 884 |
+ </dl> |
|
| 885 |
+ </c:if> |
|
| 886 |
+ |
|
| 887 |
+ <c:if test="${buttonList.linkType eq 'WL'}">
|
|
| 888 |
+ <!-- 웹링크 버튼 --> |
|
| 889 |
+ <dl class="button_type_wrap type2"> |
|
| 890 |
+ <dt>웹링크</dt> |
|
| 891 |
+ <dd class="button_type_input"> |
|
| 892 |
+ <ul> |
|
| 893 |
+ <li> |
|
| 894 |
+ <input type="hidden" id="buttonLikeTypeWeb" name="buttonVOList[${status.index}].linkType" value="WL"/>
|
|
| 895 |
+ <input type="text" id="btnNmWeb" name="buttonVOList[${status.index}].name" value="<c:out value='${buttonList.name}'/>" placeholder="버튼명 입력(최대 14자)">
|
|
| 896 |
+ </li> |
|
| 897 |
+ <li> |
|
| 898 |
+ <input type="text" id="buttonLinkMo" name="buttonVOList[${status.index}].linkMo" value="<c:out value='${buttonList.linkMo}'/>" placeholder="모바일 링크 입력">
|
|
| 899 |
+ </li> |
|
| 900 |
+ <li> |
|
| 901 |
+ <input type="text" id="buttonLinkPc" name="buttonVOList[${status.index}].linkPc" value="<c:out value='${buttonList.linkPc}'/>" placeholder="PC 링크 입력">
|
|
| 902 |
+ </li> |
|
| 903 |
+ </ul> |
|
| 904 |
+ </dd> |
|
| 905 |
+ <dd> |
|
| 906 |
+ <button type="button" class="btn_del" onclick="buttonTypeDel(this);"><img src="/publish/images/btn_delete.png" alt=""></button> |
|
| 907 |
+ </dd> |
|
| 908 |
+ </dl> |
|
| 909 |
+ </c:if> |
|
| 910 |
+ |
|
| 911 |
+ <c:if test="${buttonList.linkType eq 'AL'}">
|
|
| 912 |
+ <!-- 앱링크 버튼 --> |
|
| 913 |
+ <dl class="button_type_wrap type3"> |
|
| 914 |
+ <dt>앱링크</dt> |
|
| 915 |
+ <dd class="button_type_input"> |
|
| 916 |
+ <ul> |
|
| 917 |
+ <li> |
|
| 918 |
+ <input type="hidden" id="buttonLikeTypeApp" name="buttonVOList[${status.index}].linkType" value="AL"/>
|
|
| 919 |
+ <input type="text" id="btnNmApp" name="buttonVOList[${status.index}].name" value="<c:out value='${buttonList.name}'/>" placeholder="버튼명 입력(최대 14자)">
|
|
| 920 |
+ </li> |
|
| 921 |
+ <li> |
|
| 922 |
+ <input type="text" id="buttonLinkAnd" name="buttonVOList[${status.index}].linkAnd" value="<c:out value='${buttonList.linkAnd}'/>" placeholder="Android 링크 입력">
|
|
| 923 |
+ </li> |
|
| 924 |
+ <li> |
|
| 925 |
+ <input type="text" id="buttonLinkIos" name="buttonVOList[${status.index}].linkIos" value="<c:out value='${buttonList.linkIos}'/>" placeholder="IOS 링크 입력">
|
|
| 926 |
+ </li> |
|
| 927 |
+ </ul> |
|
| 928 |
+ </dd> |
|
| 929 |
+ <dd> |
|
| 930 |
+ <button type="button" class="btn_del" onclick="buttonTypeDel(this);"><img src="/publish/images/btn_delete.png" alt=""></button> |
|
| 931 |
+ </dd> |
|
| 932 |
+ </dl> |
|
| 933 |
+ </c:if> |
|
| 934 |
+ |
|
| 935 |
+ <c:if test="${buttonList.linkType eq 'BK'}">
|
|
| 936 |
+ <!-- 봇키워드 --> |
|
| 937 |
+ <dl class="button_type_wrap type4"> |
|
| 938 |
+ <dt>봇키워드</dt> |
|
| 939 |
+ <dd class="button_type_input"> |
|
| 940 |
+ <input type="hidden" id="buttonLikeTypeBot" name="buttonVOList[${status.index}].linkType" value="BK"/>
|
|
| 941 |
+ <input type="text" id="btnNmBot" name="buttonVOList[${status.index}].name" value="<c:out value='${buttonList.name}'/>" placeholder="버튼명 입력(최대 14자)">
|
|
| 942 |
+ </dd> |
|
| 943 |
+ <dd><button type="button" class="btn_del" onclick="buttonTypeDel(this);"><img src="/publish/images/btn_delete.png" alt=""></button></dd> |
|
| 944 |
+ </dl> |
|
| 945 |
+ </c:if> |
|
| 946 |
+ |
|
| 947 |
+ <c:if test="${buttonList.linkType eq 'MD'}">
|
|
| 948 |
+ <!-- 메시지 전달 --> |
|
| 949 |
+ <dl class="button_type_wrap type5"> |
|
| 950 |
+ <dt>메시지전달</dt> |
|
| 951 |
+ <dd class="button_type_input"> |
|
| 952 |
+ <input type="hidden" id="buttonLikeTypeMsg" name="buttonVOList[${status.index}].linkType" value="MD" />
|
|
| 953 |
+ <input type="text" id="btnNmMsg" name="buttonVOList[${status.index}].name" value="<c:out value='${buttonList.name}'/>" placeholder="버튼명 입력(최대 14자)">
|
|
| 954 |
+ </dd> |
|
| 955 |
+ <dd> |
|
| 956 |
+ <button type="button" class="btn_del" onclick="buttonTypeDel(this);"> |
|
| 957 |
+ <img src="/publish/images/btn_delete.png" alt=""> |
|
| 958 |
+ </button> |
|
| 959 |
+ </dd> |
|
| 960 |
+ </dl> |
|
| 961 |
+ </c:if> |
|
| 962 |
+ |
|
| 963 |
+ <c:if test="${buttonList.linkType eq 'BC'}">
|
|
| 964 |
+ <!-- 상담톡 전환 --> |
|
| 965 |
+ <dl class="button_type_wrap type6"> |
|
| 966 |
+ <dt>상담톡전환</dt> |
|
| 967 |
+ <dd class="button_type_input"> |
|
| 968 |
+ <input type="hidden" id="buttonLikeTypeCons" name="buttonVOList[${status.index}].linkType" value="BC" />
|
|
| 969 |
+ <input type="text" id="btnNmCons" name="buttonVOList[${status.index}].name" value="<c:out value='${buttonList.name}'/>" placeholder="버튼명 입력(최대 14자)">
|
|
| 970 |
+ </dd> |
|
| 971 |
+ <dd> |
|
| 972 |
+ <button type="button" class="btn_del" onclick="buttonTypeDel(this);"> |
|
| 973 |
+ <img src="/publish/images/btn_delete.png" alt=""> |
|
| 974 |
+ </button> |
|
| 975 |
+ </dd> |
|
| 976 |
+ </dl> |
|
| 977 |
+ </c:if> |
|
| 978 |
+ |
|
| 979 |
+ <c:if test="${buttonList.linkType eq 'BT'}">
|
|
| 980 |
+ <!-- 챗봇전환 --> |
|
| 981 |
+ <dl class="button_type_wrap type7"> |
|
| 982 |
+ <dt>챗봇전환</dt> |
|
| 983 |
+ <dd class="button_type_input"> |
|
| 984 |
+ <input type="hidden" id="buttonLikeTypeBotChg" name="buttonVOList[${status.index}].linkType" value="BT" />
|
|
| 985 |
+ <input type="text" id="btnNmBotChg" name="buttonVOList[${status.index}].name" value="" placeholder="버튼명 입력(최대 14자)">
|
|
| 986 |
+ </dd> |
|
| 987 |
+ <dd> |
|
| 988 |
+ <button type="button" class="btn_del" onclick="buttonTypeDel(this);"> |
|
| 989 |
+ <img src="/publish/images/btn_delete.png" alt=""> |
|
| 990 |
+ </button> |
|
| 991 |
+ </dd> |
|
| 992 |
+ </dl> |
|
| 993 |
+ </c:if> |
|
| 994 |
+ </c:forEach> |
|
| 995 |
+ </div> |
|
| 623 | 996 |
</td> |
| 624 | 997 |
</tr> |
| 625 | 998 |
<tr> |
... | ... | @@ -655,7 +1028,7 @@ |
| 655 | 1028 |
</div> |
| 656 | 1029 |
<div class="put_right"> |
| 657 | 1030 |
<div class="btn_popup_wrap spc_wrap"> |
| 658 |
- <button type="button" data-tooltip="popup06" class="btnType btnType7">주소록 불러오기</button> |
|
| 1031 |
+ <button type="button" data-tooltip="popup06" class="btnType btnType7 popupAddr">주소록 불러오기</button> |
|
| 659 | 1032 |
</div> |
| 660 | 1033 |
<div class="btn_popup_wrap"> |
| 661 | 1034 |
<button type="button" data-tooltip="popup02" class="btnType btnType7">엑셀 불러오기</button> |
... | ... | @@ -802,7 +1175,9 @@ |
| 802 | 1175 |
</div> |
| 803 | 1176 |
<p class="template_text">내용 미리보기</p> |
| 804 | 1177 |
<div class="btnViewArea"> |
| 805 |
- <button type="button" class="btn_kakao_type" style="display:none;">문자온 바로가기</button> |
|
| 1178 |
+ <c:forEach var="buttonList" items="${resultTemplateVO.buttonVOList}" varStatus="status">
|
|
| 1179 |
+ <button type="button" class="btn_kakao_type" style="display:block;"><c:out value="${buttonList.name}"/></button>
|
|
| 1180 |
+ </c:forEach> |
|
| 806 | 1181 |
</div> |
| 807 | 1182 |
</div> |
| 808 | 1183 |
<p class="kakao_block_text">수신거부 : 홈 > 채널차단</p> |
... | ... | @@ -891,4 +1266,111 @@ |
| 891 | 1266 |
</form> |
| 892 | 1267 |
</div> |
| 893 | 1268 |
</div> |
| 894 |
-</div>(No newline at end of file) |
|
| 1269 |
+</div> |
|
| 1270 |
+ |
|
| 1271 |
+<!-- 주소록 불러오기 --> |
|
| 1272 |
+<div class="tooltip-wrap"> |
|
| 1273 |
+ <div class="popup-com import_layer popup06" tabindex="0" data-tooltip-con="popup06" data-focus="popup06" data-focus-prev="popup06-close" style="width: 1000px"> |
|
| 1274 |
+ <div class="popup_heading"> |
|
| 1275 |
+ <p><span>주소록 불러오기</p> |
|
| 1276 |
+ <button type="button" onClick="javascript:addrClose(); return false;"> |
|
| 1277 |
+ <img src="/publish/images/content/layerPopup_close.png" alt="팝업 닫기"></button> |
|
| 1278 |
+ </div> |
|
| 1279 |
+ <div class="layer_in"> |
|
| 1280 |
+ <div class="titBox titBox_pad"> |
|
| 1281 |
+ <p>- 주소록 수정 및 변경은 <span>[주소록 관리]</span>에서만 가능합니다.</p> |
|
| 1282 |
+ <button type="button" class="adr_admin" onClick="location.href='/web/mjon/addr/selectAddrList.do'">주소록 관리</button> |
|
| 1283 |
+ </div> |
|
| 1284 |
+ <div class="adr_wrap"> |
|
| 1285 |
+ <form id="searchAddrGrpForm" name="searchAddrGrpForm" method="post" style="display: flex; justify-content: space-between;"> |
|
| 1286 |
+ <input type="hidden" id="searchAddrGrpId" name="searchAddrGrpId" value=""/> |
|
| 1287 |
+ <input type="hidden" id="type" name="type" value="all"/> |
|
| 1288 |
+ <input type="hidden" id="searchKeyword" name="searchKeyword" value=""/> |
|
| 1289 |
+ <input type="hidden" name="searchCondition" id="searchCondition" value="0" /> |
|
| 1290 |
+ <div class="adr_pop_left"> |
|
| 1291 |
+ <div class="adr_left_search"> |
|
| 1292 |
+ <label for="searchKeyword" class="label">그룹명 검색</label> |
|
| 1293 |
+ <input type="text" name="searchGrpKeyword" id="searchGrpKeyword" placeholder="그룹명 검색" onfocus="this.placeholder=''" onblur="this.placeholder='그룹명 검색'" class="inputLight"> |
|
| 1294 |
+ <button type="button" onClick="javascrit:fnAddrGrpSearch(); return false;"><img src="/publish/images/popup/search.png" alt="검색"></button> |
|
| 1295 |
+ </div> |
|
| 1296 |
+ <div class="adr_pop_box"> |
|
| 1297 |
+ <div id="addrGroupLoad"> |
|
| 1298 |
+ </div> |
|
| 1299 |
+ </div> |
|
| 1300 |
+ <!-- <div class="popup_btn"> |
|
| 1301 |
+ <button type="button" class="btnType" onClick="javascript:fnSelectAddrGrpList(); return false;">선택 그룹 추가</button> |
|
| 1302 |
+ </div> --> |
|
| 1303 |
+ </div> |
|
| 1304 |
+ <div class="adr_pop_right"> |
|
| 1305 |
+ <div class="clearfix"> |
|
| 1306 |
+ <div class="btnWrap_last"> |
|
| 1307 |
+ <label for="searchAddrCondition" class="label">카테고리 선택</label> |
|
| 1308 |
+ <select id="searchAddrCondition" name="searchAddrCondition" class="selType2"> |
|
| 1309 |
+ <option value='0'>전체</option> |
|
| 1310 |
+ <option value='1'>그룹명</option> |
|
| 1311 |
+ <option value='2'>이름</option> |
|
| 1312 |
+ <option value='3'>핸드폰번호</option> |
|
| 1313 |
+ </select> |
|
| 1314 |
+ <label for="searchAddrKeyword" class="label">검색어 입력</label> |
|
| 1315 |
+ <input type="text" id="searchAddrKeyword" name="searchAddrKeyword" placeholder="검색어를 입력하세요" onfocus="this.placeholder=''" onblur="this.placeholder='검색어를 입력하세요'" > |
|
| 1316 |
+ <button type="button" class="btnType btnType17" onClick="javascrit:fnAddrSearch(); return false;">검색</button> |
|
| 1317 |
+ </div> |
|
| 1318 |
+ <!-- table --> |
|
| 1319 |
+ <div class="adr_excel adr_pop_list2 callAddr_box"> |
|
| 1320 |
+ </div> |
|
| 1321 |
+ <!--// table --> |
|
| 1322 |
+ </div> |
|
| 1323 |
+ <div class="popup_btn_wrap2"> |
|
| 1324 |
+ <button type="button" onClick="javascript:addrToList(); return false;">추가</button> |
|
| 1325 |
+ <button type="button" onClick="javascript:addrClose(); return false;">닫기</button> |
|
| 1326 |
+ </div> |
|
| 1327 |
+ <%-- 주소록 레이어 팝업 닫기 실행 코드 --%> |
|
| 1328 |
+ <input type="hidden" name="btnAddrClose" id="btnAddrClose" class="tooltip-close closeAddr" data-focus="popup06-close" /> |
|
| 1329 |
+ </div> |
|
| 1330 |
+ </form> |
|
| 1331 |
+ </div> |
|
| 1332 |
+ </div> |
|
| 1333 |
+ </div> |
|
| 1334 |
+</div> |
|
| 1335 |
+<!--// 주소록 불러오기 --> |
|
| 1336 |
+ |
|
| 1337 |
+<!-- 엑셀 불러오기 --> |
|
| 1338 |
+<form id="excelToolTipForm" name="excelToolTipForm" method="post"> |
|
| 1339 |
+ <div class="tooltip-wrap"> |
|
| 1340 |
+ <div class="popup-com import_layer popup02" tabindex="0" data-tooltip-con="popup02" data-focus="popup02" data-focus-prev="popup02-close"> |
|
| 1341 |
+ <div class="popup_heading"> |
|
| 1342 |
+ <p><span>엑셀</span> 불러오기</p> |
|
| 1343 |
+ <button type="button" class="tooltip-close" data-focus="popup02-close"><img src="/publish/images/content/layerPopup_close.png" alt="팝업 닫기"></button> |
|
| 1344 |
+ </div> |
|
| 1345 |
+ <div class="layer_in"> |
|
| 1346 |
+ <!-- 엑셀파일 불러오기 --> |
|
| 1347 |
+ <div class="hascont"> |
|
| 1348 |
+ <div class="titBox"> |
|
| 1349 |
+ <p>- 최대 2만 건까지 등록할 수 있습니다.</p> |
|
| 1350 |
+ <p>- [엑셀 불러오기]시 문서의 A, B열을 불러옵니다.(지원하는 파일 형식 : xls, xlsx)</p> |
|
| 1351 |
+ <p>- 휴대폰 항목은 숫자, 하이픈(-)만 인식하며, 번호 앞에 0이 생략되어도 정상 등록됩니다. |
|
| 1352 |
+ </p> |
|
| 1353 |
+ <!-- <button type="button" class="excel_btn" onclick="location.href='/cmm/fms/FileDown.do?atchFileId=FILE_000000000011651&fileSn=1'"><i></i>샘플파일 다운로드</button> --> |
|
| 1354 |
+ <button type="button" class="excel_btn" onclick="location.href='/download/msg/엑셀주소록_등록양식.xlsx'"><i class="downroad"></i>샘플파일 다운로드</button> |
|
| 1355 |
+ </div> |
|
| 1356 |
+ <div class="attachedFile"> |
|
| 1357 |
+ <label for="" class="attachedFile_label">첨부파일</label> |
|
| 1358 |
+ <input type="text" id="excelNm" value="" readonly> |
|
| 1359 |
+ <input type="file" id="excelFile" accept=".xls, .xlsx" onchange="excelExport(event); return false;" style="display:none"/> |
|
| 1360 |
+ <button type="button" class="btnType btnType6 c1">찾아보기</button> |
|
| 1361 |
+<!-- <p><span class="vMiddle">*</span> 첨부된 파일은 <span class="c_e40000">[추가]버튼을 클릭</span>하셔야 받는 사람에 등록됩니다.</p> --> |
|
| 1362 |
+ <p><span class="vMiddle">*</span> 첨부된 파일은 <span class="c_e40000">[추가]버튼을 클릭</span>하셔야 받는 사람에 등록됩니다.</p> |
|
| 1363 |
+ </div> |
|
| 1364 |
+ </div><!--// 엑셀파일 불러오기 --> |
|
| 1365 |
+ <div class="popup_btn_wrap2"> |
|
| 1366 |
+ <button type="button" class="tooltip-close" data-focus="popup02-close" data-focus-next="popup02" onclick="excelAdd()">추가</button> |
|
| 1367 |
+ <button type="button" class="tooltip-close" data-focus="popup02-close" data-focus-next="popup02">닫기</button> |
|
| 1368 |
+ </div> |
|
| 1369 |
+ </div> |
|
| 1370 |
+ </div> |
|
| 1371 |
+ </div><!--// 엑셀 불러오기 --> |
|
| 1372 |
+</form> |
|
| 1373 |
+ |
|
| 1374 |
+<form id="templateForm" name="templateForm" method="post"> |
|
| 1375 |
+ <input type="hidden" id="friendId" name="friendId" value="<c:out value='${resultTemplateVO.friendId}'/>"/>
|
|
| 1376 |
+</form>(No newline at end of file) |
--- src/main/webapp/WEB-INF/jsp/web/kakao/template/ft/KakaoFriendstalkTemplateListPopupAjax.jsp
+++ src/main/webapp/WEB-INF/jsp/web/kakao/template/ft/KakaoFriendstalkTemplateListPopupAjax.jsp
... | ... | @@ -112,6 +112,13 @@ |
| 112 | 112 |
form.submit(); |
| 113 | 113 |
|
| 114 | 114 |
} |
| 115 |
+ |
|
| 116 |
+ function fnTemplateDetail(ftId){
|
|
| 117 |
+ |
|
| 118 |
+ opener.parent.myTemplateSelect(ftId); |
|
| 119 |
+ self.close(); |
|
| 120 |
+ |
|
| 121 |
+ } |
|
| 115 | 122 |
|
| 116 | 123 |
|
| 117 | 124 |
</script> |
... | ... | @@ -144,10 +151,10 @@ |
| 144 | 151 |
<div class="kakao_template_wrap"> |
| 145 | 152 |
<div class="template_cont"> |
| 146 | 153 |
<div class="title"> |
| 147 |
- <div class="check"> |
|
| 154 |
+ <%-- <div class="check"> |
|
| 148 | 155 |
<input type="checkbox" name="inputTemplateId" id="inputTemplateId" value="<c:out value='${templatInfoList.friendId}'/>">
|
| 149 |
- </div> |
|
| 150 |
- <p title="친구톡 템플릿 내용" onclick="javascript:fnTemplateDetail('<c:out value="${templatInfoList.friendId}"/>'); return false;" style="cursor:pointer;">
|
|
| 156 |
+ </div> --%> |
|
| 157 |
+ <p title="친구톡 템플릿 내용"> |
|
| 151 | 158 |
<c:if test="${templatInfoList.adFlag eq 'Y'}">(광고)</c:if>
|
| 152 | 159 |
<c:out value="${fn:replace(templatInfoList.yellowId, '@', '')}"/>
|
| 153 | 160 |
</p> |
... | ... | @@ -158,7 +165,7 @@ |
| 158 | 165 |
<img src="<c:url value='${templatInfoList.templateImageUrl}'/>" alt="">
|
| 159 | 166 |
</div> |
| 160 | 167 |
</c:if> |
| 161 |
- <div class="text_box" onclick="javascript:fnTemplateDetail('<c:out value="${templatInfoList.friendId}"/>'); return false;" style="cursor:pointer;">
|
|
| 168 |
+ <div class="text_box"> |
|
| 162 | 169 |
<p><c:out value="${fn:replace(fn:replace(templatInfoList.templateContent, newLineChar, '<br/>'), newLineChar2, '<br/>')}" escapeXml="false"/></p>
|
| 163 | 170 |
<!-- 채널 추가형을 선택한 경우 자동으로 버튼이 하나 추가됨, 버튼을 추가한 경우 버튼 정보 표시 --> |
| 164 | 171 |
<c:forEach var="templatInfoButtonList" items="${templatInfoList.buttonVOList}" varStatus="status">
|
... | ... | @@ -170,7 +177,10 @@ |
| 170 | 177 |
<p class="cf_text">수신거부 | 홈 > 채널차단</p> |
| 171 | 178 |
</c:if> |
| 172 | 179 |
</div> |
| 173 |
- <div class="kakao_template_info"> |
|
| 180 |
+ <div class="btn_wrap"> |
|
| 181 |
+ <button type="button" class="btnType btnType3 btn_template_use" onClick="fnTemplateDetail('<c:out value="${templatInfoList.friendId}"/>'); return false;">템플릿 사용하기</button>
|
|
| 182 |
+ </div> |
|
| 183 |
+ <%-- <div class="kakao_template_info"> |
|
| 174 | 184 |
<dl> |
| 175 | 185 |
<dt>템플릿명</dt> |
| 176 | 186 |
<dd> |
... | ... | @@ -181,7 +191,7 @@ |
| 181 | 191 |
<dt>등록일</dt> |
| 182 | 192 |
<dd><c:out value="${templatInfoList.frstRegistPnttm}"/></dd>
|
| 183 | 193 |
</dl> |
| 184 |
- </div> |
|
| 194 |
+ </div> --%> |
|
| 185 | 195 |
</li> |
| 186 | 196 |
</c:forEach> |
| 187 | 197 |
</c:when> |
--- src/main/webapp/WEB-INF/jsp/web/kakao/template/ft/KakaoFriendstalkTemplateRegist.jsp
+++ src/main/webapp/WEB-INF/jsp/web/kakao/template/ft/KakaoFriendstalkTemplateRegist.jsp
... | ... | @@ -611,7 +611,7 @@ |
| 611 | 611 |
<th>템플릿명</th> |
| 612 | 612 |
<td> |
| 613 | 613 |
<input type="text" class="template_name" id="inputTemplateName" name="inputTemplateName" placeholder="템플릿 명을 입력해주세요" maxLength="100"> |
| 614 |
- <p class="template_name_cf">최대 100자, 템플릿 관리용</p> |
|
| 614 |
+ <p class="template_name_cf">최대 50자, 템플릿 관리용</p> |
|
| 615 | 615 |
</td> |
| 616 | 616 |
</tr> |
| 617 | 617 |
<tr> |
+++ src/main/webapp/js/kakao/at/friendstalkExcel.js
... | ... | @@ -0,0 +1,180 @@ |
| 1 | +/** | |
| 2 | + * | |
| 3 | + * @author : 우영두 | |
| 4 | + * @fileName : friendstalkExcel.js | |
| 5 | + * @date : 2024.01.08 | |
| 6 | + * @description : 친구톡 excel 관련된 fuction .js | |
| 7 | + * =========================================================== | |
| 8 | + * DATE AUTHOR NOTE | |
| 9 | + * ----------------------------------------------------------- * | |
| 10 | + * 2024.01.08 우영두 최초 생성 | |
| 11 | + * | |
| 12 | + * | |
| 13 | + * | |
| 14 | + */ | |
| 15 | + | |
| 16 | + | |
| 17 | +$(document).ready(function(){ | |
| 18 | + | |
| 19 | + //치환문자 없는 엑섹불러오기 버튼 클릭시 파일 첨부 실행 | |
| 20 | + $('.c1').click(function(){ // 엑셀파일 불러오기 선택 시 | |
| 21 | + | |
| 22 | + $("#excelFile").click(); | |
| 23 | + | |
| 24 | + }); | |
| 25 | + | |
| 26 | +}); | |
| 27 | + | |
| 28 | + | |
| 29 | +//엑셀 파일 불러오기 | |
| 30 | +function excelExport(event){ | |
| 31 | + | |
| 32 | + var fileValue = $("#excelFile").val().split("\\"); | |
| 33 | + var fileName = fileValue[fileValue.length-1]; | |
| 34 | + | |
| 35 | + var fileExt = fileName.split('.').pop().toLowerCase(); | |
| 36 | + | |
| 37 | + if(fileExt.length > 0){ | |
| 38 | + if($.inArray(fileExt, ['txt','xls','xlsx']) == -1) { | |
| 39 | + | |
| 40 | + alert('txt, xls, xlsx 파일만 업로드 할수 있습니다.'); | |
| 41 | + return false; | |
| 42 | + | |
| 43 | + } | |
| 44 | + | |
| 45 | + //$("#excelFile").val(""); | |
| 46 | + //선택 파일명 화면에 표시해주기 | |
| 47 | + $("#excelNm").val(fileName); | |
| 48 | + | |
| 49 | + } | |
| 50 | + | |
| 51 | +} | |
| 52 | + | |
| 53 | + | |
| 54 | +//엑셀파일 자료 데이터베이스에 입력해주기 | |
| 55 | +function fnInsertAttchFileData(){ | |
| 56 | + | |
| 57 | + var data = new FormData(document.excelForm); | |
| 58 | + data.append("file0", $('#excelFile').prop('files')[0]); | |
| 59 | + | |
| 60 | + var fileValue = $("#excelFile").val().split("\\"); | |
| 61 | + var fileName = fileValue[fileValue.length-1]; | |
| 62 | + | |
| 63 | + var fileExt = fileName.split('.').pop().toLowerCase(); | |
| 64 | + | |
| 65 | + var url = ""; | |
| 66 | + | |
| 67 | + if(fileExt == "xls" || fileExt == "xlsx"){ | |
| 68 | + | |
| 69 | + //url = "/web/mjon/msgcampain/insertExelFileTWCallToAjax.do"; | |
| 70 | + | |
| 71 | + }else if(fileExt = "txt"){ | |
| 72 | + | |
| 73 | + //url = "/web/mjon/msgcampain/insertTxtFileTWCallToAjax.do"; | |
| 74 | + | |
| 75 | + }else{ | |
| 76 | + | |
| 77 | + alert('txt, xls, xlsx 파일만 업로드 할수 있습니다.'); | |
| 78 | + return; | |
| 79 | + | |
| 80 | + } | |
| 81 | + | |
| 82 | + //엑셀 데이터 변수에 자료가 있으면 지워준다. | |
| 83 | + if(excelAddr.length > 0){ | |
| 84 | + | |
| 85 | + excelAddr = []; | |
| 86 | + | |
| 87 | + } | |
| 88 | + | |
| 89 | + $.ajax({ | |
| 90 | + type: "POST", | |
| 91 | + enctype: 'multipart/form-data', | |
| 92 | + url: url, | |
| 93 | + data: data, | |
| 94 | + dataType:'json', | |
| 95 | + async: true, | |
| 96 | + processData: false, | |
| 97 | + contentType: false, | |
| 98 | + cache: false, | |
| 99 | + //timeout: 600000, | |
| 100 | + success: function (returnData, status) { | |
| 101 | + if(status == 'success'){ // status 확인 필요한가. 석세스 안뜨면 에러 가지 않나 | |
| 102 | + | |
| 103 | + if(returnData.success){ | |
| 104 | + | |
| 105 | + var data = returnData.data; | |
| 106 | + var message = returnData.message; | |
| 107 | + | |
| 108 | + if(message != '' ){ | |
| 109 | + alert(returnData.message); | |
| 110 | + } | |
| 111 | + | |
| 112 | + | |
| 113 | + if(data != null){ | |
| 114 | + | |
| 115 | + $.each(data, function(i, item){ | |
| 116 | + | |
| 117 | + //form 데이터 callSeq에 순번 입력해주기 | |
| 118 | + $("#callSeq").val(item.callSeq); | |
| 119 | + | |
| 120 | + }); | |
| 121 | + | |
| 122 | + } | |
| 123 | + | |
| 124 | + //입력된 데이터베이스에서 받는사람 20건 불러와서 화면에 표시해주기 | |
| 125 | + var callSeq = $("#callSeq").val(); | |
| 126 | + if(callSeq > 0){ | |
| 127 | + | |
| 128 | + //첨부파일로 불러온 데이터를 받는사람 목록에 추가해 준다. | |
| 129 | + addTWCallToInfo(); | |
| 130 | + | |
| 131 | + //첨부파일 초기화 시켜주기 | |
| 132 | + $("#excelFile").val(""); | |
| 133 | + $("#excelNm").val(""); | |
| 134 | + | |
| 135 | + }else{ | |
| 136 | + | |
| 137 | + alert("추가 엑셀 데이터가 없습니다."); | |
| 138 | + return false; | |
| 139 | + | |
| 140 | + } | |
| 141 | + | |
| 142 | + }else{ | |
| 143 | + alert(returnData.message); | |
| 144 | + excelAddr = []; //엑셀 데이터 저장 변수 초기화 | |
| 145 | + $("#excelFile").val(""); //첨부파일 input 초기화 | |
| 146 | + $("#excelNm").val(""); // 첨부파일 명 초기화 | |
| 147 | + fileName = ""; | |
| 148 | + return; | |
| 149 | + | |
| 150 | + } | |
| 151 | + } else if(status== 'fail'){ | |
| 152 | + alert("첨부파일 불러오는 중 오류가 발생하였습니다."); | |
| 153 | + console.log("status : fail ~"); | |
| 154 | + } | |
| 155 | + }, | |
| 156 | + error: function (e) { | |
| 157 | + alert("첨부파일 불러오는 중 오류가 발생하였습니다."); | |
| 158 | + console.log("ERROR : ", e); | |
| 159 | + }, | |
| 160 | + beforeSend : function(xmlHttpRequest) { | |
| 161 | + //로딩창 show | |
| 162 | + $('.loading_layer').addClass('active'); | |
| 163 | + }, | |
| 164 | + complete : function(xhr, textStatus) { | |
| 165 | + //로딩창 hide | |
| 166 | + $('.loading_layer').removeClass('active'); | |
| 167 | + } | |
| 168 | + }); | |
| 169 | + | |
| 170 | +} | |
| 171 | + | |
| 172 | +//엑셀 불러오기 팝업의 추가 버튼 처리 | |
| 173 | +$("#excelAdd").click(function(){ | |
| 174 | + | |
| 175 | + var callSeq = $("#callSeq").val(); | |
| 176 | + | |
| 177 | + //엑셀파일 자료 데이터베이스에 입력해주기 | |
| 178 | + fnInsertAttchFileData(); | |
| 179 | + | |
| 180 | +});(No newline at end of file) |
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?