카카오 친구톡 템플릿 상세보기 화면 정보 표시 기능 개발
@8cfee033ed3c960663901db708bd41db0e9cb9a1
--- src/main/java/itn/let/kakao/kakaoComm/KakaoVO.java
+++ src/main/java/itn/let/kakao/kakaoComm/KakaoVO.java
... | ... | @@ -238,6 +238,7 @@ |
| 238 | 238 |
private String imageTitle; //친구톡 이미지 제목 |
| 239 | 239 |
private String imageLink; //친구톡 이미지 클릭시 링크 주소 |
| 240 | 240 |
private String jsonText; //json 파일 생성시 내용 저장(혹시 몰라서 내용도 별도로 저장함) |
| 241 |
+ private String imageFileName; //친구톡 이미지 원본 파일명 |
|
| 241 | 242 |
|
| 242 | 243 |
private String successDay; |
| 243 | 244 |
private String successMonth; |
... | ... | @@ -1110,6 +1111,14 @@ |
| 1110 | 1111 |
this.jsonText = jsonText; |
| 1111 | 1112 |
} |
| 1112 | 1113 |
|
| 1114 |
+ public String getImageFileName() {
|
|
| 1115 |
+ return imageFileName; |
|
| 1116 |
+ } |
|
| 1117 |
+ |
|
| 1118 |
+ public void setImageFileName(String imageFileName) {
|
|
| 1119 |
+ this.imageFileName = imageFileName; |
|
| 1120 |
+ } |
|
| 1121 |
+ |
|
| 1113 | 1122 |
public String getSbscrbDe() {
|
| 1114 | 1123 |
return sbscrbDe; |
| 1115 | 1124 |
} |
--- src/main/java/itn/let/kakao/user/kakaoFt/service/KakaoFriendsTalkTemplateService.java
+++ src/main/java/itn/let/kakao/user/kakaoFt/service/KakaoFriendsTalkTemplateService.java
... | ... | @@ -14,4 +14,7 @@ |
| 14 | 14 |
|
| 15 | 15 |
//친구톡 템플릿 삭제처리하기 |
| 16 | 16 |
int deleteKakaoFriendstalkTemplate(KakaoVO kakaoVO) throws Exception; |
| 17 |
+ |
|
| 18 |
+ //친구톡 템플릿 상세정보 조회 |
|
| 19 |
+ KakaoVO selectKakaoFriendsTemplateDetail(KakaoVO kakaoVO) throws Exception; |
|
| 17 | 20 |
} |
--- src/main/java/itn/let/kakao/user/kakaoFt/service/impl/KakaoFriendsTalkTemplateDAO.java
+++ src/main/java/itn/let/kakao/user/kakaoFt/service/impl/KakaoFriendsTalkTemplateDAO.java
... | ... | @@ -107,4 +107,23 @@ |
| 107 | 107 |
|
| 108 | 108 |
return result; |
| 109 | 109 |
} |
| 110 |
+ |
|
| 111 |
+ |
|
| 112 |
+ //친구톡 템플릿 상세정보 조회 |
|
| 113 |
+ public KakaoVO selectKakaoFriendsTemplateDetail(KakaoVO kakaoVO) throws Exception{
|
|
| 114 |
+ |
|
| 115 |
+ KakaoVO result = new KakaoVO(); |
|
| 116 |
+ |
|
| 117 |
+ try {
|
|
| 118 |
+ |
|
| 119 |
+ result = (KakaoVO) select("kakaoFriendsTalkTemplateDAO.selectKakaoFriendsTemplateDetail", kakaoVO);
|
|
| 120 |
+ |
|
| 121 |
+ } catch (Exception e) {
|
|
| 122 |
+ System.out.println("selectKakaoFriendsTemplateDetail DAO Error !!! " + e);
|
|
| 123 |
+ } |
|
| 124 |
+ |
|
| 125 |
+ return result; |
|
| 126 |
+ |
|
| 127 |
+ } |
|
| 128 |
+ |
|
| 110 | 129 |
} |
--- src/main/java/itn/let/kakao/user/kakaoFt/service/impl/KakaoFriendsTalkTemplateServiceImpl.java
+++ src/main/java/itn/let/kakao/user/kakaoFt/service/impl/KakaoFriendsTalkTemplateServiceImpl.java
... | ... | @@ -126,4 +126,37 @@ |
| 126 | 126 |
return result; |
| 127 | 127 |
} |
| 128 | 128 |
|
| 129 |
+ //친구톡 템플릿 상세정보 조회 |
|
| 130 |
+ @Override |
|
| 131 |
+ public KakaoVO selectKakaoFriendsTemplateDetail(KakaoVO kakaoVO) throws Exception{
|
|
| 132 |
+ |
|
| 133 |
+ KakaoVO result = new KakaoVO(); |
|
| 134 |
+ |
|
| 135 |
+ try {
|
|
| 136 |
+ |
|
| 137 |
+ result = kakaoFriendsTalkTemplateDAO.selectKakaoFriendsTemplateDetail(kakaoVO); |
|
| 138 |
+ |
|
| 139 |
+ //템플릿에 등록된 버튼정보가 있는지 확인하여 추가 |
|
| 140 |
+ if(result != null) {
|
|
| 141 |
+ |
|
| 142 |
+ List<KakaoButtonVO> buttonList = new ArrayList<KakaoButtonVO>(); |
|
| 143 |
+ MjonKakaoTemplateButtonVO buttonVO = new MjonKakaoTemplateButtonVO(); |
|
| 144 |
+ buttonVO.setTemplateId(kakaoVO.getFriendId()); |
|
| 145 |
+ buttonVO.setTemplateUseType("F");
|
|
| 146 |
+ buttonList = kakaoFriendsTalkTemplateDAO.selectKakaoFriendsTemplateButtons(buttonVO); |
|
| 147 |
+ |
|
| 148 |
+ if(buttonList != null) {
|
|
| 149 |
+ result.setButtonVOList(buttonList); |
|
| 150 |
+ } |
|
| 151 |
+ |
|
| 152 |
+ } |
|
| 153 |
+ |
|
| 154 |
+ } catch (Exception e) {
|
|
| 155 |
+ System.out.println("selectKakaoFriendsTemplateDetail ServiceImple Error !!! " + e);
|
|
| 156 |
+ } |
|
| 157 |
+ |
|
| 158 |
+ return result; |
|
| 159 |
+ |
|
| 160 |
+ } |
|
| 161 |
+ |
|
| 129 | 162 |
} |
--- src/main/java/itn/let/kakao/user/kakaoFt/web/KakaoFriendsTalkTemplateController.java
+++ src/main/java/itn/let/kakao/user/kakaoFt/web/KakaoFriendsTalkTemplateController.java
... | ... | @@ -511,16 +511,16 @@ |
| 511 | 511 |
List<MjonSymbolVO> symbolList = mjonSymbolService.selectMjonSymbolList(symbolVO); |
| 512 | 512 |
model.addAttribute("symbolList", symbolList);
|
| 513 | 513 |
|
| 514 |
+ KakaoVO resultTemplateVO = kakaoFtTemplateService.selectKakaoFriendsTemplateDetail(kakaoVO); |
|
| 514 | 515 |
|
| 515 |
- |
|
| 516 |
- System.out.println("++++++++++++++++++ templateCode ::: "+kakaoVO.getTemplateCode());
|
|
| 516 |
+ System.out.println("++++++++++++++++++ templateCode ::: "+kakaoVO.getFriendId());
|
|
| 517 | 517 |
System.out.println("++++++++++++++++++ senderKey ::: "+kakaoVO.getSenderKey());
|
| 518 |
+ |
|
| 519 |
+ model.addAttribute("resultTemplateVO", resultTemplateVO);
|
|
| 518 | 520 |
|
| 519 | 521 |
} catch (Exception e) {
|
| 520 | 522 |
System.out.println(" selectKakaoFriendsTemplateDataDetail Error ::: " + e);
|
| 521 | 523 |
} |
| 522 |
- |
|
| 523 |
- |
|
| 524 | 524 |
|
| 525 | 525 |
return "/web/kakao/template/ft/KakaoFriendstalkTemplateDetail"; |
| 526 | 526 |
} |
--- src/main/resources/egovframework/sqlmap/let/mjo/kakao/Kakao_FT_SQL_Mysql.xml
+++ src/main/resources/egovframework/sqlmap/let/mjo/kakao/Kakao_FT_SQL_Mysql.xml
... | ... | @@ -20,6 +20,7 @@ |
| 20 | 20 |
USER_ID, |
| 21 | 21 |
ATCH_FILE_ID, |
| 22 | 22 |
TEMPLATE_NAME, |
| 23 |
+ IMAGE_FILE_NAME, |
|
| 23 | 24 |
IMAGE_URL, |
| 24 | 25 |
IMAGE_TYPE, |
| 25 | 26 |
IMAGE_TITLE, |
... | ... | @@ -38,6 +39,7 @@ |
| 38 | 39 |
, #userId# |
| 39 | 40 |
, #bizJsonName# |
| 40 | 41 |
, #templateName# |
| 42 |
+ , #imageFileName# |
|
| 41 | 43 |
, #templateImageUrl# |
| 42 | 44 |
, #imageType# |
| 43 | 45 |
, #imgTitle# |
... | ... | @@ -100,6 +102,7 @@ |
| 100 | 102 |
A.SENDER_KEY AS senderKey, |
| 101 | 103 |
KPI.YELLOW_ID AS yellowId, |
| 102 | 104 |
A.TEMPLATE_NAME AS templateName, |
| 105 |
+ A.IMAGE_FILE_NAME AS imageFileName, |
|
| 103 | 106 |
A.IMAGE_URL AS templateImageUrl, |
| 104 | 107 |
A.IMAGE_TYPE AS imageType, |
| 105 | 108 |
A.IMAGE_TITLE AS imgTitle, |
... | ... | @@ -114,6 +117,7 @@ |
| 114 | 117 |
KFT.USER_ID, |
| 115 | 118 |
KFT.SENDER_KEY, |
| 116 | 119 |
KFT.TEMPLATE_NAME, |
| 120 |
+ KFT.IMAGE_FILE_NAME, |
|
| 117 | 121 |
KFT.IMAGE_URL, |
| 118 | 122 |
KFT.IMAGE_TYPE, |
| 119 | 123 |
KFT.IMAGE_TITLE, |
... | ... | @@ -199,5 +203,49 @@ |
| 199 | 203 |
|
| 200 | 204 |
</delete> |
| 201 | 205 |
|
| 206 |
+ <select id="kakaoFriendsTalkTemplateDAO.selectKakaoFriendsTemplateDetail" parameterClass="kakaoVO" resultClass="kakaoVO"> |
|
| 207 |
+ SELECT A.FRIEND_ID AS friendId, |
|
| 208 |
+ A.USER_ID AS userId, |
|
| 209 |
+ A.SENDER_KEY AS senderKey, |
|
| 210 |
+ KPI.YELLOW_ID AS yellowId, |
|
| 211 |
+ A.TEMPLATE_NAME AS templateName, |
|
| 212 |
+ A.IMAGE_FILE_NAME AS imageFileName, |
|
| 213 |
+ A.IMAGE_URL AS templateImageUrl, |
|
| 214 |
+ A.IMAGE_TYPE AS imageType, |
|
| 215 |
+ A.IMAGE_TITLE AS imgTitle, |
|
| 216 |
+ A.IMAGE_LINK AS imgLink, |
|
| 217 |
+ A.TEMPLATE_CONTENTS AS templateContent, |
|
| 218 |
+ A.AD_FLAG AS adFlag, |
|
| 219 |
+ DATE_FORMAT(A.FRST_REGIST_PNTTM, '%Y-%m-%d %T') AS frstRegistPnttm, |
|
| 220 |
+ A.FRST_REGISTER_ID AS frstRegisterId, |
|
| 221 |
+ DATE_FORMAT(A.LAST_UPDT_PNTTM, '%Y-%m-%d %T') AS lastUpdtPnttm, |
|
| 222 |
+ A.LAST_UPDUSR_ID AS lastUpdusrId |
|
| 223 |
+ FROM ( SELECT KFT.FRIEND_ID, |
|
| 224 |
+ KFT.USER_ID, |
|
| 225 |
+ KFT.SENDER_KEY, |
|
| 226 |
+ KFT.TEMPLATE_NAME, |
|
| 227 |
+ KFT.IMAGE_FILE_NAME, |
|
| 228 |
+ KFT.IMAGE_URL, |
|
| 229 |
+ KFT.IMAGE_TYPE, |
|
| 230 |
+ KFT.IMAGE_TITLE, |
|
| 231 |
+ KFT.IMAGE_LINK, |
|
| 232 |
+ KFT.TEMPLATE_CONTENTS, |
|
| 233 |
+ KFT.AD_FLAG, |
|
| 234 |
+ KFT.FRST_REGIST_PNTTM, |
|
| 235 |
+ KFT.FRST_REGISTER_ID, |
|
| 236 |
+ KFT.LAST_UPDT_PNTTM, |
|
| 237 |
+ KFT.LAST_UPDUSR_ID |
|
| 238 |
+ FROM MJ_KAKAO_FRIENDS_TEMPLATE KFT |
|
| 239 |
+ WHERE DELETE_YN = 'N' |
|
| 240 |
+ AND USER_ID = #userId# |
|
| 241 |
+ AND FRIEND_ID = #friendId# |
|
| 242 |
+ ) |
|
| 243 |
+ A |
|
| 244 |
+ LEFT JOIN MJ_KAKAO_PROFILE_INFO KPI |
|
| 245 |
+ ON A.USER_ID = KPI.USER_ID |
|
| 246 |
+ AND A.SENDER_KEY = KPI.SENDER_KEY |
|
| 247 |
+ |
|
| 248 |
+ </select> |
|
| 249 |
+ |
|
| 202 | 250 |
|
| 203 | 251 |
</sqlMap>(No newline at end of file) |
--- src/main/webapp/WEB-INF/jsp/web/kakao/template/ft/KakaoFriendstalkTemplateDetail.jsp
+++ src/main/webapp/WEB-INF/jsp/web/kakao/template/ft/KakaoFriendstalkTemplateDetail.jsp
... | ... | @@ -14,14 +14,9 @@ |
| 14 | 14 |
|
| 15 | 15 |
$(document).ready(function (){
|
| 16 | 16 |
|
| 17 |
- //첫로딩시 우측 미리보기 화면 숨김처리 |
|
| 18 |
- $('.emphasis_title_text').hide(); //강조유형 타이틀
|
|
| 19 |
- $('.emphasis_side_text').hide(); //강조유형 보조문구
|
|
| 20 |
- //$('.template_text').hide(); //내용 미리보기
|
|
| 21 |
- $('.side_info_text').hide(); //부가정보 내용
|
|
| 22 |
- $('.channel_info_text').hide(); //채널추가 텍스트 내용
|
|
| 23 |
- $('.btnAd').hide(); //샘플 채널추가 버튼
|
|
| 24 |
- $('.btnEmpty').hide(); //샘플 버튼
|
|
| 17 |
+ //화면 초기 로딩시 화면 처리해주기 |
|
| 18 |
+ initFormChk(); |
|
| 19 |
+ |
|
| 25 | 20 |
|
| 26 | 21 |
//템플릿명 입력 글자수 체크 해주기 |
| 27 | 22 |
$("#inputTemplateName").keyup(function(e){
|
... | ... | @@ -44,12 +39,62 @@ |
| 44 | 39 |
$("#inputTemplateContent").keyup(function(e){
|
| 45 | 40 |
|
| 46 | 41 |
var contents = $('#inputTemplateContent').val();
|
| 47 |
- console.log(contents); |
|
| 48 | 42 |
setContentsLengForFriends(contents); |
| 49 | 43 |
|
| 50 | 44 |
}); |
| 51 | 45 |
|
| 46 |
+ |
|
| 52 | 47 |
}); |
| 48 |
+ |
|
| 49 |
+ |
|
| 50 |
+function initFormChk(){
|
|
| 51 |
+ |
|
| 52 |
+ //첫로딩시 우측 미리보기 화면 숨김처리 |
|
| 53 |
+ $('.emphasis_title_text').hide(); //강조유형 타이틀
|
|
| 54 |
+ $('.emphasis_side_text').hide(); //강조유형 보조문구
|
|
| 55 |
+ //$('.template_text').hide(); //내용 미리보기
|
|
| 56 |
+ $('.side_info_text').hide(); //부가정보 내용
|
|
| 57 |
+ $('.channel_info_text').hide(); //채널추가 텍스트 내용
|
|
| 58 |
+ $('.btnAd').hide(); //샘플 채널추가 버튼
|
|
| 59 |
+ $('.btnEmpty').hide(); //샘플 버튼
|
|
| 60 |
+ |
|
| 61 |
+ //채널ID 정보 미리보기에 표시해주기 |
|
| 62 |
+ fnAgentCodeChg(); |
|
| 63 |
+ |
|
| 64 |
+ //템플릿 등록 이미지가 있는 경우 이미지 정보 표시해 주기 |
|
| 65 |
+ var imgType = $("input[name=img_file_add]:checked").val();
|
|
| 66 |
+ |
|
| 67 |
+ if(!imgType == ''){
|
|
| 68 |
+ |
|
| 69 |
+ if($("input[name='img_file_add']:checked").attr("id")=="img_file_1"){
|
|
| 70 |
+ $(".basic_img_add_wrap").show().siblings(".img_add_info_wrap").hide();
|
|
| 71 |
+ $(".img_file_add_wrap").show();
|
|
| 72 |
+ }else if($("input[name='img_file_add']:checked").attr("id")=="img_file_2"){
|
|
| 73 |
+ $(".wide_img_add_wrap").show().siblings(".img_add_info_wrap").hide();
|
|
| 74 |
+ $(".img_file_add_wrap").show();
|
|
| 75 |
+ } else{
|
|
| 76 |
+ $(".img_add_info_wrap, .img_file_add_wrap").hide();
|
|
| 77 |
+ } |
|
| 78 |
+ |
|
| 79 |
+ } |
|
| 80 |
+ var imageFileName = '${resultTemplateVO.imageFileName}';
|
|
| 81 |
+ $("#imgNm").text(imageFileName);
|
|
| 82 |
+ |
|
| 83 |
+ //미리보기에 이미지 표시해주기 |
|
| 84 |
+ var imgUrl = '${resultTemplateVO.templateImageUrl}';
|
|
| 85 |
+ $('.kakao_image').css("display", "block");
|
|
| 86 |
+ $("#kakaoImg").attr("src", imgUrl);
|
|
| 87 |
+ |
|
| 88 |
+ |
|
| 89 |
+ //초기 템플릿 내용 글자수 처리해주기 |
|
| 90 |
+ var tmpContents = $('#inputTemplateContent').val();
|
|
| 91 |
+ setContentsLengForFriends(tmpContents); |
|
| 92 |
+ |
|
| 93 |
+ //초기 광고포함 여부 처리 |
|
| 94 |
+ var adFlagVal = $("input[name=ad_flag]:checked").val();
|
|
| 95 |
+ advTextChange(adFlagVal); |
|
| 96 |
+ |
|
| 97 |
+} |
|
| 53 | 98 |
|
| 54 | 99 |
//--------------첨부파일 처리 함수 시작-------------------------- |
| 55 | 100 |
|
... | ... | @@ -508,6 +553,12 @@ |
| 508 | 553 |
$(document).on('change', '.inputAdFlag', function(){
|
| 509 | 554 |
|
| 510 | 555 |
var adFlagVal = $(this).val(); |
| 556 |
+ advTextChange(adFlagVal); |
|
| 557 |
+ |
|
| 558 |
+}); |
|
| 559 |
+ |
|
| 560 |
+function advTextChange(adFlagVal){
|
|
| 561 |
+ |
|
| 511 | 562 |
if(adFlagVal == 'N'){//광고 표시 숨김처리
|
| 512 | 563 |
|
| 513 | 564 |
$('.adFlag').hide();
|
... | ... | @@ -522,7 +573,7 @@ |
| 522 | 573 |
$('.adFlagAfter').show();
|
| 523 | 574 |
} |
| 524 | 575 |
|
| 525 |
-}); |
|
| 576 |
+} |
|
| 526 | 577 |
|
| 527 | 578 |
//이모티콘 삽입 기능 처리 |
| 528 | 579 |
$(document).on('click', '.symbolButton, .changeWord', function (){
|
... | ... | @@ -570,6 +621,7 @@ |
| 570 | 621 |
<input type="hidden" id="inputSenderKey" name="senderKey" value=""/> |
| 571 | 622 |
<input type="hidden" id="yellowId" name="yellowId" value=""/> |
| 572 | 623 |
<input type="hidden" id="templateName" name="templateName" value=""/> |
| 624 |
+ <input type="hidden" id="imageFileName" name="imageFileName" value="<c:out value='${resultTemplateVO.imageFileName}'/>"/>
|
|
| 573 | 625 |
<input type="hidden" id="imageType" name="imageType" value=""/> |
| 574 | 626 |
<input type="hidden" id="imageTitle" name="imageTitle" value=""> |
| 575 | 627 |
<input type="hidden" id="imageLink" name="imageLink" value=""> |
... | ... | @@ -593,7 +645,7 @@ |
| 593 | 645 |
<select class="select_gray_type" name="selectAgentCode" id="selectAgentCode" onchange="javascript:fnAgentCodeChg();"> |
| 594 | 646 |
<option value="">채널ID 선택</option> |
| 595 | 647 |
<c:forEach var="kakaoProfileInfo" items="${resultProfileList}" varStatus="status">
|
| 596 |
- <option value="${kakaoProfileInfo.senderKey}"><c:out value='${kakaoProfileInfo.yellowId}'/></option>
|
|
| 648 |
+ <option value="${kakaoProfileInfo.senderKey}" <c:if test="${kakaoProfileInfo.senderKey eq resultTemplateVO.senderKey}">selected</c:if> ><c:out value='${kakaoProfileInfo.yellowId}'/></option>
|
|
| 597 | 649 |
</c:forEach> |
| 598 | 650 |
</select> |
| 599 | 651 |
</td> |
... | ... | @@ -601,7 +653,7 @@ |
| 601 | 653 |
<tr> |
| 602 | 654 |
<th>템플릿명</th> |
| 603 | 655 |
<td> |
| 604 |
- <input type="text" class="template_name" id="inputTemplateName" name="inputTemplateName" placeholder="템플릿 명을 입력해주세요" maxLength="100"> |
|
| 656 |
+ <input type="text" class="template_name" id="inputTemplateName" name="inputTemplateName" value="<c:out value='${resultTemplateVO.templateName}'/>" placeholder="템플릿 명을 입력해주세요" maxLength="100">
|
|
| 605 | 657 |
<p class="template_name_cf">최대 100자, 템플릿 관리용</p> |
| 606 | 658 |
</td> |
| 607 | 659 |
</tr> |
... | ... | @@ -609,9 +661,9 @@ |
| 609 | 661 |
<th>이미지 첨부</th> |
| 610 | 662 |
<td class="img_file_add_td"> |
| 611 | 663 |
<div class="img_sort_wrap"> |
| 612 |
- <input type="radio" name="img_file_add" id="img_file_0" value="" checked><label for="img_file_0">첨부 안함</label> |
|
| 613 |
- <input type="radio" name="img_file_add" id="img_file_1" value="I"><label for="img_file_1">이미지 첨부</label> |
|
| 614 |
- <input type="radio" name="img_file_add" id="img_file_2" value="W"><label for="img_file_2">와이드 이미지 첨부</label> |
|
| 664 |
+ <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>
|
|
| 665 |
+ <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>
|
|
| 666 |
+ <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>
|
|
| 615 | 667 |
<div class="img_add_info_wrap basic_img_add_wrap"> |
| 616 | 668 |
<p class="info_title_text"><span class="c_e40000">*</span> 이미지 첨부 안내</p> |
| 617 | 669 |
<ul class="info_text"> |
... | ... | @@ -635,15 +687,15 @@ |
| 635 | 687 |
<ul class="img_file_info_wrap"> |
| 636 | 688 |
<li> |
| 637 | 689 |
<p>이미지 제목</p> |
| 638 |
- <input type="text" id="imgTitle" name="imgTitle" class="img_url" maxLength="50"> |
|
| 690 |
+ <input type="text" id="imgTitle" name="imgTitle" value="<c:out value='${resultTemplateVO.imgTitle}'/>" class="img_url" maxLength="50">
|
|
| 639 | 691 |
</li> |
| 640 | 692 |
<li> |
| 641 | 693 |
<p>이미지 클릭시 이동할 URL</p> |
| 642 |
- <input type="text" id="imgLink" name="imgLink" placeholder="http://" class="img_url" maxLength="1000"> |
|
| 694 |
+ <input type="text" id="imgLink" name="imgLink" value="<c:out value='${resultTemplateVO.imgLink}'/>" placeholder="http://" class="img_url" maxLength="1000">
|
|
| 643 | 695 |
</li> |
| 644 | 696 |
<li> |
| 645 | 697 |
<p class="file_name" id="imgNm" name="imgNm">첨부파일 이미지</p> |
| 646 |
- <input type="file" id="imgFile" accept=".jpg, .jpeg, .png" onchange="imgResizeInfo(event); return false;" style="display:none"/> |
|
| 698 |
+ <input type="file" id="imgFile" accept=".jpg, .jpeg, .png" onchange="imgResizeInfo(event); return false;" style="display:none"/> |
|
| 647 | 699 |
<button type="button" class="btn_del btnImgDel" onclick="buttonTypeDel(this);"> |
| 648 | 700 |
<img src="/publish/images/btn_delete.png" id="imgDel" alt="이미지 삭제" onclick="fnImageDel();"> |
| 649 | 701 |
</button> |
... | ... | @@ -656,9 +708,9 @@ |
| 656 | 708 |
<tr> |
| 657 | 709 |
<th>광고포함 여부</th> |
| 658 | 710 |
<td> |
| 659 |
- <input type="radio" class="inputAdFlag" name="ad_flag" id="ad_Y" value="Y" checked><label for="ad_Y">광고성 정보 |
|
| 711 |
+ <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">광고성 정보
|
|
| 660 | 712 |
포함</label> |
| 661 |
- <input type="radio" class="inputAdFlag" name="ad_flag" id="ad_N" value="N"><label for="ad_N">포함 안함</label> |
|
| 713 |
+ <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>
|
|
| 662 | 714 |
</td> |
| 663 | 715 |
</tr> |
| 664 | 716 |
<tr> |
... | ... | @@ -671,7 +723,7 @@ |
| 671 | 723 |
<p><span id="adFlagFront">(광고)</span> <span id="yellowIdCon" >채널ID</span></p> |
| 672 | 724 |
</div> |
| 673 | 725 |
<label for="inputTemplateContent" class="label"></label> |
| 674 |
- <textarea id="inputTemplateContent" name="inputTemplateContent" class="put_text" placeholder="내용을 입력해주세요."></textarea> |
|
| 726 |
+ <textarea id="inputTemplateContent" name="inputTemplateContent" class="put_text" placeholder="내용을 입력해주세요."><c:out value="${resultTemplateVO.templateContent}"/></textarea>
|
|
| 675 | 727 |
<div class="text_length"> |
| 676 | 728 |
<div> |
| 677 | 729 |
<p class="adFlagAfter">수신거부 : 홈 > 채널차단</p> |
... | ... | @@ -947,6 +999,131 @@ |
| 947 | 999 |
</select> |
| 948 | 1000 |
<button type="button" class="btnType btnType6" onclick="friendTemplateButtonAdd();">추가</button> |
| 949 | 1001 |
<div class="button_add_wrap"> |
| 1002 |
+ <c:forEach var="buttonList" items="${resultTemplateVO.buttonVOList}" varStatus="status">
|
|
| 1003 |
+ |
|
| 1004 |
+ <c:if test="${buttonList.linkType eq 'DS'}">
|
|
| 1005 |
+ <!-- 배송조회 버튼 --> |
|
| 1006 |
+ <dl class="button_type_wrap type1"> |
|
| 1007 |
+ <dt>배송조회</dt> |
|
| 1008 |
+ <dd class="button_type_input"> |
|
| 1009 |
+ <input type="hidden" id="buttonLikeTypeDeliv" name="buttonVOList[${status.index}].linkType" value="DS"/>
|
|
| 1010 |
+ <input type="text" id="btnNmDeliv" name="buttonVOList[${status.index}].name" value="<c:out value='${buttonList.name}'/>" placeholder="버튼명 입력(최대 14자)">
|
|
| 1011 |
+ <p class="cf_text">*이용가능 택배사 : KG로지스, 우체국택배,일양로지스, GTX로지스, FedEx, 경동택배, 합동택배, 롯데택배</p> |
|
| 1012 |
+ </dd> |
|
| 1013 |
+ <dd> |
|
| 1014 |
+ <button type="button" class="btn_del" onclick="buttonTypeDel(this);"><img src="/publish/images/btn_delete.png" alt=""></button> |
|
| 1015 |
+ </dd> |
|
| 1016 |
+ </dl> |
|
| 1017 |
+ </c:if> |
|
| 1018 |
+ |
|
| 1019 |
+ <c:if test="${buttonList.linkType eq 'WL'}">
|
|
| 1020 |
+ <!-- 웹링크 버튼 --> |
|
| 1021 |
+ <dl class="button_type_wrap type2"> |
|
| 1022 |
+ <dt>웹링크</dt> |
|
| 1023 |
+ <dd class="button_type_input"> |
|
| 1024 |
+ <ul> |
|
| 1025 |
+ <li> |
|
| 1026 |
+ <input type="hidden" id="buttonLikeTypeWeb" name="buttonVOList[${status.index}].linkType" value="WL"/>
|
|
| 1027 |
+ <input type="text" id="btnNmWeb" name="buttonVOList[${status.index}].name" value="<c:out value='${buttonList.name}'/>" placeholder="버튼명 입력(최대 14자)">
|
|
| 1028 |
+ </li> |
|
| 1029 |
+ <li> |
|
| 1030 |
+ <input type="text" id="buttonLinkMo" name="buttonVOList[${status.index}].linkMo" value="<c:out value='${buttonList.linkMo}'/>" placeholder="모바일 링크 입력">
|
|
| 1031 |
+ </li> |
|
| 1032 |
+ <li> |
|
| 1033 |
+ <input type="text" id="buttonLinkPc" name="buttonVOList[${status.index}].linkPc" value="<c:out value='${buttonList.linkPc}'/>" placeholder="PC 링크 입력">
|
|
| 1034 |
+ </li> |
|
| 1035 |
+ </ul> |
|
| 1036 |
+ </dd> |
|
| 1037 |
+ <dd> |
|
| 1038 |
+ <button type="button" class="btn_del" onclick="buttonTypeDel(this);"><img src="/publish/images/btn_delete.png" alt=""></button> |
|
| 1039 |
+ </dd> |
|
| 1040 |
+ </dl> |
|
| 1041 |
+ </c:if> |
|
| 1042 |
+ |
|
| 1043 |
+ <c:if test="${buttonList.linkType eq 'AL'}">
|
|
| 1044 |
+ <!-- 앱링크 버튼 --> |
|
| 1045 |
+ <dl class="button_type_wrap type3"> |
|
| 1046 |
+ <dt>앱링크</dt> |
|
| 1047 |
+ <dd class="button_type_input"> |
|
| 1048 |
+ <ul> |
|
| 1049 |
+ <li> |
|
| 1050 |
+ <input type="hidden" id="buttonLikeTypeApp" name="buttonVOList[${status.index}].linkType" value="AL"/>
|
|
| 1051 |
+ <input type="text" id="btnNmApp" name="buttonVOList[${status.index}].name" value="<c:out value='${buttonList.name}'/>" placeholder="버튼명 입력(최대 14자)">
|
|
| 1052 |
+ </li> |
|
| 1053 |
+ <li> |
|
| 1054 |
+ <input type="text" id="buttonLinkAnd" name="buttonVOList[${status.index}].linkAnd" value="<c:out value='${buttonList.linkAnd}'/>" placeholder="Android 링크 입력">
|
|
| 1055 |
+ </li> |
|
| 1056 |
+ <li> |
|
| 1057 |
+ <input type="text" id="buttonLinkIos" name="buttonVOList[${status.index}].linkIos" value="<c:out value='${buttonList.linkIos}'/>" placeholder="IOS 링크 입력">
|
|
| 1058 |
+ </li> |
|
| 1059 |
+ </ul> |
|
| 1060 |
+ </dd> |
|
| 1061 |
+ <dd> |
|
| 1062 |
+ <button type="button" class="btn_del" onclick="buttonTypeDel(this);"><img src="/publish/images/btn_delete.png" alt=""></button> |
|
| 1063 |
+ </dd> |
|
| 1064 |
+ </dl> |
|
| 1065 |
+ </c:if> |
|
| 1066 |
+ |
|
| 1067 |
+ <c:if test="${buttonList.linkType eq 'BK'}">
|
|
| 1068 |
+ <!-- 봇키워드 --> |
|
| 1069 |
+ <dl class="button_type_wrap type4"> |
|
| 1070 |
+ <dt>봇키워드</dt> |
|
| 1071 |
+ <dd class="button_type_input"> |
|
| 1072 |
+ <input type="hidden" id="buttonLikeTypeBot" name="buttonVOList[${status.index}].linkType" value="BK"/>
|
|
| 1073 |
+ <input type="text" id="btnNmBot" name="buttonVOList[${status.index}].name" value="<c:out value='${buttonList.name}'/>" placeholder="버튼명 입력(최대 14자)">
|
|
| 1074 |
+ </dd> |
|
| 1075 |
+ <dd><button type="button" class="btn_del" onclick="buttonTypeDel(this);"><img src="/publish/images/btn_delete.png" alt=""></button></dd> |
|
| 1076 |
+ </dl> |
|
| 1077 |
+ </c:if> |
|
| 1078 |
+ |
|
| 1079 |
+ <c:if test="${buttonList.linkType eq 'MD'}">
|
|
| 1080 |
+ <!-- 메시지 전달 --> |
|
| 1081 |
+ <dl class="button_type_wrap type5"> |
|
| 1082 |
+ <dt>메시지전달</dt> |
|
| 1083 |
+ <dd class="button_type_input"> |
|
| 1084 |
+ <input type="hidden" id="buttonLikeTypeMsg" name="buttonVOList[${status.index}].linkType" value="MD" />
|
|
| 1085 |
+ <input type="text" id="btnNmMsg" name="buttonVOList[${status.index}].name" value="<c:out value='${buttonList.name}'/>" placeholder="버튼명 입력(최대 14자)">
|
|
| 1086 |
+ </dd> |
|
| 1087 |
+ <dd> |
|
| 1088 |
+ <button type="button" class="btn_del" onclick="buttonTypeDel(this);"> |
|
| 1089 |
+ <img src="/publish/images/btn_delete.png" alt=""> |
|
| 1090 |
+ </button> |
|
| 1091 |
+ </dd> |
|
| 1092 |
+ </dl> |
|
| 1093 |
+ </c:if> |
|
| 1094 |
+ |
|
| 1095 |
+ <c:if test="${buttonList.linkType eq 'BC'}">
|
|
| 1096 |
+ <!-- 상담톡 전환 --> |
|
| 1097 |
+ <dl class="button_type_wrap type6"> |
|
| 1098 |
+ <dt>상담톡전환</dt> |
|
| 1099 |
+ <dd class="button_type_input"> |
|
| 1100 |
+ <input type="hidden" id="buttonLikeTypeCons" name="buttonVOList[${status.index}].linkType" value="BC" />
|
|
| 1101 |
+ <input type="text" id="btnNmCons" name="buttonVOList[${status.index}].name" value="<c:out value='${buttonList.name}'/>" placeholder="버튼명 입력(최대 14자)">
|
|
| 1102 |
+ </dd> |
|
| 1103 |
+ <dd> |
|
| 1104 |
+ <button type="button" class="btn_del" onclick="buttonTypeDel(this);"> |
|
| 1105 |
+ <img src="/publish/images/btn_delete.png" alt=""> |
|
| 1106 |
+ </button> |
|
| 1107 |
+ </dd> |
|
| 1108 |
+ </dl> |
|
| 1109 |
+ </c:if> |
|
| 1110 |
+ |
|
| 1111 |
+ <c:if test="${buttonList.linkType eq 'BT'}">
|
|
| 1112 |
+ <!-- 챗봇전환 --> |
|
| 1113 |
+ <dl class="button_type_wrap type7"> |
|
| 1114 |
+ <dt>챗봇전환</dt> |
|
| 1115 |
+ <dd class="button_type_input"> |
|
| 1116 |
+ <input type="hidden" id="buttonLikeTypeBotChg" name="buttonVOList[${status.index}].linkType" value="BT" />
|
|
| 1117 |
+ <input type="text" id="btnNmBotChg" name="buttonVOList[${status.index}].name" value="" placeholder="버튼명 입력(최대 14자)">
|
|
| 1118 |
+ </dd> |
|
| 1119 |
+ <dd> |
|
| 1120 |
+ <button type="button" class="btn_del" onclick="buttonTypeDel(this);"> |
|
| 1121 |
+ <img src="/publish/images/btn_delete.png" alt=""> |
|
| 1122 |
+ </button> |
|
| 1123 |
+ </dd> |
|
| 1124 |
+ </dl> |
|
| 1125 |
+ </c:if> |
|
| 1126 |
+ </c:forEach> |
|
| 950 | 1127 |
</div> |
| 951 | 1128 |
</td> |
| 952 | 1129 |
</tr> |
... | ... | @@ -968,7 +1145,9 @@ |
| 968 | 1145 |
</div> |
| 969 | 1146 |
<p class="template_text">내용 미리보기</p> |
| 970 | 1147 |
<div class="btnViewArea"> |
| 971 |
- <button type="button" class="btn_kakao_type" style="display:none;">문자온 바로가기</button> |
|
| 1148 |
+ <c:forEach var="buttonList" items="${resultTemplateVO.buttonVOList}" varStatus="status">
|
|
| 1149 |
+ <button type="button" class="btn_kakao_type" style="display:block;"><c:out value="${buttonList.name}"/></button>
|
|
| 1150 |
+ </c:forEach> |
|
| 972 | 1151 |
</div> |
| 973 | 1152 |
</div> |
| 974 | 1153 |
<p class="kakao_block_text">수신거부 : 홈 > 채널차단</p> |
--- src/main/webapp/WEB-INF/jsp/web/kakao/template/ft/KakaoFriendstalkTemplateRegist.jsp
+++ src/main/webapp/WEB-INF/jsp/web/kakao/template/ft/KakaoFriendstalkTemplateRegist.jsp
... | ... | @@ -211,6 +211,7 @@ |
| 211 | 211 |
|
| 212 | 212 |
$('.kakao_image').css("display", "block");
|
| 213 | 213 |
$("#kakaoImg").attr("src", imgUrl);
|
| 214 |
+ $("#imageFileName").val(fileName);
|
|
| 214 | 215 |
|
| 215 | 216 |
}else if(code == "2002"){//일반 이미지 가로 세로 크기 오류 발생
|
| 216 | 217 |
|
... | ... | @@ -565,7 +566,7 @@ |
| 565 | 566 |
<!--// tab button --> |
| 566 | 567 |
</div> |
| 567 | 568 |
<form id="bizForm" name="bizForm" method="multipart/form-data"> |
| 568 |
- <input type="hidden" id="menuTopTab" name="menuTopTab" value="tabConf"> |
|
| 569 |
+ <input type="hidden" id="menuTopTab" name="menuTopTab" value="tabConf"> |
|
| 569 | 570 |
<input type="hidden" id="menuSubTab" name="menuSubTab" value="tabSubFt"> |
| 570 | 571 |
<input type="hidden" id="inputSenderKey" name="senderKey" value=""/> |
| 571 | 572 |
<input type="hidden" id="yellowId" name="yellowId" value=""/> |
... | ... | @@ -576,7 +577,7 @@ |
| 576 | 577 |
<input type="hidden" id="adFlag" name="adFlag" value=""> |
| 577 | 578 |
<input type="hidden" id="templateImageUrl" name="templateImageUrl" value=""> |
| 578 | 579 |
<input type="hidden" id="templateContent" name="templateContent" value=""> |
| 579 |
- |
|
| 580 |
+ <input type="hidden" id="imageFileName" name="imageFileName" value=""/> |
|
| 580 | 581 |
|
| 581 | 582 |
<div class="send_general friend_talk_wrap kakao_wrap"> |
| 582 | 583 |
<div class="send_left"> |
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?