|
|
|
@ -145,7 +145,7 @@
|
|
|
|
|
<#list model['lm_vote_list'] as item>
|
|
|
|
|
<div class="vote_box" data-vtno ='${item['vt_no']!}' data-vote ='${item['vote_tp']!}' data-result ='${item['v_nt']!}'>
|
|
|
|
|
<p>${item['v_content']!}</p>
|
|
|
|
|
<div class="result">
|
|
|
|
|
<div class="result active">
|
|
|
|
|
<p>${item['v_nt']!}개</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -421,15 +421,15 @@
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$(".copy").on("click" , function(e) {
|
|
|
|
|
|
|
|
|
|
debugger;
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
var target = $("#copy");
|
|
|
|
|
target.val("${model ['rm']['title']!}");
|
|
|
|
|
target.val($(".cont_txt").text());
|
|
|
|
|
var urlbox = document.getElementById( 'copy' );
|
|
|
|
|
urlbox.select();
|
|
|
|
|
document.execCommand('copy');
|
|
|
|
|
$("#shared").removeClass("open");
|
|
|
|
|
Swal.fire({text:"댓글 이 복사 되었습니다."});
|
|
|
|
|
Swal.fire({text:"게시글이 복사 되었습니다."});
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
@ -459,41 +459,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(".vote_box").on("click", function() {
|
|
|
|
|
|
|
|
|
|
$(".result").toggleClass("active")
|
|
|
|
|
$(".result").children(".result_img").remove();
|
|
|
|
|
$(this).children(".result").append(
|
|
|
|
|
"<img class='result_img' src='${URL_ROOT}/m/img/community/check_icon.png'>"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
if( this.dataset.vote ==0){
|
|
|
|
|
var data = {
|
|
|
|
|
var data = {
|
|
|
|
|
bd_no : ${model ['rm']['bd_no']!}
|
|
|
|
|
,vt_no : this.dataset.vtno
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
this.dataset.result = Number(this.dataset.result) +1;
|
|
|
|
|
this.children[1].innerText = this.dataset.result +"개";
|
|
|
|
|
$(".vote_box").each( function(idx,ele) {
|
|
|
|
|
ele.dataset.vote = Number(ele.dataset.vote) +1;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
url:'${URL_ROOT}/m/bf_board/ajax_insert_bf_board_vote.do?1=1',
|
|
|
|
|
type:'post',
|
|
|
|
|
data: data,
|
|
|
|
|
dataType:'json',
|
|
|
|
|
error:function(request,status,error){
|
|
|
|
|
Swal.fire({text:"등록되지 않았습니다"});
|
|
|
|
|
},
|
|
|
|
|
success:function(result){
|
|
|
|
|
Swal.fire({text:"처리 되었습니다"}) ;
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
Swal.fire({text:"이미 투표를 하였습니다."});
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
Swal.fire({
|
|
|
|
|
text: "투표 하시겠습니까? 투표하시면 취소할 수 없습니다.",
|
|
|
|
|
showCancelButton: true,
|
|
|
|
|
confirmButtonText: '네',
|
|
|
|
|
cancelButtonText: '취소'
|
|
|
|
|
}).then((result) => {
|
|
|
|
|
if(result.value){
|
|
|
|
|
this.dataset.result = Number(this.dataset.result) +1;
|
|
|
|
|
this.children[1].innerText = this.dataset.result +"개";
|
|
|
|
|
$(".vote_box").each( function(idx,ele) {
|
|
|
|
|
ele.dataset.vote = Number(ele.dataset.vote) +1;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
url:'${URL_ROOT}/m/bf_board/ajax_insert_bf_board_vote.do?1=1',
|
|
|
|
|
type:'post',
|
|
|
|
|
data: data,
|
|
|
|
|
dataType:'json',
|
|
|
|
|
error:function(request,status,error){
|
|
|
|
|
Swal.fire({text:"투표되지 않았습니다"});
|
|
|
|
|
},
|
|
|
|
|
success:function(result){
|
|
|
|
|
Swal.fire({text:"투표처리 되었습니다"}) ;
|
|
|
|
|
$(".result").toggleClass("active")
|
|
|
|
|
$(".result").children(".result_img").remove();
|
|
|
|
|
$(this).children(".result").append(
|
|
|
|
|
"<img class='result_img' src='${URL_ROOT}/m/img/community/check_icon.png'>"
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}else {
|
|
|
|
|
Swal.fire({text:"이미 투표를 하였습니다."});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
var swiper = new Swiper('.swiper-container', {
|
|
|
|
|
spaceBetween: 20,
|
|
|
|
@ -719,7 +727,7 @@
|
|
|
|
|
var urlbox = document.getElementById( 'copy' );
|
|
|
|
|
urlbox.select();
|
|
|
|
|
document.execCommand('copy');
|
|
|
|
|
Swal.fire({text:"댓글 이 복사 되었습니다."});
|
|
|
|
|
Swal.fire({text:"댓글이 복사 되었습니다."});
|
|
|
|
|
$("#option2").removeClass("open");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
@ -773,7 +781,7 @@
|
|
|
|
|
$(".btn_reply").on("click", function() {
|
|
|
|
|
$(".comment_input_cont").show();
|
|
|
|
|
var nickName = this.parentNode.parentNode.childNodes[1].textContent;
|
|
|
|
|
$(".reply_to").text(nickName+'에게 답글을 쓰는중...');
|
|
|
|
|
$(".reply_to").text(nickName+'에게 댓(답)글을 쓰는중...');
|
|
|
|
|
$(".reply_cont").addClass("active");
|
|
|
|
|
$reply_new_yn ="Y";
|
|
|
|
|
$ct_no = this.dataset.ct_no;
|
|
|
|
|