|
@@ -49,7 +49,7 @@
|
|
|
th:attr="onclick=|sendSns('facebook', '${stylelUrl+'/planning/detail/form?planSq='+planInfo.planSq}', '${planInfo.planNm}', '', '');|">
|
|
th:attr="onclick=|sendSns('facebook', '${stylelUrl+'/planning/detail/form?planSq='+planInfo.planSq}', '${planInfo.planNm}', '', '');|">
|
|
|
<span>페이스북</span>
|
|
<span>페이스북</span>
|
|
|
</button>
|
|
</button>
|
|
|
- <button type="button" class="tw"
|
|
|
|
|
|
|
+ <button type="button" class="tw"
|
|
|
th:attr="onclick=|sendSns('twitter', '${stylelUrl+'/planning/detail/form?planSq='+planInfo.planSq}', '${planInfo.planNm+ '#style24몰'}', '', '');|">
|
|
th:attr="onclick=|sendSns('twitter', '${stylelUrl+'/planning/detail/form?planSq='+planInfo.planSq}', '${planInfo.planNm+ '#style24몰'}', '', '');|">
|
|
|
<span>트위터</span>
|
|
<span>트위터</span>
|
|
|
</button>
|
|
</button>
|
|
@@ -287,6 +287,7 @@ let goods2 = [[${goods2Info}]];
|
|
|
let goods4 = [[${goods4Info}]];
|
|
let goods4 = [[${goods4Info}]];
|
|
|
let template =[[${templateOrd}]];
|
|
let template =[[${templateOrd}]];
|
|
|
let replyList = [[${replyList}]];
|
|
let replyList = [[${replyList}]];
|
|
|
|
|
+let replyCount = [[${replyCount}]];
|
|
|
let _mall = [[${@environment.getProperty('domain.front')}]];
|
|
let _mall = [[${@environment.getProperty('domain.front')}]];
|
|
|
let goodsView =[[${@environment.getProperty('upload.goods.view')}]]
|
|
let goodsView =[[${@environment.getProperty('upload.goods.view')}]]
|
|
|
let imgUrl=[[${@environment.getProperty('upload.image.view')}]];
|
|
let imgUrl=[[${@environment.getProperty('upload.image.view')}]];
|
|
@@ -753,9 +754,6 @@ var fnTextConfirm = function() {
|
|
|
var ajaxReplyList = function () {
|
|
var ajaxReplyList = function () {
|
|
|
gagaPaging.init('searchForm', fnSearchCallback, 'paging', 10);
|
|
gagaPaging.init('searchForm', fnSearchCallback, 'paging', 10);
|
|
|
gagaPaging.load(1);
|
|
gagaPaging.load(1);
|
|
|
- /* $.getJSON('/planning/reply/list?planSq='+plan.planSq, function(result, status) { */
|
|
|
|
|
-
|
|
|
|
|
- /* }); */
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
var fnSearchCallback = function (result) {
|
|
var fnSearchCallback = function (result) {
|
|
@@ -763,7 +761,7 @@ var fnSearchCallback = function (result) {
|
|
|
if (result!=null) {
|
|
if (result!=null) {
|
|
|
var html = '';
|
|
var html = '';
|
|
|
html += '<div class="cmt_list_tit">';
|
|
html += '<div class="cmt_list_tit">';
|
|
|
- html += ' <strong>댓글</strong><span class="cnt">('+result.replyList.length.addComma()+')</span>';
|
|
|
|
|
|
|
+ html += ' <strong>댓글</strong><span class="cnt">('+result.replyCount.addComma()+')</span>';
|
|
|
html += '</div>';
|
|
html += '</div>';
|
|
|
if (result.replyList.length>0) {
|
|
if (result.replyList.length>0) {
|
|
|
html += '<ul class="cmt_list">';
|
|
html += '<ul class="cmt_list">';
|
|
@@ -775,15 +773,12 @@ var fnSearchCallback = function (result) {
|
|
|
html += ' </div>';
|
|
html += ' </div>';
|
|
|
html += ' <div class="cmt_cont">';
|
|
html += ' <div class="cmt_cont">';
|
|
|
html += ' <div class="img_wrap clear">';
|
|
html += ' <div class="img_wrap clear">';
|
|
|
- html += ' <span class="pics"><img class="picsThumbs" src="/images/pc/thumb/ev_list_img01.jpg" alt="썸네일"></span>';
|
|
|
|
|
- html += ' <span class="pics"><img class="picsThumbs" src="/images/pc/thumb/ev_list_img02.jpg" alt="썸네일"></span>';
|
|
|
|
|
- html += ' <span class="pics"><img class="picsThumbs" src="/images/pc/thumb/ev_list_img03.jpg" alt="썸네일"></span>';
|
|
|
|
|
- html += ' <span class="pics"><img class="picsThumbs" src="/images/pc/thumb/ev_list_img04.jpg" alt="썸네일"></span>';
|
|
|
|
|
|
|
+ // html += ' <span class="pics"><img class="picsThumbs" src="/images/pc/thumb/ev_list_img01.jpg" alt="썸네일"></span>';
|
|
|
html += ' </div>';
|
|
html += ' </div>';
|
|
|
html += ' <p>'+item.entryVal1+'</p>';
|
|
html += ' <p>'+item.entryVal1+'</p>';
|
|
|
if (item.entryCustNo == result.custNo) {
|
|
if (item.entryCustNo == result.custNo) {
|
|
|
- html += ' <button class="btn btn_default btn_del"><span>삭제</span></button>';
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ html += ' <button class="btn btn_default btn_del" value="'+item.planEntrySq+'" onclick="fnDelReply(this.value)"><span>삭제</span></button>';
|
|
|
|
|
+ }
|
|
|
html += ' </div>';
|
|
html += ' </div>';
|
|
|
html += ' </li>';
|
|
html += ' </li>';
|
|
|
});
|
|
});
|
|
@@ -805,6 +800,23 @@ var fnSearchCallback = function (result) {
|
|
|
gagaPaging.createPagination(result.paging.pageable);
|
|
gagaPaging.createPagination(result.paging.pageable);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+// 댓글 삭제
|
|
|
|
|
+var fnDelReply = function(obj) {
|
|
|
|
|
+
|
|
|
|
|
+ data = {planEntrySq : obj};
|
|
|
|
|
+ var jsonData = JSON.stringify(data);
|
|
|
|
|
+
|
|
|
|
|
+ mcxDialog.confirm("댓글을 삭제 하시겠습니까?", {
|
|
|
|
|
+ cancelBtnText : "취소",
|
|
|
|
|
+ sureBtnText : "확인",
|
|
|
|
|
+ sureBtnClick : function() {
|
|
|
|
|
+
|
|
|
|
|
+ gagajf.ajaxJsonSubmit('/planning/reply/delete', jsonData,function() {
|
|
|
|
|
+ ajaxReplyList();
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
$('#fileAdd').on('change', function() { fnChooseFile(this); });
|
|
$('#fileAdd').on('change', function() { fnChooseFile(this); });
|
|
|
|
|
|
|
|
var fnChooseFile = function(obj,fileNo) {
|
|
var fnChooseFile = function(obj,fileNo) {
|
|
@@ -866,7 +878,8 @@ var fnReplySave = function() {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- data = {content : content};
|
|
|
|
|
|
|
+ data = {entryVal1 : content,
|
|
|
|
|
+ planSq : plan.planSq};
|
|
|
var jsonData = JSON.stringify(data);
|
|
var jsonData = JSON.stringify(data);
|
|
|
|
|
|
|
|
mcxDialog.confirm("댓글을 등록 하시겠습니까?", {
|
|
mcxDialog.confirm("댓글을 등록 하시겠습니까?", {
|
|
@@ -875,9 +888,11 @@ var fnReplySave = function() {
|
|
|
sureBtnClick : function() {
|
|
sureBtnClick : function() {
|
|
|
|
|
|
|
|
gagajf.ajaxJsonSubmit('/planning/reply/save', jsonData,function() {
|
|
gagajf.ajaxJsonSubmit('/planning/reply/save', jsonData,function() {
|
|
|
-
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ ajaxReplyList();
|
|
|
|
|
+ $('#replyText').val('');
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|