Files
sake/src/main/webapp/WEB-INF/views/sopmal/csc/BbscttDtlR.jsp
2026-07-18 12:02:52 +09:00

1298 lines
65 KiB
Plaintext

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="ui" uri="http://www.winbit.kr/ctl/ui" %>
<%@ taglib prefix="f" uri="/WEB-INF/tlds/f.tld" %>
<%--
Class Name : BbscttDtlR.jsp
Description : 게시판상세페이지
Modification Information
수정일 수정자 수정내용
------- -------- ---------------------------
2024-04-25 김혜인 최초 생성
--%>
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<%-- 공통 include --%>
<jsp:include page="/WEB-INF/views/comm/Include.jsp"/>
<style>
.relate-goods-grid {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: 20px;
}
</style>
</head>
<script>
$(document).ready(function () {
if ('scrollRestoration' in history) {
history.scrollRestoration = 'manual';
}
$(window).scrollTop(0);
//게시글 내용 ajax
fn_select_cn();
//게시글 추천
$(".postLikeBtn--like").on("click", function () {
const recomendDv = 'recommend'
fn_update_bbsctt_recomend(recomendDv);
});
//게시글 비추천
$( ".postLikeBtn--dislike").on("click",function () {
const recomendDv = 'nonrecommend'
fn_update_bbsctt_recomend(recomendDv);
});
//게시글 삭제 모달 호출
$("#delBtn").on("click", function () {
fn_select_crud_posbl_at($("#bbscttInnb").val(), '', '', 'D');
});
//게시글 삭제
$("#alertDelBtn").on("click", function () {
fn_delete_bbsctt();
});
//게시글 수정
$("#moveUpdtBtn").on("click", function () {
fn_select_crud_posbl_at($("#bbscttInnb").val(), '', '', 'U');
});
//이전글 다음글 조회
$("#nextBtn").on("click", function () {
const bbscttInnb = $(this).val();
fn_select_crud_posbl_at(bbscttInnb, '', '', 'R');
});
$("#prevBtn").on("click", function () {
const bbscttInnb = $(this).val();
fn_select_crud_posbl_at(bbscttInnb, '', '', 'R');
});
//제목 html 태그 적용
$(".sj").each(function(idx1){
let isfiles = $(this).attr("is-files") === 'Y' ? `<i class="icon icon_image-badge"></i>` : '';
let newAt = $(this).attr("new-at") === 'Y' ? `<i class="icon icon_new-post"></i>` : '';
let popularAt = $(this).attr("popular-at") === 'Y' ? `<i class="icon icon_hot-post"></i>` : '';
let secretAt = $(this).attr("secret-at") === 'Y' ? `<i class="icon icon_lock"></i>` : '';
let cmCnt = $(this).attr("cm-cnt") > 0 ? `($(this).attr("cm-cnt"))` : '';
let sj = $(this).text();
let resultSj = sj+isfiles+newAt+popularAt+secretAt+cmCnt;
$(".sj").eq(idx1).html(resultSj);
});
/*목록이동버튼*/
$("#moveListBtn").on("click", function () {
fn_move_list();
});
//비밀번호 확인
$("#pwChkBtn").on("click", function () {
const reqAction = $("#reqAction").val();
if (reqAction.indexOf("CM") > 0) {
fn_check_password();
}else {//게시글 비밀번호 체크
fn_check_bbscttPassword();
}
});
/*비밀번호 입력안할시 초기화*/
$("#pwCancelBtn").on("click",function(){
$("#modalPw").val("");
});
/*댓글 조회 댓글 허용 이벤트인지 확인해야함*/
const cmAt = '<c:out value = '${resultMap.bbscttInfo.dataMap.cmUseAt}'/>';
if (cmAt === 'Y') {
fn_make_cm();
fn_collect_cm_event();
}
//메인사이트 고유번호 설정 위한 시간차 둠
setTimeout(function() {
fn_set_evt_goods_page();
}, 800);
});
/**********************************************************************************************************
* 상세 서비스 시작
**********************************************************************************************************/
//메인화면 컨텐츠 가져오기
const fn_set_evt_goods_page = function () {
const innb = $("#evtGoodsPage").attr("innb");
if (!fn_is_empty($("#evtGoodsPage").attr("innb"))) { //메인화면 호출시
$.ajax({
type: 'get',
url: '/index',
data: {
mainSiteInnb: innb,
evtPageAt: "Y"
},
success: function (data) {
$("#evtGoodsPage").html(data);
}
});
} else { //메인화면 호출 안할 시
// 상품 - 4열 슬라이드 타입 (이벤트 추천 상품 슬릭 이벤트)
$('.relate-goods-slick').slick({
slidesToShow: 4,
slidesToScroll: 4,
speed: 900,
infinite: true,
prevArrow: $('.relate-goods-slick__prev'),
nextArrow: $('.relate-goods-slick__next'),
});
}
}
/*********************************************************
* 게시글 내용 조회
*********************************************************/
const fn_select_cn = function () {
let bbscttInnb = $("#bbscttInnb").val();
let bbsId = $("#bbsId").val();
let sopmalCd = $("#sopmalCd").val();
$.ajax({
type: "post",
url: "<c:url value ='/sopmal/csc/selectBbscttCn'/>",
contentType: 'application/json',
data: JSON.stringify({
bbsId: bbsId,
bbscttInnb: bbscttInnb,
sopmalCd: sopmalCd
}),
success: function (data) {
console.log(data);
let cn = JSON.parse(data.resBody.result);
$("#cnDiv").html(cn.cn);
if ($("#regusrDvCd").val() === '01' || $("#regusrDvCd").val() === '99') {
$("#cnDiv").css("white-space", "pre-wrap");
}
$("#cnDiv").addClass("ck-content");
}
});
}
/*********************************************************
* 게시글 상세 이벤트 함수 모음
**********************************************************/
/*게시글 crud 가능 판단*/
const fn_select_crud_posbl_at = (bbsctt, idx, pwCnfirmAt, crudDv) => {
$.ajax({
type: 'post',
url: '<c:url value="/sopmal/csc/selectBbscttDtlMovePosblAt"/>',
data: {
"bbscttInnb": bbsctt,
"bbsId": $("#bbsId").val(),
"pwCnfirmAt": pwCnfirmAt,
"crudDv": crudDv
},
success: function (data) {
data = JSON.parse(data.resBody.result);
fn_branch_bbsctt_posble(data, crudDv);
}
});
}
//상세보기 가능 판단 여부에 따른 분기 처리
const fn_branch_bbsctt_posble = (data,actDv) => {
const moveAt = data.result.moveAt;
const vo = data.vo;
if (moveAt === 'YES' || vo.pwCnfirmAt === 'Y') {//본인 o
if(actDv == 'U'){ //수정
fn_move_updtForm();
}else if (actDv == 'D'){//삭제
$("#bbsctt_delete_pop").modal();
}else if (actDv == 'R_CM'){//댓글 조회
fn_select_secret_cn(vo.cmIdx,'cmCn',data);
}else if (actDv == 'R_ANSW_CM'){//대댓글 조회
fn_select_secret_cn(vo.cmIdx,'cmcmCn',data);
}else if (actDv == 'U_CM'){//댓글 수정
fn_change_updtMode(data, vo.cmIdx);
}else if (actDv == 'U_ANSW_CM'){//대댓글 수정
fn_change_updtMode(data, vo.cmIdx,'Y');
}else if (actDv == 'D_CM'){//댓글 삭제
fn_delete_cm(vo.cmInnb);
}else{//이전글,다음글 조회
fn_submit_this(vo.bbscttInnb);
}
} else if (moveAt === 'OTHER') {//다른이용자 o
$("#comment-update-pop").modal();
} else if (moveAt === 'LOGIN') {//로그인 o
$("#login_alert_pop").modal();
} else {//비밀번호
$("#confirm_pw_pop").modal();
$("#modalBbscttInnb").val(vo.bbscttInnb);
if(actDv.indexOf("CM") > 0){
$("#modalCmInnb").val(vo.cmInnb);
$("#modalIdx").val(vo.cmIdx);
}
$("#reqAction").val(actDv);
$("#modalCrudDv").val(vo.crudDv);
}
}
/********************************************************************
* 비밀번호 확인 (조회)
********************************************************************/
const fn_check_bbscttPassword = () => {
const password = $("#modalPw").val();
if (password === '') {
alert("비밀번호를 입력해주세요");
} else {
$.ajax({
type: 'post',
url: '<c:url value="/sopmal/csc/selectBbscttComparPassword"/>',
data: {
"bbscttInnb": $("#modalBbscttInnb").val(),
"password": password
},
success: function (data) {
const result = JSON.parse(data.resBody.result);
/*비밀번호 확인 결과*/
const resultVal = result["pw"];
if (resultVal > 0) {
$("#pwCancelBtn").click();
fn_select_crud_posbl_at($("#modalBbscttInnb").val(),'', 'Y',$("#modalCrudDv").val());
} else {
alert("비밀번호가 일치하지 않습니다.");
}
$("#modalPw").val("");
}
});
}
}
/*********************************************************
*목록 이동
*********************************************************/
const fn_move_list = () => {
let form = $("#hiddenForm");
const reqUrl = $("#reqUrl").val();
if (reqUrl === 'csc') {
form.attr("action", "/sopmal/csc/selectCscListForm");
} else if (reqUrl === 'subPage' || reqUrl === 'detail') {
form.attr("action", "/sopmal/csc/selectSubPageListForm");
}
form.attr("method", "POST");
form.submit();
}
/*********************************************************
*이전글 다음글 조회
*********************************************************/
const fn_submit_this = (bbscttInnb) => {
let form = $("#hiddenForm");
form.attr("action", "/sopmal/csc/selectBbscttDtlInqire");
form.attr("method", "POST");
// 게시글 고유번호
$("#bbscttInnb").val(bbscttInnb);
form.submit();
}
/*********************************************************
*게시글 추천,비추천
*********************************************************/
const fn_update_bbsctt_recomend = (recomendDv) => {
const bbscttInnb = $("#bbscttInnb").val();
$.ajax({
type: 'post',
url: '<c:url value="/sopmal/csc/updateBbscttRecomendUpdt"/>',
data: {
"bbscttInnb": bbscttInnb,
"recomendDv": recomendDv
},
success: function (data) {
result = JSON.parse(data.resBody.result);
const resultContent = result["result"];
$("#bbscttRecomendCnt").text(resultContent.recomendCnt);
$("#bbscttNonrecomendCnt").text(resultContent.nonrecomendCnt);
}
});
}
/*********************************************************
* 게시글 삭제
*********************************************************/
const fn_delete_bbsctt = function () {
const bbscttInnb = $("#bbscttInnb").val();
const bbsId = $("#bbsId").val();
if (!confirm('게시글을 <spring:message code="confirm.common.delete"/>')) return;
$.ajax({
type: 'post',
url: '<c:url value="/sopmal/csc/deleteBbscttDel"/>',
data: {
"delBbscttInnbArr": bbscttInnb,
"bbsId": bbsId
},
dataType: "json",
success: function (data) {
alert('<spring:message code="success.common.delete"/>');
fn_move_list();
}
});
}
/*********************************************************
* 게시글 수정폼 이동
*********************************************************/
const fn_move_updtForm = () => {
let form = $("#hiddenForm");
form.attr("action", "/sopmal/csc/selectBbscttUpdtForm");
form.attr("method", "POST");
form.submit();
}
/**********************************************************************************************************
* 댓글 서비스 시작
**********************************************************************************************************/
/*********************************************************
* 댓글 이벤트 함수 모음
**********************************************************/
const fn_collect_cm_event = () => {
// 답글 토글
$(document).on("click", ".comment-body__reply-button", function () {
$(this).closest(".comment-body__item").find(".comment-body__nested-container").toggleClass("opened");
});
//답글 접기
$(document).on("click", ".comment-body__nested-container .close", function () {
$(this).closest(".comment-body__nested-container").removeClass("opened");
});
/*댓글 권한 로그인 모달 호출 버튼*/
$(document).on("click","#rejectAuthCmBtn", function () {
const mbrInnb = '<c:out value="${resultMap.bbsctt.regusr}"/>';
if(parseInt(mbrInnb) === 0){ //비회원일경우 로그인 유도
$("#login_alert_pop").modal();
}else{//회원일경우 권한 없음
$("#reject_auth_pop").modal();
}
});
//댓글 수정 버튼
$(document).on("click", ".cmUpdtBtn", function () {
const cmInnb = $(this).val();
const idx = $(this).closest(".mainCmContent").index(".mainCmContent");
fn_select_cm_regusr_cnfirm(cmInnb, idx, 'U_CM','U');
});
//댓글 수정 버튼
$(document).on("click", ".cmcmUpdtBtn", function () {
const cmInnb = $(this).val();
const idx = $(this).closest(".mainCmContent").index(".mainCmContent");
fn_select_cm_regusr_cnfirm(cmInnb, idx, 'U_ANSW_CM','U');
});
//비밀 댓글 조회
$(document).on("click",".secretCm",function (){
//타겟 인덱스 찾기
const idx = $(this).closest(".cmCn").index(".cmCn");
//해당 댓글 고유번호 값
const cmInnb = $(this).val();
fn_select_cm_regusr_cnfirm(cmInnb, idx, 'R_CM','R');
});
//비밀 대댓글 조회
$(document).on("click",".secretCmCm",function (){
//타겟 인덱스 찾기
const idx = $(this).parent().index(".cmcmCn");
//해당 댓글 고유번호 값
const cmInnb = $(this).val();
fn_select_cm_regusr_cnfirm(cmInnb, idx, 'R_ANSW_CM','R');
});
//댓글 등록
$("#btnCmReg").on("click", function () {
fn_regist_cm('c', this);
});
//댓글 수정
$(document).on("click", ".updtBtn", function () {
fn_regist_cm('u', this);
});
//대댓글 등록
$(document).on("click", ".reCreBtn", function () {
fn_regist_cm('rec', this, 'Y');
});
//대댓글 수정
$(document).on("click", ".reUpdtBtn", function () {
fn_regist_cm('reu', this, 'Y');
});
//댓글,대댓글 삭제
$(document).on("click", ".cmDelBtn", function () {
//댓글 고유번호
let cmInnb = $(this).val();
fn_select_cm_regusr_cnfirm(cmInnb, '', 'D_CM','D');
});
//댓글 추천
$(document).on("click", ".comment-like__btn--like", function () {
let target = $(this);
const cmInnb = target.val();
const bbscttInnb = $("#bbscttInnb").val();
const recomendDv = 'recommend'
fn_update_recomend(cmInnb, bbscttInnb, recomendDv, target);
});
//댓글 비추천
$(document).on("click", ".comment-like__btn--dislike", function () {
let target = $(this);
const cmInnb = target.val();
const bbscttInnb = $("#bbscttInnb").val();
const recomendDv = 'nonrecommend'
fn_update_recomend(cmInnb, bbscttInnb, recomendDv, target);
});
}
/*********************************************************
* 댓글 jsp 호출 (조회)
*********************************************************/
const fn_make_cm = (pageIndex, targetIdx) => {
const bbscttInnb = $("#bbscttInnb").val();
const bbsId = $("#bbsId").val();
const regusrDvCd = $("#regusrDvCd").val();
if (!pageIndex) {
$('#pageIndex').val(1);
} else {
$('#pageIndex').val(pageIndex);
}
$.ajax({
type: 'post',
url: '<c:url value="/sopmal/csc/selectCmList"/>',
data: {
"bbscttInnb": bbscttInnb,
"bbsId": bbsId,
"regusrDvCd": regusrDvCd,
"pageIndex": pageIndex,
"slangFlterUseAt" : $("#slangFlterUseAt").val(),
"authResult" : '<c:out value="${resultMap.bbsctt.authResult}"/>'
},
success: function (result) {
$(".comment-body__area").html(result);
$("#cmCnt").text($("#cmCntInfo").val());
//댓글 - 대댓글 건수 set
const comment = $(".cmInnb");
comment.each(function () {
let commentCnt = $(this).closest(".comment-body__nested-container").find(".commentDiv").length;
$(this).closest(".comment-body__nested-container").prev(".comment-body__reply-container").find(".commentCnt").text(commentCnt);
});
if (targetIdx !== undefined) {
$(".comment-body__nested-container").eq(targetIdx).addClass("opened");
}
}
});
}
/********************************************************************
* 댓글 비밀번호 확인
********************************************************************/
const fn_check_password = () => {
const password = $("#modalPw").val();
if (password === '' || password === undefined) {
alert("비밀번호를 입력해주세요");
} else {
$.ajax({
type: 'post',
url: '<c:url value="/sopmal/csc/selectComparPassword"/>',
data: {
"cmInnb": $("#modalCmInnb").val(),
"password": password
},
success: function (data) {
const result = JSON.parse(data.resBody.result);
/*비밀번호 확인 결과*/
const resultVal = result["pw"];
if (resultVal > 0) {
$("#pwCancelBtn").click();
fn_select_cm_regusr_cnfirm($("#modalCmInnb").val(),$("#modalIdx").val(),$("#reqAction").val(),'Y');
} else {
alert("비밀번호가 일치하지 않습니다.");
}
/*모달 내 값 초기화*/
$("#modalPw").val("");
}
});
}
}
/*******************************
* 비밀 댓글 조회
*********************************/
const fn_select_secret_cn = (cmIdx, cmDv, data) => {
data = data.dtl;
$("."+cmDv).eq(cmIdx).css("white-space","pre-wrap");
$("."+cmDv).eq(cmIdx).html(data.cn);
}
/*********************************************************
* 비밀 댓글 조회
*********************************************************/
const fn_select_cm_regusr_cnfirm = (cmInnb, idx, actDv, pwCnfirmAt,crudDv) => {
const bbscttInnb = $("#bbscttInnb").val();
$.ajax({
type: 'post',
url: '<c:url value="/sopmal/csc/selectCmRegusrCnfirm"/>',
data: {
"bbscttInnb": bbscttInnb,
"cmInnb": cmInnb,
"cmIdx" : idx,
"pwCnfirmAt":pwCnfirmAt,
"crudDv" : crudDv
},
success: function (data) {
data = JSON.parse(data.resBody.result);
fn_branch_bbsctt_posble(data, actDv,crudDv);
}
});
};
/*********************************************************
* 댓글 수정모드 전환 : 조회된 값 수정폼에 값 세팅
*********************************************************/
const fn_change_updtMode = (data, idx, reDiv) => {
data = data.dtl;
//댓글 수정
if (reDiv !== 'Y') {
const target = $(".mainCmContent").eq(idx).find(".comment-body__content").find(".comment-edit");
target.empty();
let passwordAt = '';
if (data.password !== '') {
passwordAt = 'Y';
}
let updtHtml = `<div class="comment-edit__textarea-container">
<textarea class="comment-edit__textarea" rows="5" placeholder="댓글을 입력하세요." name = "cn"
title="댓글 입력">\${data.cn}\</textarea>
</div>
<div class="comment-edit__btnContainer">
<button class="comment-edit__button comment-edit__button--edit updtBtn" value="\${data.cmInnb}\">수정</button>
<button class="comment-edit__button comment-edit__button--remove cmDelBtn" value = "\${data.cmInnb}\">삭제</button>
</div>`;
target.html(updtHtml);
} else { //대댓글 수정
const target = $(".mainCmContent").eq(idx).find(".comment-body__nested-container").find(".comment-write");
target.find("textarea[name='cn']").val(data.cn);
target.find("input[name='regusrNm']").val(data.regusrNm);
if (data.secretBbscttAt === 'Y') {
target.find("input[name='secretBbscttAt']").prop("checked", true);
}else{
target.find("input[name='secretBbscttAt']").prop("checked", false);
}
const targetEle = $(".mainCmContent").eq(idx).find(".comment-body__nested-container").find(".reCreBtn");
targetEle.text("<spring:message code="button.update"/>");
targetEle.addClass("reUpdtBtn");
targetEle.val(data.cmInnb);
targetEle.removeClass("reCreBtn");
$(".mainCmContent").eq(idx).find(".comment-body__nested-container").find(".password").hide();
}
}
/*********************************************************
* 댓글 등록,수정
*********************************************************/
const fn_regist_cm = function (cmDiv, target, opendAt) {
let url = '<c:url value="/sopmal/csc/insertBbscttCmRegist"/>';
//댓글 등록, 수정 구분
if (cmDiv == 'u' || cmDiv == 'reu') {
if (!confirm('댓글을 <spring:message code="confirm.common.update"/>')) return;
url = '<c:url value="/sopmal/csc/updateBbscttCmUpdt"/>';
} else {
if (!confirm('댓글을 <spring:message code="confirm.common.insert"/>')) return;
}
//submit
let formData = new FormData();
let bbscttInnb = $('#bbscttInnb').val();
let bbsId = $('#bbsId').val();
let setupInfoInnb = $('#setupInfoInnb').val();
let regusrDvCd = $('#regusrDvCd').val();
let cn = '';
let secretBbscttAt = '';
let cmInnb = '';
let regusrNm = '';
let password = '';
//수정
if (cmDiv == 'u') {
cmInnb = $(target).val();
cn = $(target).closest(".comment-edit").find(".comment-edit__textarea-container").find("[name='cn']").val();
secretBbscttAt = $(target).closest(".comment-edit").siblings(".dtlCmDiv").find("input[name='secretBbscttAt']").val();
regusrNm = 'tempNm';//validation
} //등록
else if (cmDiv == 'c') {
cn = $("#cmInputCn").val();
if ($("#secretChk").is(":checked")) {
secretBbscttAt = 'Y';
} else {
secretBbscttAt = 'N'
}
regusrNm = $("#cmInputNm").val();
password = $("#cmInputPw").val();
if (password === undefined) {
password = '';
}
}
//대댓글 등록
else if (cmDiv == 'rec' || cmDiv == 'reu') {
cmInnb = $(target).val();
cn = $(target).closest(".comment-write").find("textarea[name='cn']").val();
regusrNm = $(target).next(".comment-write__bottom").find(".comment-write__info-item").find("input[name='regusrNm']").val();
password = $(target).next(".comment-write__bottom").find(".comment-write__info-item").find("input[name='password']").val();
if (cmDiv == 'rec') {
if (password === undefined) {
password = '';
}
}
secretChk = $(target).closest(".comment-write").find("input[name='secretBbscttAt']");
if (secretChk.is(":checked")) {
secretBbscttAt = secretChk.val();
} else {
secretBbscttAt = 'N'
}
}
//대댓글 수정
else if (cmDiv == 'reu') {
cmInnb = $(target).val();
cn = $(target).closest(".comment-write").find("textarea[name='cn']").val();
}
formData.append('bbscttInnb', bbscttInnb);
formData.append('bbsId', bbsId);
formData.append('cn', cn);
formData.append('secretBbscttAt', secretBbscttAt);
formData.append('regusrNm', regusrNm);
formData.append('password', password);
formData.append('regusrDvCd', regusrDvCd);
formData.append('setupInfoInnb', setupInfoInnb);
if (cmDiv == 'u' || cmDiv == 'rec' || cmDiv == 'reu') {
formData.append('cmInnb', cmInnb);
}
$.ajax({
type: 'post',
url: url,
data: formData,
processData: false,
contentType: false,
success: function (data) {
if (cmDiv == 'u') {
alert('<spring:message code="success.common.update"/>');
} else {
alert('<spring:message code="success.common.insert"/>');
}
//내용 초기화
$(target).closest(".comment-write").find(".cmInputCn").find('[name=cn]').val('');
$(target).closest(".comment-write").find('.cmInputNm').find('[name=regusrNm]').val('');
$(target).closest(".comment-write").find('.cmInputPw').find('[name=password]').val('');
$(target).closest(".comment-write").find('.secretBbscttAt').find('[name=secretBbscttAt]').prop('checked', false);
$("#cmInputCn").val("");
$("#cm").empty();
if (opendAt === 'Y') {
fn_make_cm(1, $(target).closest(".comment-body__nested-container").index(".comment-body__nested-container"));
} else {
fn_make_cm(1);
}
}
});
}
/*********************************************************
* 댓글 삭제
*********************************************************/
const fn_delete_cm = function (cmInnb) {
const bbscttInnb = $("#bbscttInnb").val();
const bbsId = $("#bbsId").val();
if (confirm('댓글을 <spring:message code="confirm.common.delete"/>')){
$.ajax({
type: 'post',
url: '<c:url value="/sopmal/csc/deleteBbscttCmDel"/>',
data: {
"delCmInnbArr": cmInnb,
"bbscttInnb": bbscttInnb,
"bbsId": bbsId
},
dataType: "json",
success: function (data) {
alert('<spring:message code="success.common.delete"/>');
fn_make_cm(1);
}
});
}
}
//회원이 아닐 경우 모달
const fn_wish_modal = () => {
const modal = `<div id="wishModalDiv" class="modal alert">
<div class="alert-content">
<p class="alert-content__text--sm">
회원만 사용가능합니다. 로그인하시겠습니까?
</p>
</div>
<div class="alert-btn-container">
<a href="javascript:void(0);" onclick="fn_move_goodsDtl_login();" rel="modal:close" class="alert-btn alert-btn--confirm">예</a>
<a href="javascript:void(0);" rel="modal:close" class="alert-btn alert-btn--confirm">아니오</a>
</div>
</div>`;
//장바구니 담은 후 페이지 이동 여부 모달
$('#wishModalDiv').remove()
$('#wishDiv').html(modal)
$('#wishModalDiv').modal()
}
// 로그인이동
const fn_move_goodsDtl_login = () => {
const hiddenFormLogin = document.createElement('form');
hiddenFormLogin.name = 'hiddenFormLogin';
hiddenFormLogin.id = 'hiddenFormLogin';
const currentUrlInput = document.createElement('input');
currentUrlInput.type = 'hidden';
currentUrlInput.name = 'currentUrl';
currentUrlInput.value = window.location.href; // 현재 URL 추가
hiddenFormLogin.appendChild(currentUrlInput);
hiddenFormLogin.method = 'post';
hiddenFormLogin.action = '/sopmal/mbr/selectUsrLoginForm';
const formData = new FormData();
document.body.appendChild(hiddenFormLogin);
$(hiddenFormLogin).submit();
$(hiddenFormLogin).remove();
}
/*********************************************************
* 댓글 평가
추천,비추천
cmInnb : 댓글 고유번호,
bbscttInnb : 게시글 고유번호
recomendDv : 평가 구분 ('recommend' or 'nonRecommend')
*********************************************************/
const fn_update_recomend = (cmInnb, bbscttInnb, recomendDv, target) => {
$.ajax({
type: 'post',
url: '<c:url value="/sopmal/csc/updateCmRecomendUpdt"/>',
data: {
"cmInnb": cmInnb,
"bbscttInnb": bbscttInnb,
"recomendDv": recomendDv
},
success: function (data) {
const result = JSON.parse(data.resBody.result);
const resultContent = result["result"];
target.closest(".comment-like").find(".recomendCnt").text(resultContent.recomendCnt);
target.closest(".comment-like").find(".nonrecomendCnt").text(resultContent.nonrecomendCnt);
}
});
}
</script>
<body>
<%-- 공통 Header --%>
<jsp:include page="/WEB-INF/views/comm/Header.jsp"/>
<!-- 메인 컨텐츠 영역 -->
<main>
<%--게시글 정보--%>
<c:set value="${resultMap.bbscttInfo.dataMap}" var="bbscttInfo"/>
<%--추가문항답변--%>
<c:set value = "${resultMap.bbscttInfo.qesitmAnswList}" var = "qesitmAnswList"/>
<%--vo--%>
<c:set value="${resultMap.bbsctt}" var="bbscttVO"/>
<%--게시판 설정 --%>
<c:set value="${resultMap.bbsInfo}" var="bbsInfo"/>
<%--게시글 연관상품--%>
<c:set value="${resultMap.goodsList.goodsList}" var="goodsList"/>
<%--게시글 파일정보--%>
<c:set value="${resultMap.bbscttInfo.fileInfo}" var="fileInfo"/>
<%--게시글 스크립트 첨부--%>
<c:out value="${bbscttInfo.cnScript}" escapeXml="false"/>
<div class="sub-wrapper">
<div class="sub-content">
<div class="page-title center">
<h2 class="page-title__title"><c:out value="${bbsInfo.bbsNm}"/></h2>
</div>
<div class="eventDetail">
<input type="hidden" id="mbrInnb" value="${resultMap.bbsctt.regusr}">
<div class="eventDetail__top">
<h4 class="eventDetail__title">
<c:choose>
<c:when test = "${bbscttInfo.regusrDvCd eq '02'}">
<c:out value ="${bbscttInfo.sj}" escapeXml="false"/>
</c:when>
<c:otherwise>
<c:out value ="${bbscttInfo.sj}"/>
</c:otherwise>
</c:choose>
<c:if test="${bbscttInfo.isfiles eq 1}"><%--첨부파일여부--%>
<i class="icon icon_image-badge"></i>
</c:if>
<c:if test="${bbscttInfo.newAt eq 'Y'}"><%--새로운게시글여부--%>
<i class="icon icon_new-post"></i>
</c:if>
<c:if test="${bbscttInfo.popularAt eq 'Y'}"><%--인기게시글여부--%>
<i class="icon icon_hot-post"></i>
</c:if>
<c:if test="${ bbscttInfo.secretBbscttAt eq 'Y' }"><%--비밀글여부--%>
<i class="icon icon_lock"></i>
</c:if>
</h4>
<p class="eventDetail__date"><c:out value="${bbscttInfo.sumRegistDt}"/></p>
</div>
<%-------------------------------%>
<%--첨부 파일 다운로드 영역--%>
<c:if test = "${not empty fileInfo}">
<div class="file_attachments">
<div class="file_attachments_inner">
<p class="file_attachments__title">첨부파일</p>
<ul class="file_list">
<c:forEach var = "file" items = "${fileInfo}">
<li class="file_item image">
<div class="task">
<a class="button_svg_download"
onclick="linkDownloadFile('<c:out value ="${file.bbscttAtchmnfilInnb}"/>',
'<c:out value="${file.orginlFilNm}"/>',
'<c:out value="${file.sopmalCd}"/>',
'BDFL',
1)">
<span class="visually-hidden">다운로드</span>
</a>
</div>
<a class="file_link" href="#" onclick="linkDownloadFile(
'<c:out value="${file.bbscttAtchmnfilInnb}"/>',
'<c:out value="${file.orginlFilNm}"/>',
'<c:out value="${file.sopmalCd}"/>',
'BDFL',
1)">
<div class="file_info_area">
<div class="file_title_wrap">
<strong class="file_title">
<span class="text"><c:out
value="${file.orginlFilNm}"/>&nbsp;</span>
</strong>
<span class="file_volume">(<c:out
value="${file.filMg}"/>KB)</span>
</div>
</div>
</a>
</li>
</c:forEach>
</ul>
</div>
</div>
</c:if>
<%--게시글 내용 영역--%>
<c:if test="${not empty qesitmAnswList}"> <%--2문항 답변 출력시 다음 tr에 문항 답변 출력--%>
<c:forEach items="${qesitmAnswList}" var="answ" varStatus="status">
<c:out value="${answ.qesitmNm}"/>:
<c:choose>
<c:when test="${not empty answ.answCn}">
<c:out value="${answ.answCn}"/>
</c:when>
<c:otherwise>
(없음)
</c:otherwise>
</c:choose>
<br>
</c:forEach>
</c:if><br>
<div id="cnDiv" class="eventDetail__image ck-content">
</div>
<%-------------------------------%>
<%--답변 영역--%>
<c:if test="${bbsInfo.answRegist eq 'Y'}">
<div class="postAnswer" style="margin-top:30px;">
<div class="postAnswer__top">
<span class="postAnswer__badge">답변</span>
<span class="postAnswer__admin"><c:out value="${bbsInfo.mngrNm}"/></span>
</div>
<c:choose>
<c:when test = "${not empty bbscttInfo.answBbscttInnb}">
<p class="postAnswer__title">
<c:out value="${bbscttInfo.answSj}" escapeXml="false"/></p>
<p class="postAnswer__text">
<c:out value="${bbscttInfo.answCn}" escapeXml="false"/>
</p>
</c:when>
<c:otherwise>
<p class="postAnswer__text">답변 등록 중입니다.</p>
</c:otherwise>
</c:choose>
</div>
</c:if>
<%-------------------------------%>
<%--게시글 평가 영역--%>
<c:if test="${bbsInfo.bbscttEvlUseAt eq 'Y'}">
<div class="sub-bottom-btn-container">
<button class="postLikeBtn postLikeBtn--like">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"
fill="none">
<path
d="M14.7749 16.583H5.6756V7.41637L11.3711 1.75293L11.7012 1.8747C11.9266 2.03069 12.0992 2.22513 12.2188 2.45803C12.3385 2.69094 12.3705 2.93292 12.315 3.18399L12.2941 3.20803L11.5345 7.41637H17.2429C17.6115 7.41637 17.9269 7.54751 18.1892 7.8098C18.4515 8.07208 18.5826 8.38752 18.5826 8.75612V9.62308C18.5826 9.72351 18.5749 9.81351 18.5594 9.8931C18.5439 9.97269 18.5153 10.0558 18.4736 10.1423L16.1052 15.7185C15.9865 15.9829 15.8075 16.193 15.5682 16.349C15.3289 16.505 15.0645 16.583 14.7749 16.583ZM6.75891 15.4997H14.7749C14.8337 15.4997 14.8938 15.4837 14.9552 15.4516C15.0167 15.4195 15.0634 15.3661 15.0955 15.2913L17.4993 9.68718V8.75612C17.4993 8.68133 17.4753 8.61989 17.4272 8.5718C17.3791 8.52372 17.3177 8.49968 17.2429 8.49968H10.2461L11.1868 3.4532L6.75891 7.86508V15.4997ZM5.6756 7.41637V8.49968H2.49931V15.4997H5.6756V16.583H1.41602V7.41637H5.6756Z"
fill="black"></path>
</svg>
<span class="postLikeBtn__text">
추천 <em id="bbscttRecomendCnt"><c:out value="${bbscttInfo.recomendCnt}"/></em>
</span>
</button>
<%--게시판설정(게시글평가추천단계-비추천사용)--%>
<c:if test="${bbsInfo.bbscttEvlRecomendStep eq '02'}">
<button class="postLikeBtn postLikeBtn--dislike">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"
fill="none">
<path
d="M14.7749 16.583H5.6756V7.41637L11.3711 1.75293L11.7012 1.8747C11.9266 2.03069 12.0992 2.22513 12.2188 2.45803C12.3385 2.69094 12.3705 2.93292 12.315 3.18399L12.2941 3.20803L11.5345 7.41637H17.2429C17.6115 7.41637 17.9269 7.54751 18.1892 7.8098C18.4515 8.07208 18.5826 8.38752 18.5826 8.75612V9.62308C18.5826 9.72351 18.5749 9.81351 18.5594 9.8931C18.5439 9.97269 18.5153 10.0558 18.4736 10.1423L16.1052 15.7185C15.9865 15.9829 15.8075 16.193 15.5682 16.349C15.3289 16.505 15.0645 16.583 14.7749 16.583ZM6.75891 15.4997H14.7749C14.8337 15.4997 14.8938 15.4837 14.9552 15.4516C15.0167 15.4195 15.0634 15.3661 15.0955 15.2913L17.4993 9.68718V8.75612C17.4993 8.68133 17.4753 8.61989 17.4272 8.5718C17.3791 8.52372 17.3177 8.49968 17.2429 8.49968H10.2461L11.1868 3.4532L6.75891 7.86508V15.4997ZM5.6756 7.41637V8.49968H2.49931V15.4997H5.6756V16.583H1.41602V7.41637H5.6756Z"
fill="black"></path>
</svg>
<span class="postLikeBtn__text">
비추천<em id="bbscttNonrecomendCnt"><c:out value="${bbscttInfo.nonrecomendCnt}"/></em>
</span>
</button>
</c:if>
</div>
</c:if>
<%-------------------------------%>
<c:if test="${bbsInfo.recomendGoodsExpsrAt eq 'Y' && not empty goodsList}">
<div class="cartOrder">
<div class="main-section__container">
<section class="main-section main-section__four-row">
<div class="main-section-header">
<div class="main-section-title">
<h3 class="main-section-title__title">
추천 상품
</h3>
</div>
</div>
<div class="product-list-type1">
<div class="${fn:length(goodsList) gt 4 ? 'four-row-slick relate-goods-slick evtSlick' : 'relate-goods-grid'}">
<c:forEach var = "item" items="${goodsList}">
<c:if test = "${not empty item.goodsInnb}">
<div class="product-unit">
<div class="product-unit-image">
<button type="button" onclick = "fn_move_goods_dtl(<c:out value="${item.goodsInnb}"/>)" value="${item.goodsInnb}">
<spring:eval expression="@environment.getProperty('sopmalfo.common.fileupload.cdnurl')" var="cdnurl"/>
<img src="<c:out value = "${cdnurl}${item.img}"/>" style="width: 100%;
height: 304px; /* 원하는 고정 높이 설정 */
object-fit: cover; /* 이미지 비율을 유지하면서 영역에 맞게 자름 */"
onerror="this.src='/pc/images/image_placeholder.png'" alt="해당 이미지에 대한 설명">
</button>
</div>
<div class="product-unit-info">
<div class="product-badge-container">
<c:if test = "${not empty item.goodsIconCd}">
<c:forEach items="${fn:split(item.goodsIconCd, ',')}" var="icon">
<c:if test="${icon eq 'new'}">
<span class="product-badge new" data-badge-cd="new">NEW</span>
</c:if>
<c:if test="${icon eq 'hot'}">
<span class="product-badge hot" data-badge-cd="hot">HOT</span>
</c:if>
<c:if test="${icon eq 'best'}">
<span class="product-badge best" data-badge-cd="best">BEST</span>
</c:if>
<c:if test="${icon eq 'md-pick'}">
<span class="product-badge md-pick" data-badge-cd="md-pick">MD PICK</span>
</c:if>
<c:if test="${icon eq 'hot-deal'}">
<span class="product-badge four-row" data-badge-cd="four-row">HOT DEAL</span>
</c:if>
</c:forEach>
</c:if>
</div>
<div class="product-unit-info__inner">
<div class="product-unit-title">
<button type="button" onclick = "fn_move_goods_dtl(<c:out value="${item.goodsInnb}"/>)">
<c:out value = "${item.goodsNm}"/>
</button>
</div>
<div class="product-unit-price">
<div class="product-unit-price__price">
<span class="product-unit-price__original">
<fmt:formatNumber value="${item.cnsmrpric}" pattern="#,###"/>
</span>
<span class="product-unit-price__current">
<fmt:formatNumber value="${item.slepric}" pattern="#,###"/>
</span>
</div>
<div class="product-unit-price__sale">
<span class="percent"><c:out value = "${item.slePercent}"/>%</span>
</div>
</div>
<span class="product-unit-price__monthly-payment"><c:out value = "${item.srtDc}"/></span>
</div>
<div class="product-unit-rating">
<i class="icon icon_rating-star"></i>
<span class="product-unit-rating__score"><c:out value = "${item.avgEvlScore}"/></span>
<span class="product-unit-rating__count">(<fmt:formatNumber value="${item.cntBbsctt}" pattern="#,###"/>)</span>
</div>
</div>
</div>
</c:if>
</c:forEach>
</div>
<c:if test="${fn:length(goodsList) gt 4}">
<div class="four-row-slick__btn-container">
<button class="relate-goods-slick__prev">
<i class="icon icon_prev02"></i>
<span class="visually-hidden">이전</span>
</button>
<button class="relate-goods-slick__next">
<i class="icon icon_next02"></i>
<span class="visually-hidden">다음</span>
</button>
</div>
</c:if>
</div>
</section>
</div>
</div>
</c:if>
<div id="evtGoodsPage" innb=""></div><%--이벤트게시글script로 mainSiteInnb 넣기--%>
<%-------------------------------%>
<div class="sub-bottom-btn-container">
<button class="btn xl outline" id="moveListBtn">목록</button>
<c:if test = "${bbscttInfo.regusrDvCd eq '01' || bbscttInfo.regusrDvCd eq '99'}"><%--비회원 , 회원 게시글만 수정 가능--%>
<button type="button" class="btn xl outline theme" id="moveUpdtBtn"><spring:message code="button.update"/></button>
<button type="button" class="btn xl outline theme" id="delBtn"><spring:message code="button.delete"/></button>
</c:if>
</div>
</div>
<%--게시글 댓글 영역--%>
<c:if test="${bbscttInfo.cmUseAt eq 'Y'}">
<div class="eventComment">
<div class="productReview__subTitle">
<span class="productReview__subTitle__title">댓글</span>
<span class="productReview__subTitle__num">
<span class="comma" id="cmCnt">
0
</span>
<span class="unit">건</span>
</span>
</div>
<c:if test = "${bbscttInfo.cmUseAt eq 'Y'}">
<c:choose>
<c:when test = "${bbscttVO.authResult eq 'Y'}">
<input type="hidden" id = "authResult" value = "Y">
<div class="comment-write">
<div class="comment-write__textarea-container">
<textarea class="comment-write__textarea" rows="5" placeholder="댓글을 입력하세요." id="cmInputCn"
name="cn"
title="댓글 입력"></textarea>
</div>
<button class="comment-write__button" id="btnCmReg">등록</button>
<div class="comment-write__bottom">
<div class="comment-write__info">
<div class="comment-write__info-inner">
<div class="comment-write__info-item cmInputNm">
<input type="text" class="comment-write__info-input" placeholder="이름을 입력하세요."
name="regusrNm" id="cmInputNm" maxlength="25"
value="<c:out value="${bbscttVO.regusrNm}"/>"
title="이름 입력">
</div>
<c:if test="${bbscttVO.regusrDvCd eq '99'}">
<div class="comment-write__info-item cmInputPw">
<input type="password" class="comment-write__info-input" name="password"
id="cmInputPw" maxlength="25"
placeholder="비밀번호를 입력하세요." title="비밀번호 입력">
</div>
</c:if>
</div>
</div>
<div class="b-checkbox-container">
<label class="b-checkbox checkbox is-medium secretBbscttAt">
<input type="checkbox" value="Y" name="secretBbscttAt" id="secretChk">
<span class="check"></span>
<span class="control-label">비밀 댓글</span>
</label>
</div>
</div>
</div>
</c:when>
<c:otherwise>
<div class="comment-write">
<div class="comment-write__textarea-container">
<textarea class="comment-write__textarea" rows="5"
placeholder="로그인 또는 댓글권한이 있을 경우 등록하실 수 있습니다." readonly></textarea>
</div>
<button class="comment-write__button" id = "rejectAuthCmBtn"><spring:message code="button.insert"/></button>
</div>
</c:otherwise>
</c:choose>
</c:if>
<div class="comment-body__area">
</div>
</div>
</c:if>
<%-------------------------------%>
<%-- 이전글/다음글 영역 1--%>
<c:if test="${bbsInfo.prevNext eq 'Y'}">
<div class="prev-next">
<c:if test="${not empty bbscttInfo.beforeInnb}">
<div class="prev-next__item">
<div class="prev-next__title">이전글</div>
<button type="button" class="prev-next__link" id="prevBtn" value="<c:out value="${ bbscttInfo.beforeInnb }"/>">
<c:choose>
<c:when test="${bbscttInfo.beforeSecretBbscttAt eq 'Y'}">
<c:choose>
<c:when test = "${bbscttInfo.beforeRegusrDvCd ne '02'}">
<span>${ bbscttInfo.maskingRegusrNm}</span>님의 ${bbsInfo.bbsNm}
</c:when>
<c:otherwise>
비밀글입니다.
</c:otherwise>
</c:choose>
<i class="icon icon_lock"></i>
</c:when>
<c:otherwise>
<c:choose>
<c:when test = "${bbscttInfo.beforeRegusrDvCd ne '02'}">
<c:out value ="${bbscttInfo.beforeSj}"/>
</c:when>
<c:otherwise>
<c:out value ="${bbscttInfo.beforeSj}" escapeXml="false"/>
</c:otherwise>
</c:choose>
</c:otherwise>
</c:choose>
</button>
</div>
</c:if>
<c:if test="${not empty bbscttInfo.afterInnb}">
<div class="prev-next__item">
<div class="prev-next__title">다음글</div>
<button type="button" class="prev-next__link" id="nextBtn" value="<c:out value="${bbscttInfo.afterInnb}"/>">
<c:choose>
<c:when test="${bbscttInfo.afterSecretBbscttAt eq 'Y'}">
<c:choose>
<c:when test = "${bbscttInfo.afterRegusrDvCd ne '02'}">
<span>${ bbscttInfo.maskingAfterRegusrNm}</span>님의 ${bbsInfo.bbsNm}
</c:when>
<c:otherwise>
비밀글입니다.
</c:otherwise>
</c:choose>
<i class="icon icon_lock"></i>
</c:when>
<c:otherwise>
<c:choose>
<c:when test="${bbscttInfo.afterRegusrDvCd ne '02'}">
<c:out value ="${bbscttInfo.afterSj}"/>
</c:when>
<c:otherwise>
<c:out value="${bbscttInfo.afterSj}" escapeXml="false"/>
</c:otherwise>
</c:choose>
</c:otherwise>
</c:choose>
</button>
</div>
</c:if>
</div>
</c:if>
</div>
</div>
<form id="hiddenForm">
<%--목록 관련--%>
<input type="hidden" name="pageIndex" value="${bbscttVO.pageIndex}" id="bbscttPageIndex"/>
<input type="hidden" name="pageUnit" value="${bbscttVO.pageUnit}"/>
<input type="hidden" name="srchKeyword" value="${bbscttVO.srchKeyword}"/>
<input type="hidden" name="srchDv" value="${bbscttVO.srchDv}"/>
<input type="hidden" name="itmInnb" value="${bbscttVO.itmInnb}"/>
<input type="hidden" name="expsrAt" value="Y"/>
<input type="hidden" name="useAt" value="Y"/>
<input type="hidden" name="cscAt" value="${bbscttVO.cscAt}"/>
<input type="hidden" name="reqUrl" id="reqUrl" value="${bbscttVO.reqUrl}"/>
<%--게시글 관련--%>
<input type="hidden" name="regusrDvCd" value="${bbscttInfo.regusrDvCd}" id="regusrDvCd"/>
<input type="hidden" name="bbscttInnb" value="${bbscttInfo.bbscttInnb }" id="bbscttInnb"/>
<%--게시판 설정--%>
<input type="hidden" name="bbsTyCd" value="${bbscttVO.bbsTyCd}"/>
<input type="hidden" name="bbsId" value="${ bbsInfo.bbsId }" id="bbsId"/>
<input type="hidden" name="setupInfoInnb" value="${ bbsInfo.setupInfoInnb }" id="setupInfoInnb"/>
<input type="hidden" name="sknTyCd" value="${ bbsInfo.sknTyCd }" id="sknTyCd"/>
<input type="hidden" name="slangFlterUseAt" value="${ bbsInfo.slangFlterUseAt }" id="slangFlterUseAt"/>
<input type="hidden" name="prevNext" value="${ bbsInfo.prevNext }" id="prevNext"/>
<input type="hidden" name="sopmalCd" value="<c:out value="${bbsInfo.sopmalCd}"/>" id="sopmalCd"/>
</form>
</main>
<%-- 공통 Footer --%>
<jsp:include page="/WEB-INF/views/comm/Footer.jsp"/>
<%--비밀번호 확인 모달--%>
<div id="confirm_pw_pop" class="modal alert">
<div class="alert-content">
<p class="alert-content__text--sm">
등록시에 입력했던 비밀번호를 입력해 주세요
</p>
<input class="input-text alert-content__pwInput" type="password" title="비밀번호 입력" placeholder="비밀번호 입력" name="password" id = "modalPw">
<%--게시글관련--%>
<input type="hidden" name="bbscttInnb" id="modalBbscttInnb">
<input type="hidden" id="modalAnswAt">
<input type="hidden" id="reqAction">
<%--댓글관련--%>
<input type="hidden" name="cmInnb" id="modalCmInnb">
<input type="hidden" name="reAt" id="reAt">
<input type="hidden" id="modalIdx">
<%--공통--%>
<input type="hidden" name="modalCrudDv" id="modalCrudDv">
</div>
<div class="alert-btn-container">
<a href="#" rel="modal:close" class="alert-btn alert-btn--cancel" id = "pwCancelBtn">취소</a>
<button type = "button" class="alert-btn alert-btn--confirm" id="pwChkBtn">확인</button>
</div>
</div>
<%--질문 삭제 모달 --%>
<div id="bbsctt_delete_pop" class="modal alert">
<div class="alert-content">
<p class="alert-content__text--sm">
삭제된 게시글은 복구할 수 없습니다.
<br>
정말로 삭제 하시겠습니까?
</p>
</div>
<div class="alert-btn-container">
<a href="#" rel="modal:close" class="alert-btn alert-btn--cancel">취소</a>
<button type="button" class="alert-btn alert-btn--confirm" id = "alertDelBtn">확인</button>
</div>
</div>
<%--이용자가 회원인데 작성자와 다를 시--%>
<div id="comment-update-pop" class="modal alert">
<div class="alert-content">
<p class="alert-content__text--sm">
글작성자만 이용가능합니다.
</p>
</div>
<div class="alert-btn-container">
<a href="#" rel="modal:close" class="alert-btn alert-btn--confirm">확인</a>
</div>
</div>
<%--이용자가 로그인 상태가 아닐 때--%>
<div id="login_alert_pop" class="modal alert">
<div class="alert-content">
<p class="alert-content__text--sm">
이용하시려면 로그인이 필요합니다!
<br>
로그인하시겠습니까?
</p>
</div>
<div class="alert-btn-container">
<a class="alert-btn alert-btn--confirm" onclick = "fn_move_login()"><spring:message code="button.yes"/></a>
<a href="#" rel="modal:close" class="alert-btn"><spring:message code="button.no"/></a>
</div>
</div>
<%--회원이 권한이 없을 때--%>
<div id="reject_auth_pop" class="modal alert">
<div class="alert-content">
<p class="alert-content__text--sm">
댓글 등록 권한이 없습니다.
<br>
고객센터에 문의해주세요.
</p>
</div>
<div class="alert-btn-container">
<a href="#" rel="modal:close" class="alert-btn alert-btn--confirm"><spring:message code="button.ok"/></a>
</div>
</div>
<div id="wishDiv"></div>
<%-------------------------------%>
</body>
<script src="<c:url value='/js/sopmal/lotteryScratch.js'/>"></script>
</html>