초기소스

This commit is contained in:
jazz
2025-10-29 17:08:05 +09:00
parent e531aa9540
commit 439a379a02
7551 changed files with 1234427 additions and 3 deletions

View File

@@ -0,0 +1,240 @@
<%@ page import="java.util.Date" %>
<%@ 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"%>
<%--
Class Name : GoodsGroupC.jsp
Description : 상품그룹등록화면
Modification Information
수정일 수정자 수정내용
------- -------- ---------------------------
2023-12-04 전일찬 최초 생성
--%>
<!DOCTYPE html>
<html lang="ko">
<head>
<%@ include file="/WEB-INF/views/comm/mngr/Include.jsp"%>
</head>
<script>
$(document).ready(function(){
});
/* ********************************************************
* 상품 그룹 수정화면 이동
******************************************************** */
const fn_move_uptpage = function(value) {
$('#VariusSubmitFrm').attr('action', '<c:url value="/mngr/setup/site/selectGoodsGroupDtlForm"/>');
$('#VariusSubmitFrm').attr('method', 'post');
$('#goodsGroupInnb').val(value);
$('#VariusSubmitFrm').submit();
}
/* ********************************************************
* 상품 그룹 목록조회
******************************************************** */
const fn_select_goodsgroup_list = function() {
$('#VariusSubmitFrm').attr('action', '<c:url value="/mngr/setup/site/selectGoodsGroupList"/>');
$('#VariusSubmitFrm').submit();
}
/* ********************************************************
* 상품 그룹 등록
******************************************************** */
const fn_regist_goodsgroup = function () {
const url = '<c:url value="/mngr/setup/site/insertGoodsGroup"/>';
const formData = new FormData();
$('#VariusSubmitFrm').serializeArray().forEach(function (item) {
formData.append(item.name, item.value);
});
var goodsIdArr = [];
$('input[name=relatedGoodsId]').each(function (i) {
goodsIdArr.push($("input[name='relatedGoodsId']").eq(i).attr("value"));
})
formData.append('goodsIds', goodsIdArr);
if (confirm('상품 그룹을 <spring:message code="confirm.common.insert"/>')) {
$.ajax({
type: 'post',
enctype: 'multipart/form-data',
url: url,
data: formData,
contentType: false,
processData: false,
success: function (data) {
let str = JSON.parse(data.resBody.result);
if (str.result == 'success') {
alert('<spring:message code="success.common.insert"/>');
//등록 후 수정화면으로 이동
fn_move_uptpage(str.goodsGroupInnb);
} else {
alert('<spring:message code="fail.common.insert"/>');
}
}
});
}
};
/* ********************************************************
* 상품 검색 팝업 배열 값 불러오기
******************************************************** */
var selected = [];
function fn_select_goods_search() {
selected = [];
$('#appendList tr').each(function() {
const goodsId = $(this).attr('id').replace('choiseListId', '');
const goodsImg = $(this).find('input[name="goodsImgCours"]').val();
const goodsNm = $(this).find('input[name="goodsNm"]').val();
const goodsPrice = $(this).find('input[name="slepric"]').val();
const goodsSttusNm = $(this).find('input[name="goodsSttusNm"]').val();
selected.push({
goodsId: goodsId,
goodsImg: goodsImg,
goodsNm: goodsNm,
goodsPrice: goodsPrice,
goodsSttusNm: goodsSttusNm
});
});
// 각 화면에 맞춰서 HTML 변경 START
var tableBody = $("#parentGoodsContainer");
tableBody.empty();
selected.forEach((good, index) => {
var productHtml = `
<div class="product-group__item">
<input type="hidden" id="relatedGoodsId" name="relatedGoodsId" value="` + good.goodsId+ `">
<input type="hidden" id="goodsSttusNm" name="goodsSttusNm" value="` + good.goodsSttusNm + `">
<span class="product-group__item-number">` + (index + 1) + `</span>
<div class="product-group__image">
<img src="` + good.goodsImg+ `" width="140" alt="` + good.goodsNm+ `"
onerror="this.src='/mngr/images/image_placeholder.png'"
>
</div>
<div class="product-group__description">
<p>` + good.goodsNm+ `</p>
<p class="product-group__description-price">` + good.goodsPrice+ `원</p>
</div>
</div>
`;
tableBody.append(productHtml);
});
// 각 화면에 맞춰서 HTML 변경 END
fn_close_modal('product-search');
}
/* ********************************************************
* 상품 검색 팝업 > 상품 목록 조회
******************************************************** */
const fn_goods_search_popup_list = function (pageIndex,selected) {
let dataStr;
if (!pageIndex) {
$('#pageIndex').val(1);
} else {
$('#pageIndex').val(pageIndex);
}
$('#popupListForm').find('input[name=pageIndex]').eq(0).val(pageIndex);
const popupListForm = $("#popupListForm").serialize();
$.ajax({
type: "post",
url: "<c:url value="/mngr/goods/goodsmngr/selectGoodsSrchPopupList"/>",
data: popupListForm,
success: function (resultHtml) {
$('#goodsList').empty();
$('#goodsList').html(resultHtml);
}
});
}
</script>
<body>
<%@ include file="/WEB-INF/views/comm/mngr/Header.jsp"%>
<main class="main">
<%@ include file="/WEB-INF/views/comm/mngr/Left.jsp"%>
<div class="content">
<div class="content__inner">
<button class="side-nav__fold"><span class="visually-hidden">좌측메뉴 펼치기/닫기</span></button>
<div class="page-title">
<h2 class="page-title__title">상품 그룹 등록</h2>
<div class="page-title__btn-container">
<button onclick="fn_select_goodsgroup_list()" onkeypress="this.onclick" class="btn outline"><spring:message code="button.list"/></button>
<button class="btn primary" onclick="fn_regist_goodsgroup();"><spring:message code="button.insert"/></button>
</div>
</div>
<section class="content-section">
<h3 class="content-section__title">상품 그룹</h3>
<form id="VariusSubmitFrm" method="post" action="">
<input type="hidden" id="goodsGroupInnb" name="goodsGroupInnb" value=""/>
<input type="hidden" id="pageIndex" name="pageIndex" value="<c:out value="${ resultMap.BOGoodsgrpVO.pageIndex }"/>"/>
<div class="table-wrapper">
<table class="table">
<caption>해당 테이블에 대한 설명</caption>
<colgroup>
<col style="width: 12%;">
<col>
</colgroup>
<tbody>
<tr>
<th>상품그룹명<span class="red-7">*</span></th>
<td>
<div class="td-inner">
<input class="input-text xl" type="text" name="goodsGroupNm" id="goodsGroupNm"
title="상품그룹명" maxlength="30">
</div>
</td>
</tr>
<tr>
<th>
<div>
<span class="ml-10">상품</span>
<br>
<a href="#" onclick="fn_open_modal('#modalDiv','#product-search','/mngr/goods/goodsmngr/selectGoodsSrchPopupForm',{'goodsKndCd':'01'}); return false;"
class="btn xsm primary mt-5">검색</a>
</div>
<%-- 모든상품 업데이트 삭제 --%>
<%-- <br><div class="td-inner">--%>
<%-- <div class="b-checkbox-container">--%>
<%-- <label class="b-checkbox checkbox">--%>
<%-- <input type="checkbox" name="allGoodsUpt" value="Y" >--%>
<%-- <span class="check"></span>--%>
<%-- <span class="control-label">모든상품 업데이트</span>--%>
<%-- </label>--%>
<%-- </div>--%>
<%-- </div>--%>
</th>
<td>
<div class="td-inner">
<div id="parentGoodsContainer" class="product-group">
<!-- 여기에 선택한 상품 정보가 추가됩니다 -->
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</form>
<button class="scroll-to-top"><span class="visually-hidden">위로가기</span></button>
</section>
<div id="modalDiv"></div>
</div>
</div>
</main>
</body>
</html>

View File

@@ -0,0 +1,352 @@
<%@ page import="java.util.Date" %>
<%@ 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"%>
<%--
Class Name : GoodsGroupDtlU.jsp
Description : 상품그룹수정화면
Modification Information
수정일 수정자 수정내용
------- -------- ---------------------------
2023-12-04 전일찬 최초 생성
--%>
<!DOCTYPE html>
<html lang="ko">
<head>
<%@ include file="/WEB-INF/views/comm/mngr/Include.jsp"%>
</head>
<script>
$(document).ready(function(){
});
// 전역변수
var cnt = 0;
/* ********************************************************
* 상품 그룹 수정화면 이동
******************************************************** */
const fn_move_uptpage = function(value) {
$('#VariusSubmitFrm').attr('action', '<c:url value="/mngr/setup/site/selectGoodsGroupDtlForm"/>');
$('#VariusSubmitFrm').attr('method', 'post');
$('#VariusSubmitFrm').submit();
}
/* ********************************************************
* 상품 그룹 목록조회
******************************************************** */
const fn_select_goodsgroup_list = function() {
$('#VariusSubmitFrm').attr('action', '<c:url value="/mngr/setup/site/selectGoodsGroupList"/>');
$('#VariusSubmitFrm').submit();
}
/* ********************************************************
* 상품 그룹 수정
******************************************************** */
const fn_regist_goodsgroup = function () {
const url = '<c:url value="/mngr/setup/site/updateGoodsGroupDtl"/>';
const formData = new FormData();
$('#VariusSubmitFrm').serializeArray().forEach(function (item) {
formData.append(item.name, item.value);
});
var goodsIdArr = [];
$('input[name=relatedGoodsId]').each(function (i) {
goodsIdArr.push($("input[name='relatedGoodsId']").eq(i).attr("value"));
})
formData.append('goodsIds', goodsIdArr);
if (confirm('상품 그룹을 <spring:message code="confirm.common.update"/>')) {
$.ajax({
type: 'post',
enctype: 'multipart/form-data',
url: url,
data: formData,
contentType: false,
processData: false,
success: function (data) {
let str = JSON.parse(data.resBody.result);
if (str.result == 'success') {
alert('<spring:message code="success.common.update"/>');
fn_move_uptpage(data.resBody.result.replace(/[^0-9]/g, ""));
} else {
alert('<spring:message code="fail.common.update"/>');
}
}
});
}
};
//관련 상품 검색 모달
const fn_open_search_modal = function (modalDivSltr, modalSlrt, url, param, callback) {
submitType = 'POST';
$.ajax({
type: submitType,
url: url,
data: param,
success: function (data) {
$(modalSlrt).remove();
$(modalDivSltr).html(data);
//최초오픈시에 관련상품 정보 있을 경우 실행
if(custom_open_modal_cnt === 0){
var tableBody = $("#appendList");
const cdnurl = $('#cdnurl').val()
selectedDtl.forEach((good, index) => {
var row = `
<tr id="choiseListId` +good.goodsId + `" class="draggable" ondblclick="fn_remove_append_goods_list(this)">
<td class="text-left">
<input type="hidden" id="goodsInnb" name="goodsInnb" value="` + good.goodsId + `"/>
<input type="hidden" id="goodsImgCours" name="goodsImgCours" value="`+cdnurl + good.goodsImg + `"/>
<input type="hidden" id="goodsNm" name="goodsNm" value="` + good.goodsNm + `"/>
<input type="hidden" id="slepric" name="slepric" value="` + good.goodsPrice + `"/>
<input type="hidden" id="goodsSttusNm" name="goodsSttusNm" value="` + good.goodsSttusNm + `"/>
<div class="product-search-box__product">
<img src="`+cdnurl + good.goodsImg+ `"
onerror="this.src='<c:url value="/mngr/images/image_placeholder.png"/>'"
alt="` +good.goodsNm+ `" width="64">
` +good.goodsNm+ `
</div>
</td>
<td>` +good.goodsPrice+ `</td>
<td>` +good.goodsSttusNm+ `</td>
</tr>
`;
tableBody.append(row);
});
custom_open_modal_cnt++;
}
$(modalSlrt).modal();
}
});
}
/* ********************************************************
* custom open modal function
******************************************************** */
let custom_open_modal_cnt = 0;
//현재 등록된 관련 상품 정보
let selectedDtl = [];
const fn_custom_open_modal = (modalDivSltr, modalSlrt, url, param, callback) => {
selectedDtl = [];
if(custom_open_modal_cnt === 0){
console.log("df");
$('.product-group__item').each(function() {
const goodsId = $(this).find('input[name="relatedGoodsId"]').val();
const goodsImg = $(this).find('input[name="relatedGoodsImg"]').val();
const goodsNm = $(this).find('input[name="relatedGoodsNm"]').val();
const goodsPrice = $(this).find('input[name="relatedGoodsPrice"]').val();
const goodsSttusNm = $(this).find('input[name="goodsSttusNm"]').val();
selectedDtl.push({
goodsId: goodsId,
goodsImg: goodsImg,
goodsNm: goodsNm,
goodsPrice: goodsPrice,
goodsSttusNm: goodsSttusNm
});
});
}
console.log("seletedDtl :", selectedDtl);
fn_open_search_modal(modalDivSltr, modalSlrt, url, param, callback);
}
/* ********************************************************
* 상품 검색 팝업 배열 값 불러오기
******************************************************** */
var selected = [];
function fn_select_goods_search() {
selected = [];
$('#appendList tr').each(function() {
const goodsId = $(this).attr('id').replace('choiseListId', '');
const goodsImg = $(this).find('input[name="goodsImgCours"]').val();
const goodsNm = $(this).find('input[name="goodsNm"]').val();
const goodsPrice = $(this).find('input[name="slepric"]').val();
const goodsSttusNm = $(this).find('input[name="goodsSttusNm"]').val();
selected.push({
goodsId: goodsId,
goodsImg: goodsImg,
goodsNm: goodsNm,
goodsPrice: goodsPrice,
goodsSttusNm: goodsSttusNm
});
});
// 각 화면에 맞춰서 HTML 변경 START
var tableBody = $("#parentGoodsContainer");
tableBody.empty();
selected.forEach((good, index) => {
var productHtml = `
<div class="product-group__item">
<input type="hidden" id="relatedGoodsId" name="relatedGoodsId" value="` + good.goodsId+ `">
<input type="hidden" id="goodsSttusNm" name="goodsSttusNm" value="` + good.goodsSttusNm + `">
<span class="product-group__item-number">` + (index + 1) + `</span>
<div class="product-group__image">
<img src="` + good.goodsImg+ `" width="140" alt="` + good.goodsNm+ `"
onerror="this.src='/mngr/images/image_placeholder.png'"
>
</div>
<div class="product-group__description">
<p>` + good.goodsNm+ `</p>
<p class="product-group__description-price">` + good.goodsPrice+ `원</p>
</div>
</div>
`;
tableBody.append(productHtml);
});
// 각 화면에 맞춰서 HTML 변경 END
fn_close_modal('product-search');
}
/* ********************************************************
* 상품 검색 팝업 > 상품 목록 조회
******************************************************** */
const fn_goods_search_popup_list = function (pageIndex,selected) {
let dataStr;
if (!pageIndex) {
$('#pageIndex').val(1);
} else {
$('#pageIndex').val(pageIndex);
}
$('#popupListForm').find('input[name=pageIndex]').eq(0).val(pageIndex);
const popupListForm = $("#popupListForm").serialize();
$.ajax({
type: "post",
url: "<c:url value="/mngr/goods/goodsmngr/selectGoodsSrchPopupList"/>",
data: popupListForm,
success: function (resultHtml) {
$('#goodsList').empty();
$('#goodsList').html(resultHtml);
}
});
}
</script>
<body>
<%@ include file="/WEB-INF/views/comm/mngr/Header.jsp"%>
<main class="main">
<%@ include file="/WEB-INF/views/comm/mngr/Left.jsp"%>
<div class="content">
<div class="content__inner">
<button class="side-nav__fold"><span class="visually-hidden">좌측메뉴 펼치기/닫기</span></button>
<div class="page-title">
<h2 class="page-title__title">상품 그룹 수정</h2>
<div class="page-title__btn-container">
<button onclick="fn_select_goodsgroup_list()" onkeypress="this.onclick" class="btn outline"><spring:message code="button.list"/></button>
<button class="btn primary" onclick="fn_regist_goodsgroup();"><spring:message code="button.update"/></button>
</div>
</div>
<section class="content-section">
<h3 class="content-section__title">상품 그룹</h3>
<form id="VariusSubmitFrm" method="post" action="">
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.cdnurl')" var="cdnurl"/>
<input type="hidden" id="cdnurl" value="${cdnurl}"/>
<input type="hidden" id="goodsGroupInnb" name="goodsGroupInnb" value="<c:out value="${ resultMap.BOGoodsgrpVO.goodsGroupInnb }"/>"/>
<input type="hidden" id="pageIndex" name="pageIndex" value="<c:out value="${ resultMap.BOGoodsgrpVO.pageIndex }"/>"/>
<div class="table-wrapper">
<table class="table">
<caption>해당 테이블에 대한 설명</caption>
<colgroup>
<col style="width: 12%;">
<col>
</colgroup>
<tbody>
<tr>
<th>상품그룹명<span class="red-7">*</span></th>
<td>
<div class="td-inner">
<input class="input-text xl" type="text" name="goodsGroupNm" id="goodsGroupNm"
title="상품그룹명" value="<c:out value="${ resultMap.BOGoodsgrpVO.goodsGroupNm }"/>" maxlength="30">
</div>
</td>
</tr>
<tr>
<th>
<div>
<span class="ml-10">상품</span>
<br>
<c:if test="${not empty resultMap.goodsInfo}">
<a href="#" onclick="fn_custom_open_modal('#modalDiv','#product-search','/mngr/goods/goodsmngr/selectGoodsSrchPopupForm',{'goodsKndCd':'01'}); return false;"
class="btn xsm primary mt-5">검색</a>
</c:if>
<c:if test="${empty resultMap.goodsInfo}">
<a href="#" onclick="fn_open_modal('#modalDiv','#product-search','/mngr/goods/goodsmngr/selectGoodsSrchPopupForm',{'goodsKndCd':'01'}); return false;"
class="btn xsm primary mt-5">검색</a>
</c:if>
</div>
<%-- 모든상품 업데이트 삭제 --%>
<%-- <br><div class="td-inner">--%>
<%-- <div class="b-checkbox-container">--%>
<%-- <label class="b-checkbox checkbox">--%>
<%-- <input type="checkbox" name="allGoodsUpt" value="Y" <c:if test="resultMap.BOGoodsgrpVO.allGoodsupt eq 'Y'">checked</c:if>>--%>
<%-- <span class="check"></span>--%>
<%-- <span class="control-label">모든상품 업데이트</span>--%>
<%-- </label>--%>
<%-- </div>--%>
<%-- </div>--%>
</th>
<td>
<div class="td-inner">
<div id="parentGoodsContainer" class="product-group">
<%-- <c:if test="${resultMap.BOGoodsgrpVO.allGoodsupt ne 'Y'}">--%>
<!-- 여기에 선택한 상품 정보가 추가됩니다 -->
<c:if test="${not empty resultMap.goodsInfo}">
<c:forEach items="${ resultMap.goodsInfo }" var="goodsInfo" varStatus="gdsInfoStatus">
<div class="product-group__item">
<input type="hidden" id="relatedGoodsId" name="relatedGoodsId" value="<c:out value="${(goodsInfo.goodsInnb)}"/>">
<input type="hidden" name="relatedGoodsNm" value="<c:out value="${(goodsInfo.goodsNm)}"/>">
<input type="hidden" name="relatedGoodsImg" value="<c:out value="${(goodsInfo.img)}"/>">
<input type="hidden" name="relatedGoodsPrice" value="<c:out value="${(goodsInfo.slepric)}"/>">
<input type="hidden" name="goodsSttusNm" value="<c:out value="${(goodsInfo.goodsSttusNm)}"/>">
<span class="product-group__item-number"><c:out value="${(gdsInfoStatus.count)}"/></span>
<div class="product-group__image">
<img src="<c:out value="${cdnurl}${goodsInfo.img}"/>" onerror="this.src='/mngr/images/image_placeholder.png'" width="140" alt="<c:out value="${(goodsInfo.goodsNm)}"/>">
</div>
<div class="product-group__description">
<p><c:out value="${(goodsInfo.goodsNm)}"/></p>
<p class="product-group__description-price"><c:out value="${(goodsInfo.slepric)}"/>원</p>
</div>
</div>
</c:forEach>
</c:if>
<%-- </c:if>--%>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</form>
<button class="scroll-to-top"><span class="visually-hidden">위로가기</span></button>
</section>
<div id="modalDiv"></div>
</div>
</div>
</main>
</body>
</html>

View File

@@ -0,0 +1,157 @@
<%@ page import="java.util.Date" %>
<%@ 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"%>
<%--
Class Name : GoodsGroupListR.jsp
Description : 상품그룹 목록조회 화면
Modification Information
수정일 수정자 수정내용
------- -------- ---------------------------
2023-12-04 전일찬 최초 생성
--%>
<!DOCTYPE html>
<html lang="ko">
<head>
<%@ include file="/WEB-INF/views/comm/mngr/Include.jsp"%>
</head>
<script>
$(document).ready(function(){
});
/* ********************************************************
* 상품 그룹 수정화면 이동
******************************************************** */
const fn_move_uptpage = function(value) {
$('#VariusSubmitFrm').attr('action', '<c:url value="/mngr/setup/site/selectGoodsGroupDtlForm"/>');
$('#VariusSubmitFrm').attr('method', 'post');
$('#goodsGroupInnb').val(value);
$('#VariusSubmitFrm').submit();
}
/* ********************************************************
* 상품 그룹 등록화면 이동
******************************************************** */
const fn_move_registPg = function() {
$('#VariusSubmitFrm').attr('action', '<c:url value="/mngr/setup/site/selectGoodsGroupForm"/>');
$('#VariusSubmitFrm').attr('method', 'post');
$('#VariusSubmitFrm').submit();
}
/* ********************************************************
* 상품 그룹 목록조회
******************************************************** */
const fn_select_goodsgroup_list = function(pageIndex) {
if(!pageIndex) {
$('#pageIndex').val(1);
} else {
$('#pageIndex').val(pageIndex);
}
$('#VariusSubmitFrm').attr('action', '<c:url value="/mngr/setup/site/selectGoodsGroupList"/>');
$('#pageIndex').val(pageIndex);
$('#VariusSubmitFrm').submit();
}
/* ********************************************************
* 상품 그룹 삭제
******************************************************** */
const fn_delete_goodsgroup = function(value) {
if(confirm('상품 그룹을 <spring:message code="confirm.common.delete"/>')) {
$.ajax({
type : 'post',
url : '<c:url value="/mngr/setup/site/deleteGoodsGroup"/>',
data : { goodsGroupInnb : value },
success : function(data) {
let str = JSON.parse(data.resBody.result);
if (str.result == 'success') {
alert('<spring:message code="success.common.delete"/>');
fn_select_goodsgroup_list(1);
} else {
alert('<spring:message code="fail.common.delete"/>');
}
}
});
}
}
</script>
<body>
<%@ include file="/WEB-INF/views/comm/mngr/Header.jsp"%>
<main class="main">
<%@ include file="/WEB-INF/views/comm/mngr/Left.jsp"%>
<div class="content">
<div class="content__inner">
<button class="side-nav__fold"><span class="visually-hidden">좌측메뉴 펼치기/닫기</span></button>
<div class="page-title">
<h2 class="page-title__title">상품 그룹 관리</h2>
<div class="page-title__btn-container">
<a href="#fn_move_registPg" onclick="fn_move_registPg(); return false;" class="btn primary">상품그룹 <spring:message code="button.insert"/></a>
</div>
</div>
<section class="content-section">
<form id="VariusSubmitFrm" method="post" action="">
<input type="hidden" id="goodsGroupInnb" name="goodsGroupInnb" value=""/>
<input type="hidden" id="pageIndex" name="pageIndex" value="<c:out value="${ resultMap.BOGoodsgrpVO.pageIndex }"/>"/>
<div class="table-wrapper">
<table class="table vertical">
<caption>상품그룹 목록</caption>
<!-- 각 열 width 설정 -->
<colgroup>
<col style="width: 7%;">
<col style="width: 15%;">
<col style="width: auto;">
<col style="width: 20%;">
</colgroup>
<thead>
<tr>
<th>번호</th>
<th>그룹구분</th>
<th>그룹명</th>
<th>관리</th>
</tr>
</thead>
<tbody>
<c:choose>
<c:when test="${ not empty resultMap.goodsGroupList }">
<c:forEach items="${ resultMap.goodsGroupList }" var="list" varStatus="status">
<tr>
<td><c:out value="${ resultMap.paginationInfo.totalRecordCount - list.rnum +1 }"/></td>
<td class="center"><c:out value="${list.goodsGroupDvCdNm}"/></td>
<td class="left"><c:out value="${list.goodsGroupNm}"/></td>
<td>
<div class="manage-btn-container">
<button class="btn xsm primary outline" onclick="fn_move_uptpage('<c:out value="${list.goodsGroupInnb}"/>')"><spring:message code="button.update"/></button>
<c:if test="${ list.goodsGroupDvCd ne '02' }">
<button class="btn xsm dark" onclick="fn_delete_goodsgroup('<c:out value="${list.goodsGroupInnb}"/>')"><spring:message code="button.delete"/></button>
</c:if>
</div>
</td>
</tr>
</c:forEach>
</c:when>
<c:otherwise>
<tr>
<td colspan="100%"><spring:message code="common.nodata"/></td>
</tr>
</c:otherwise>
</c:choose>
</tbody>
</table>
</div>
</form>
</section>
<div class="pagination__container">
<ui:pagination paginationInfo="${resultMap.paginationInfo}" type="image" jsFunction="fn_select_goodsgroup_list"/>
</div>
<button class="scroll-to-top"><span class="visually-hidden">위로가기</span></button>
</div>
</div>
</main>
</body>
</html>

View File

@@ -0,0 +1,294 @@
<%@ 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"%>
<%--
Class Name : GoodsSerchPopup.jsp
Description : 상품 검색 팝업
Modification Information
수정일 수정자 수정내용
------- -------- ---------------------------
since : 2023.12.01 전일찬 최초 생성
--%>
<div id="product-search" class="modal" style="max-width: 1200px;">
<div class="modal-header">
<h4>상품 검색</h4>
</div>
<div class="modal-content">
<div class="table-wrapper">
<table class="table">
<caption>해당 테이블에 대한 설명</caption>
<colgroup>
<col style="width: 12%;">
<col style="width: 38%;">
<col style="width: 12%;">
<col style="width: 38%;">
</colgroup>
<tbody>
<tr>
<th>검색어</th>
<td colspan="3">
<input class="input-text xl" type="text" title="해당 인풋에 대한 설명"
placeholder="상품명(매입상품명), 상품코드">
</td>
</tr>
<tr>
<th>상태</th>
<td>
<div class="b-checkbox-container">
<label class="b-checkbox checkbox">
<input type="checkbox" value="">
<span class="check"></span>
<span class="control-label">정상</span>
</label>
<label class="b-checkbox checkbox">
<input type="checkbox" value="">
<span class="check"></span>
<span class="control-label">품절</span>
</label>
<label class="b-checkbox checkbox">
<input type="checkbox" value="">
<span class="check"></span>
<span class="control-label">재고확보중</span>
</label>
<label class="b-checkbox checkbox">
<input type="checkbox" value="">
<span class="check"></span>
<span class="control-label">판매중지</span>
</label>
</div>
</td>
<th>노출 여부</th>
<td>
<div class="custom-radio-container">
<div class="custom-radio">
<input type="radio" id="r-200" name="r-group200" checked="">
<label for="r-200">전체</label>
</div>
<div class="custom-radio">
<input type="radio" id="r-201" name="r-group200">
<label for="r-201">노출</label>
</div>
<div class="custom-radio">
<input type="radio" id="r-203" name="r-group200">
<label for="r-203">미노출</label>
</div>
</div>
</td>
</tr>
<tr>
<th>카테고리</th>
<td colspan="3">
<div class="input-container gap-4">
<div class="select-box">
<select title="해당 셀렉트에 대한 설명">
<option value="">1차 카테고리</option>
</select>
</div>
<div class="select-box">
<select title="해당 셀렉트에 대한 설명">
<option value="">2차 카테고리</option>
</select>
</div>
<div class="select-box">
<select title="해당 셀렉트에 대한 설명">
<option value="">3차 카테고리</option>
</select>
</div>
<div class="select-box">
<select title="해당 셀렉트에 대한 설명">
<option value="">4차 카테고리</option>
</select>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="form-control-container">
<div class="left"></div>
<div class="center">
<button class="btn outline">초기화</button>
<button class="btn primary">검색</button>
</div>
<div class="right"></div>
</div>
<div class="product-search-box">
<div class="table-wrapper left">
<table class="table vertical tight">
<caption>해당 테이블에 대한 설명</caption>
<colgroup>
<col>
<col style="width: 16%;">
<col style="width: 16%;">
</colgroup>
<thead>
<tr>
<th>상품명</th>
<th>판매가</th>
<th>노출여부</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-left">
<div class="product-search-box__product">
<img src="../resources/images/상품이미지01.png" width="64" alt="상품이미지">
메타바이옴 V2 다이어트 유산균 1박스
</div>
</td>
<td>55,000</td>
<td>노출</td>
</tr>
<tr>
<td class="text-left">
<div class="product-search-box__product">
<img src="../resources/images/상품이미지01.png" width="64" alt="상품이미지">
메타바이옴 V2 다이어트 유산균 1박스
</div>
</td>
<td>55,000</td>
<td>노출</td>
</tr>
<tr>
<td class="text-left">
<div class="product-search-box__product">
<img src="../resources/images/상품이미지01.png" width="64" alt="상품이미지">
메타바이옴 V2 다이어트 유산균 1박스
</div>
</td>
<td>55,000</td>
<td>노출</td>
</tr>
<tr>
<td class="text-left">
<div class="product-search-box__product">
<img src="../resources/images/상품이미지01.png" width="64" alt="상품이미지">
메타바이옴 V2 다이어트 유산균 1박스
</div>
</td>
<td>55,000</td>
<td>노출</td>
</tr>
<tr>
<td class="text-left">
<div class="product-search-box__product">
<img src="../resources/images/상품이미지01.png" width="64" alt="상품이미지">
메타바이옴 V2 다이어트 유산균 1박스
</div>
</td>
<td>55,000</td>
<td>노출</td>
</tr>
<tr>
<td class="text-left">
<div class="product-search-box__product">
<img src="../resources/images/상품이미지01.png" width="64" alt="상품이미지">
메타바이옴 V2 다이어트 유산균 1박스
</div>
</td>
<td>55,000</td>
<td>노출</td>
</tr>
<tr>
<td class="text-left">
<div class="product-search-box__product">
<img src="../resources/images/상품이미지01.png" width="64" alt="상품이미지">
메타바이옴 V2 다이어트 유산균 1박스
</div>
</td>
<td>55,000</td>
<td>노출</td>
</tr>
<tr>
<td class="text-left">
<div class="product-search-box__product">
<img src="../resources/images/상품이미지01.png" width="64" alt="상품이미지">
메타바이옴 V2 다이어트 유산균 1박스
</div>
</td>
<td>55,000</td>
<td>노출</td>
</tr>
<tr>
<td class="text-left">
<div class="product-search-box__product">
<img src="../resources/images/상품이미지01.png" width="64" alt="상품이미지">
메타바이옴 V2 다이어트 유산균 1박스
</div>
</td>
<td>55,000</td>
<td>노출</td>
</tr>
<tr>
<td class="text-left">
<div class="product-search-box__product">
<img src="../resources/images/상품이미지01.png" width="64" alt="상품이미지">
메타바이옴 V2 다이어트 유산균 1박스
</div>
</td>
<td>55,000</td>
<td>노출</td>
</tr>
</tbody>
</table>
<div class="pagination__container">
<div class="pagination">
<button disabled="" class="pagination__item first"><span class="visually-hidden">첫
페이지로</span></button>
<button disabled="" class="pagination__item prev"><span class="visually-hidden">이전
페이지로</span></button>
<ol class="pagination__number-group">
<li><button class="pagination__item active"><span>1</span></button></li>
<li><button class="pagination__item"><span>2</span></button></li>
<li><button class="pagination__item"><span>3</span></button></li>
<li><button class="pagination__item"><span>4</span></button></li>
<li><button class="pagination__item"><span>5</span></button></li>
<li><button class="pagination__item"><span>6</span></button></li>
<li><button class="pagination__item"><span>7</span></button></li>
<li><button class="pagination__item"><span>8</span></button></li>
<li><button class="pagination__item"><span>9</span></button></li>
<li><button class="pagination__item"><span>10</span></button></li>
</ol>
<button class="pagination__item next"><span class="visually-hidden">다음 페이지로</span></button>
<button class="pagination__item last"><span class="visually-hidden">마지막 페이지로</span></button>
</div>
</div>
</div>
<div class="table-wrapper right">
<table class="table vertical tight draggable">
<caption>해당 테이블에 대한 설명</caption>
<colgroup>
<col>
<col style="width: 16%;">
<col style="width: 16%;">
</colgroup>
<thead>
<tr>
<th>상품명</th>
<th>판매가</th>
<th>노출여부</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-left">
<div class="product-search-box__product">
<img src="../resources/images/상품이미지01.png" width="64" alt="상품이미지">
1111
</div>
</td>
<td>55,000</td>
<td>노출</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="modal-footer">
<a href="#" rel="modal:close" class="btn outline">취소</a>
<button class="btn primary">확인</button>
</div>
</div>

View File

@@ -0,0 +1,217 @@
<%@ page import="java.util.Date" %>
<%@ 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"%>
<%--
Class Name : SiteContentManageU.jsp
Description : 사이트 메인페이지 관리 jsp
Modification Information
수정일 수정자 수정내용
------- -------- ---------------------------
2024-02-19 추지훈 최초 생성
--%>
<script>
$(document).ready(function() {
const hiddenTdVal = '<c:out value="${ resultMap.paramVO.relmTdId }"/>';
if ($(".table.draggable").length > 0) {
$(".table.draggable").tableDnD({
onDragClass: "dragging",
});
}
});
//테이블 행 삭제
//
var table = $("#bannerPopupTable.table");
table.on("click", ".circle-btn.delete", function (e) {
e.preventDefault();
var tbody = $(this).closest("tbody");
var tr = $(this).closest("tr");
var th = $(this).closest("th");
var allHidden = true;
tr.siblings().each(function () {
if ($(this).css("display") !== "none") {
allHidden = false;
}
});
if (th.attr("rowspan") > 1) {
tr.next().remove();
th.attr("rowspan", th.attr("rowspan") - 1);
}
tr.remove();
if (tbody.children().length == 0 || allHidden) {
tbody.append(
"<tr class='row-no-data'><td colspan='100' class='text-center'>데이터가 없습니다.</td></tr>"
);
}
});
</script>
<%--구분에 따른 이미지 사이즈 및 이름 변수 설정--%>
<c:choose>
<c:when test="${ resultMap.resultPopupList.resultContent.relmDvCd eq '01' and resultMap.resultPopupList.resultContent.imgExpsrDvCd eq 'P' }">
<c:set var = "relmNm" value = "롤링배너(PC)"/>
<c:set var = "height" value="480"/>
<c:set var = "width" value="1280"/>
</c:when>
<c:when test="${ resultMap.resultPopupList.resultContent.relmDvCd eq '01' and resultMap.resultPopupList.resultContent.imgExpsrDvCd eq 'M' }">
<c:set var = "relmNm" value = "롤링배너(모바일)"/>
<c:set var = "height" value="258"/>
<c:set var = "width" value="414"/>
</c:when>
<c:when test="${ resultMap.resultPopupList.resultContent.relmDvCd eq '12' and resultMap.resultPopupList.resultContent.imgExpsrDvCd eq 'P' }">
<c:set var = "relmNm" value = "띠배너(PC)"/>
<c:set var = "height" value="130"/>
<c:set var = "width" value="1280"/>
</c:when>
<c:when test="${ resultMap.resultPopupList.resultContent.relmDvCd eq '12' and resultMap.resultPopupList.resultContent.imgExpsrDvCd eq 'M' }">
<c:set var = "relmNm" value = "띠배너(모바일)"/>
<c:set var = "height" value="85"/>
<c:set var = "width" value="430"/>
</c:when>
<c:when test="${ resultMap.resultPopupList.resultContent.relmDvCd eq '15'}">
<c:set var = "relmNm" value = "최상단 띠배너"/>
<c:set var = "height" value="50"/>
<c:set var = "width" value="1730"/>
</c:when>
</c:choose>
<!-- 롤링배너 설정 팝업 -->
<div id="rolling-banner-pop" class="modal mainSetupModal" style="max-width: 800px;">
<div class="modal-header">
<h4><c:out value="${relmNm}"/></h4>
</div>
<div class="modal-content" style="height: 500px;">
<form id="bannerPopupRegistForm">
<div class="table-wrapper" id="bannerPopupRegistDiv">
<input type="hidden" id="deleteContentsItemList" name="deleteContentsItemList" value=""/>
<input type="hidden" id="mainSiteInnb" name="mainSiteInnb" value="<c:out value="${ resultMap.paramVO.mainSiteInnb }"/>"/>
<table class="table vertical draggable" id="bannerPopupTable">
<caption>해당 테이블에 대한 설명</caption>
<colgroup>
<col style="width: 5%;">
<col style="width: 40%;">
<col>
<col style="width: 10%;">
</colgroup>
<thead>
<tr>
<th>순서</th>
<th>첨부 파일</th>
<th>연결 URL</th>
<th>
<button class="circle-btn add" type="button" onclick="fn_add_tr('bannerPopupTable', 0); fn_category_initialize('bannerPopTbody');"><span class="visually-hidden">추가</span></button>
</th>
</tr>
</thead>
<tbody id="bannerPopTbody">
<c:choose>
<c:when test="${ not empty resultMap.resultPopupList.result && fn:length( resultMap.resultPopupList.result ) > 0 }">
<c:forEach items="${ resultMap.resultPopupList.result }" var="list" varStatus="status">
<tr>
<td>
<div class="draggable-icon-container">
<i class="icon icon_draggable"></i>
<span class="visually-hidden">순서 바꾸기</span>
</div>
</td>
<td>
<div class="d-flex flex-col align-items-start gap-5">
<c:set var = "display" value = ""/>
<c:if test = "${not empty list.sysFilNm}">
<c:set var = "display" value = "display:none;"/>
</c:if>
<div class="input-file" style="${display}">
<input type="hidden" id="fileAt${ status.index }" name="fileAt" value=""/>
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.extensions.images')" var="acceptFileExtensions"/>
<input type="file" id="fileUpload${ status.index }" name="files" title="아이콘파일" accept="<c:out value="${ acceptFileExtensions }"/>" multiple="multiple" onchange="addFilesPopup(event, 1, '#fileListBanner${ status.index }');"/>
<label for="fileUpload${ status.index }">파일선택</label>
</div>
<ul class="file-list" id="fileListBanner${ status.index }">
<c:if test="${ not empty list.sysFilNm}">
<li id="${ list.mainSetupItemInnb}">
<a href="#" id="${ list.orginlFilNm}${ status.index }" onclick="downloadFile(this,'${resultMap.paramVO.sopmalCd}','MANC', ${ status.index });">
<i class="icon icon_file-list mr-2"></i>
<span class="file-list__item-title fileNm"><c:out value="${ list.orginlFilNm}"/></span>
<span class="file-list__item-size fileSz">(<c:out value="${ list.filMg}"/> KB)</span>
</a>
<button type="button" class="file-list__delete fileDl" onclick="fn_delete_file_at.call(this); deleteFile(this,'${resultMap.paramVO.sopmalCd}','MANC',${status.index});"> <!-- fn_delete_imgFile('1') deleteFile(this, 1) -->
<span class="visually-hidden">파일 삭제</span>
</button>
</li>
</c:if>
</ul>
</div>
</td>
<td>
<input type="hidden" name="mainSetupItemInnb" value="<c:out value="${ list.mainSetupItemInnb }"/>"/>
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="요청 URL" name="itmeCnncUrl" value="<c:out value="${ list.itmeCnncUrl }"/>">
</td>
<td>
<button class="circle-btn delete" type="button" onclick="fn_delete_tr_main('bannerPopupTable', 1); "><span class="visually-hidden">삭제</span></button>
</td>
</tr>
</c:forEach>
</c:when>
<c:otherwise>
<tr>
<td>
<div class="draggable-icon-container">
<i class="icon icon_draggable"></i>
<span class="visually-hidden">순서 바꾸기</span>
</div>
</td>
<td>
<div class="d-flex flex-col align-items-start gap-5">
<div class="input-file">
<input type="hidden" id="fileAt${ status.index }" name="fileAt" value=""/>
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.extensions.images')" var="acceptFileExtensions"/>
<input type="file" id="fileUpload${ status.index }" name="files" title="아이콘파일" accept="<c:out value="${ acceptFileExtensions }"/>" multiple="multiple" onchange="addFilesPopup(event, 1, '#fileListBanner${ status.index }');"/>
<label for="fileUpload${ status.index }">파일선택</label>
</div>
<ul class="file-list" id="fileListBanner${ status.index }">
<c:if test="${ not empty list.sysFilNm}">
<li id="${ list.mainSetupItemInnb}">
<a href="#" id="${ list.orginlFilNm}${ status.index }" onclick="downloadFile(this,${resultMap.paramVO.sopmalCd},'MANC', ${ status.index });">
<i class="icon icon_file-list mr-2"></i>
<span class="file-list__item-title fileNm"><c:out value="${ list.orginlFilNm}"/></span>
<span class="file-list__item-size fileSz">(<c:out value="${ list.filMg}"/> KB)</span>
</a>
<button type="button" class="file-list__delete fileDl" onclick="deleteFile(this, ${ status.index });"> <!-- fn_delete_imgFile('1') deleteFile(this, 1) -->
<span class="visually-hidden">파일 삭제</span>
</button>
</li>
</c:if>
</ul>
</div>
</td>
<td>
<input type="hidden" name="mainSetupItemInnb" value=""/>
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="요청 URL" name="itmeCnncUrl" value="">
</td>
<td>
<button class="circle-btn delete" type="button" onclick="fn_delete_tr_main('bannerPopupTable', 2); "><span class="visually-hidden">삭제</span></button>
</td>
</tr>
</c:otherwise>
</c:choose>
</tbody>
</table>
</div>
</form>
<p class="fyi blue-7">이미지 사이즈: 가로 ${width}px, 세로 ${height}px 권장</p>
</div>
<div class="modal-footer">
<a href="#" rel="modal:close" class="btn outline">취소</a>
<button class="btn primary" onclick="fn_popup_regist('bannerPopupRegistForm', 'mainSetupItemInnb', '<c:out value="${ resultMap.paramVO.relmTdId }"/>', 'rolling-banner-pop', '<c:out value="${ resultMap.resultPopupList.resultContent.mainSetupInnb }"/>', '<c:out value="${ resultMap.paramVO.relmDvCd }"/>' );">저장</button>
</div>
</div>

View File

@@ -0,0 +1,154 @@
<%@ page import="java.util.Date" %>
<%@ 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"%>
<%--
Class Name : SiteContentManageU.jsp
Description : 사이트 메인페이지 관리 jsp
Modification Information
수정일 수정자 수정내용
------- -------- ---------------------------
2024-03-19 추지훈 최초 생성
--%>
<script>
$(document).ready(function() {
const containers = document.querySelectorAll('.modal .emoji-container');
// 이모지마트 생성(공통)
containers.forEach((container, index) => {
const button = container.querySelector('.emoji-button');
if (!button) return;
const picker = new EmojiMart.Picker({
onEmojiSelect: emoji => {
const input = container.querySelector('.emoji-input');
input.value += emoji.native;
},
onClickOutside: (e) => {
if (e.target !== button)
picker.style.display = 'none';
},
locale: 'kr',
});
picker.style.display = 'none';
document.body.appendChild(picker);
button.addEventListener('click', () => {
picker.style.display = picker.style.display === 'none' ? 'flex' : 'none';
const rect = button.getBoundingClientRect();
picker.style.position = 'absolute';
picker.style.left = rect.left+'px';
picker.style.top = rect.bottom + window.scrollY+'px';
picker.style.zIndex = 1000;
});
});
<%--
const hiddenTdVal = '<c:out value="${ resultMap.paramVO.relmTdId }"/>';
const hiddenTdList = fn_get_popup_data(hiddenTdVal);
console.log("hiddenTdList", hiddenTdList);
if (hiddenTdList != null && hiddenTdList.length > 0) {
// 첫 번째 요소만 처리
let firstData = hiddenTdList[0];
console.log("첫 번째 요소 data : ", firstData);
// 메인 타이틀 설정
$('input[name="mainSj"]').val(firstData.mainSj);
// 서브 타이틀 설정
$('input[name="subSj"]').val(firstData.subSj);
}
--%>
});
</script>
<!-- 베스트 리뷰, 매거진 설정 팝업 -->
<div id="best-review-pop" class="modal">
<div class="modal-header">
<h4>
<c:choose>
<c:when test="${ resultMap.resultPopupList.resultContent.relmDvCd eq '10'}">
매거진
</c:when>
<c:when test="${ resultMap.resultPopupList.resultContent.relmDvCd eq '09'}">
베스트 리뷰
</c:when>
</c:choose>
설정
</h4>
</div>
<div class="modal-content">
<h3 class="content-section__inner-title">내용</h3>
<form id="bbscttRegistForm">
<div class="table-wrapper">
<input type="hidden" id="deleteContentsItemList" name="deleteContentsItemList" value=""/>
<input type="hidden" id="mainSiteInnb" name="mainSiteInnb" value="<c:out value="${ resultMap.paramVO.mainSiteInnb }"/>"/>
<table class="table">
<caption>해당 테이블에 대한 설명</caption>
<colgroup>
<col style="width: 15%;">
<col>
</colgroup>
<tbody>
<tr>
<th>서브 타이틀</th>
<td>
<div class="td-inner">
<c:choose>
<c:when test="${ not empty resultMap.resultPopupList.result}">
<c:forEach items="${ resultMap.resultPopupList.result }" var="list" varStatus="status">
<c:if test="${ status.first }">
<input type="hidden" name="mainSetupItemInnb" value="${ list.mainSetupItemInnb }"/>
</c:if>
</c:forEach>
</c:when>
<c:otherwise>
<input type="hidden" name="mainSetupItemInnb" value=""/>
</c:otherwise>
</c:choose>
<input type="hidden" name="mainSetupInnb" value="<c:out value="${ resultMap.resultPopupList.resultContent.mainSetupInnb }"/>"/>
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="" name="subSj"
value="<c:out value="${ resultMap.resultPopupList.resultContent.subSj }"/>">
</div>
</td>
</tr>
<tr>
<th>메인 타이틀</th>
<td>
<div class="td-inner">
<div class="emoji-container">
<input class="input-text full emoji-input" type="text" title="해당 인풋에 대한 설명" name="mainSj"
placeholder="" value="<c:out value="${ resultMap.resultPopupList.resultContent.mainSj }"/>">
<button class="btn sm dark emoji-button" type="button" onclick="initializeEmojiPicker(event)">
<i class=" icon icon_emoji"></i>
이모지
</button>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</form>
</div>
<div class="modal-footer">
<a href="#" rel="modal:close" class="btn outline">취소</a>
<button class="btn primary" type="button" onclick="fn_popup_regist('bbscttRegistForm', 'mainSetupInnb', '<c:out value="${ resultMap.paramVO.relmTdId }"/>', 'best-review-pop', '<c:out value="${ resultMap.resultPopupList.resultContent.mainSetupInnb }"/>', '<c:out value="${ resultMap.paramVO.relmDvCd }"/>' );">저장</button>
</div>
</div>

View File

@@ -0,0 +1,190 @@
<%@ page import="java.util.Date" %>
<%@ 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"%>
<%--
Class Name : SiteContentBrandPopup.jsp
Description : 브랜드 소개 설정 팝업 jsp
Modification Information
수정일 수정자 수정내용
------- -------- ---------------------------
2024-02-19 추지훈 최초 생성
--%>
<!-- 인스타그램(SNS) 설정 팝업 -->
<div id="brand-introduce-pop" class="modal" style="max-width: 800px;">
<div class="modal-header">
<h4>브랜드 소개 설정</h4>
</div>
<div class="modal-content" style="height: 400px;">
<form id="brandRegistForm">
<div class="table-wrapper">
<input type="hidden" id="deleteContentsItemList" name="deleteContentsItemList" value=""/>
<input type="hidden" id="mainSiteInnb" name="mainSiteInnb" value="<c:out value="${ resultMap.paramVO.mainSiteInnb }"/>"/>
<table class="table vertical">
<caption>해당 테이블에 대한 설명</caption>
<colgroup>
<col style="width: 20%;">
<col style="width: 20%;">
<col>
</colgroup>
<thead>
<tr>
<th>첨부 파일</th>
<th>권장사이즈</th>
<th>연결 URL</th>
</tr>
</thead>
<tbody id="popupListTbody">
<c:choose>
<c:when test="${ not empty resultMap.resultPopupList.result && fn:length( resultMap.resultPopupList.result ) > 0 }">
<c:forEach items="${ resultMap.resultPopupList.result }" var="list" varStatus="status">
<tr>
<td>
<div class="d-flex flex-col align-items-start gap-5">
<c:set var = "display" value = ""/>
<c:if test = "${not empty list.sysFilNm}">
<c:set var = "display" value = "display:none;"/>
</c:if>
<div class="input-file" style="${display}">
<input type="hidden" id="fileAt${ status.index }" name="fileAt" value=""/>
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.extensions.images')" var="acceptFileExtensions"/>
<input type="file" id="fileUpload${ status.index }" name="files" title="아이콘파일" accept="<c:out value="${ acceptFileExtensions }"/>" multiple="multiple" onchange="addFilesPopup(event, 1, '#fileListBanner${ status.index }');"/>
<label for="fileUpload${ status.index }">파일선택</label>
</div>
<ul class="file-list" id="fileListBanner${ status.index }">
<c:if test="${ not empty list.sysFilNm}">
<li id="${ list.mainSetupItemInnb}">
<a href="#" id="${ list.orginlFilNm}${ status.index }" onclick="downloadFile(this,'${resultMap.paramVO.sopmalCd}','MANC', ${ status.index });">
<i class="icon icon_file-list mr-2"></i>
<span class="file-list__item-title fileNm"><c:out value="${ list.orginlFilNm}"/></span>
<span class="file-list__item-size fileSz">(<c:out value="${ list.filMg}"/> KB)</span>
</a>
<button type="button" class="file-list__delete fileDl" onclick="fn_delete_file_at.call(this); deleteFile(this,'${resultMap.paramVO.sopmalCd}','MANC',${status.index});"> <!-- fn_delete_imgFile('1') deleteFile(this, 1) -->
<span class="visually-hidden">파일 삭제</span>
</button>
</li>
</c:if>
</ul>
</div>
</td>
<td><span class="blue-7">620 * 400</span></td>
<td>
<input type="hidden" name="mainSetupItemInnb" value="<c:out value="${ list.mainSetupItemInnb }"/>"/>
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="요청 URL" name="itmeCnncUrl" value="<c:out value="${ list.itmeCnncUrl }"/>">
</td>
</tr>
</c:forEach>
</c:when>
<c:otherwise>
<tr>
<td>
<div class="d-flex flex-col align-items-start gap-5">
<div class="input-file">
<input type="hidden" id="fileAt1" name="fileAt" value=""/>
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.extensions.images')" var="acceptFileExtensions"/>
<input type="file" id="fileUpload1" name="files" title="아이콘파일" accept="<c:out value="${ acceptFileExtensions }"/>" multiple="multiple" onchange="addFilesPopup(event, 1, '#fileListBanner1');"/>
<label for="fileUpload1">파일선택</label>
</div>
<ul class="file-list" id="fileListBanner1">
<c:if test="${ not empty list.sysFilNm}">
<li id="${ list.sysFilNm}">
<a href="#" id="${ list.orginlFilNm}1" onclick="downloadFile(this, 1);">
<i class="icon icon_file-list mr-2"></i>
<span class="file-list__item-title fileNm"><c:out value="${ list.orginlFilNm}"/></span>
<span class="file-list__item-size fileSz">(<c:out value="${ list.filMg}"/> KB)</span>
</a>
<button type="button" class="file-list__delete fileDl" onclick="deleteFile(this, 1); "> <!-- fn_delete_imgFile('1') deleteFile(this, 1) -->
<span class="visually-hidden">파일 삭제</span>
</button>
</li>
</c:if>
</ul>
</div>
</td>
<td><span class="blue-7">620 * 400</span></td>
<td>
<input type="hidden" name="mainSetupItemInnb" value=""/>
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="요청 URL" name="itmeCnncUrl" value="">
</td>
</tr>
<tr>
<td>
<div class="d-flex flex-col align-items-start gap-5">
<div class="input-file">
<input type="hidden" id="fileAt2" name="fileAt" value=""/>
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.extensions.images')" var="acceptFileExtensions"/>
<input type="file" id="fileUpload2" name="files" title="아이콘파일" accept="<c:out value="${ acceptFileExtensions }"/>" multiple="multiple" onchange="addFilesPopup(event, 1, '#fileListBanner2');"/>
<label for="fileUpload2">파일선택</label>
</div>
<ul class="file-list" id="fileListBanner2">
<c:if test="${ not empty list.sysFilNm}">
<li id="${ list.sysFilNm}">
<a href="#" id="${ list.orginlFilNm}2" onclick="downloadFile(this, 2);">
<i class="icon icon_file-list mr-2"></i>
<span class="file-list__item-title fileNm"><c:out value="${ list.orginlFilNm}"/></span>
<span class="file-list__item-size fileSz">(<c:out value="${ list.filMg}"/> KB)</span>
</a>
<button type="button" class="file-list__delete fileDl" onclick="deleteFile(this, 2); "> <!-- fn_delete_imgFile('1') deleteFile(this, 1) -->
<span class="visually-hidden">파일 삭제</span>
</button>
</li>
</c:if>
</ul>
</div>
</td>
<td rowspan="2"><span class="blue-7">620 * 180</span></td>
<td>
<input type="hidden" name="mainSetupItemInnb" value=""/>
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="요청 URL" name="itmeCnncUrl" value="">
</td>
</tr>
<tr>
<td>
<div class="d-flex flex-col align-items-start gap-5">
<div class="input-file">
<input type="hidden" id="fileAt3" name="fileAt" value=""/>
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.extensions.images')" var="acceptFileExtensions"/>
<input type="file" id="fileUpload3" name="files" title="아이콘파일" accept="<c:out value="${ acceptFileExtensions }"/>" multiple="multiple" onchange="addFilesPopup(event, 1, '#fileListBanner3');"/>
<label for="fileUpload3">파일선택</label>
</div>
<ul class="file-list" id="fileListBanner3">
<c:if test="${ not empty list.sysFilNm}">
<li id="${ list.sysFilNm}">
<a href="#" id="${ list.orginlFilNm}3" onclick="downloadFile(this, 3);">
<i class="icon icon_file-list mr-2"></i>
<span class="file-list__item-title fileNm"><c:out value="${ list.orginlFilNm}"/></span>
<span class="file-list__item-size fileSz">(<c:out value="${ list.filMg}"/> KB)</span>
</a>
<button type="button" class="file-list__delete fileDl" onclick="deleteFile(this, 3); "> <!-- fn_delete_imgFile('1') deleteFile(this, 1) -->
<span class="visually-hidden">파일 삭제</span>
</button>
</li>
</c:if>
</ul>
</div>
</td>
<td>
<input type="hidden" name="mainSetupItemInnb" value=""/>
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="요청 URL" name="itmeCnncUrl" value="">
</td>
</tr>
</c:otherwise>
</c:choose>
</tbody>
</table>
</div>
</form>
</div>
<div class="modal-footer">
<a href="#" rel="modal:close" class="btn outline">취소</a>
<button class="btn primary" type="button" onclick="fn_popup_regist('brandRegistForm', 'mainSetupItemInnb', '<c:out value="${ resultMap.paramVO.relmTdId }"/>', 'brand-introduce-pop', '<c:out value="${ resultMap.resultPopupList.resultContent.mainSetupInnb }"/>', '<c:out value="${ resultMap.paramVO.relmDvCd }"/>' );">저장</button>
</div>
</div>
<script src="/admin/js/script.js" defer=""></script>

View File

@@ -0,0 +1,304 @@
<%@ page import="java.util.Date" %>
<%@ 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"%>
<%--
Class Name : SiteContentManageU.jsp
Description : 사이트 메인페이지 관리 jsp
Modification Information
수정일 수정자 수정내용
------- -------- ---------------------------
2024-02-19 추지훈 최초 생성
--%>
<script>
$(document).ready(function() {
$('#boardRegistForm').on('keydown', function(e) {
if (e.keyCode == 13) {
e.preventDefault();
$('#registBtn').trigger("click");
}
});
const containers = document.querySelectorAll('.modal .emoji-container');
// 이모지마트 생성(공통)
containers.forEach((container, index) => {
const button = container.querySelector('.emoji-button');
if (!button) return;
const picker = new EmojiMart.Picker({
onEmojiSelect: emoji => {
const input = container.querySelector('.emoji-input');
input.value += emoji.native;
},
onClickOutside: (e) => {
if (e.target !== button)
picker.style.display = 'none';
},
locale: 'kr',
});
picker.style.display = 'none';
document.body.appendChild(picker);
button.addEventListener('click', () => {
picker.style.display = picker.style.display === 'none' ? 'flex' : 'none';
const rect = button.getBoundingClientRect();
picker.style.position = 'absolute';
picker.style.left = rect.left+'px';
picker.style.top = rect.bottom + window.scrollY+'px';
picker.style.zIndex = 1000;
});
});
});
</script>
<!-- FAQ 설정 팝업 -->
<div id="faq-pop" class="modal" style="max-width: 1000px;">
<div class="modal-header">
<h4>FAQ 설정</h4>
</div>
<div class="modal-content" style="height: 400px;">
<h3 class="content-section__inner-title">내용</h3>
<form id="boardRegistForm">
<input type="hidden" id="deleteContentsItemList" name="deleteContentsItemList" value=""/>
<input type="hidden" id="mainSiteInnb" name="mainSiteInnb" value="<c:out value="${ resultMap.paramVO.mainSiteInnb }"/>"/>
<c:choose>
<c:when test="${ not empty resultMap.resultPopupList.result }">
<c:forEach var="list" items="${ resultMap.resultPopupList.result }" varStatus="status">
<c:if test="${ status.first }">
<div class="table-wrapper">
<table class="table">
<caption>해당 테이블에 대한 설명</caption>
<colgroup>
<col style="width: 15%;">
<col style="width: 35%;">
<col style="width: 15%;">
<col style="width: 35%;">
</colgroup>
<tbody id="popupListTbody">
<tr>
<th>FAQ<br>메인 타이틀</th>
<td>
<div class="td-inner">
<div class="emoji-container">
<input type="hidden" name="mainSetupItemInnb" value="<c:out value="${ list.mainSetupItemInnb }"/>"/>
<input class="input-text full emoji-input" type="text" title="FAQ 메인 타이틀" name="itemMainSj"
placeholder="" value="<c:out value="${ list.itemMainSj }"/>"/>
<button class="btn sm dark emoji-button" type="button" onclick="initializeEmojiPicker(event)">
<i class=" icon icon_emoji"></i>
이모지
</button>
</div>
</div>
</td>
<th>FAQ<br>서브 타이틀</th>
<td>
<div class="td-inner">
<input class="input-text full" type="text" title="FAQ 서브타이틀" placeholder="" name="itemSubSj"
value="<c:out value="${ list.itemSubSj }"/>"/>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</c:if>
<c:if test="${ status.index == 1 }">
<div class="table-wrapper">
<table class="table">
<caption>해당 테이블에 대한 설명</caption>
<colgroup>
<col style="width: 15%;">
<col style="width: 35%;">
<col style="width: 15%;">
<col style="width: 35%;">
</colgroup>
<tbody>
<tr>
<th>이용안내<br>메인 타이틀</th>
<td>
<div class="td-inner">
<div class="emoji-container">
<input type="hidden" name="mainSetupItemInnb" value="<c:out value="${ list.mainSetupItemInnb }"/>"/>
<input class="input-text full emoji-input" type="text" title="해당 인풋에 대한 설명" name="itemMainSj"
placeholder="" value="<c:out value="${ list.itemMainSj }"/>"/>
<button class="btn sm dark emoji-button" type="button" onclick="initializeEmojiPicker(event)">
<i class=" icon icon_emoji"></i>
이모지
</button>
</div>
</div>
</td>
<th>이용안내<br>서브 타이틀</th>
<td>
<div class="td-inner">
<div class="emoji-container">
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="" name="itemSubSj"
value="<c:out value="${ list.itemSubSj }"/>"/>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</c:if>
<c:if test="${ status.last }">
<div class="table-wrapper">
<table class="table">
<caption>해당 테이블에 대한 설명</caption>
<colgroup>
<col style="width: 15%;">
<col style="width: 35%;">
<col style="width: 15%;">
<col style="width: 35%;">
</colgroup>
<tbody id="popupListTbody2">
<tr>
<th>고객센터<br>메인 타이틀</th>
<td>
<div class="td-inner">
<div class="emoji-container">
<input type="hidden" name="mainSetupItemInnb" value="<c:out value="${ list.mainSetupItemInnb }"/>"/>
<input class="input-text full emoji-input" type="text" title="해당 인풋에 대한 설명" name="cscMainSj"
placeholder="" value="<c:out value="${ list.cscMainSj }"/>"/>
<button class="btn sm dark emoji-button" type="button" onclick="initializeEmojiPicker(event)">
<i class=" icon icon_emoji"></i>
이모지
</button>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</c:if>
</c:forEach>
</c:when>
<c:otherwise>
<div class="table-wrapper">
<table class="table">
<caption>해당 테이블에 대한 설명</caption>
<colgroup>
<col style="width: 15%;">
<col style="width: 35%;">
<col style="width: 15%;">
<col style="width: 35%;">
</colgroup>
<tbody >
<tr>
<th>FAQ<br>메인 타이틀</th>
<td>
<div class="td-inner">
<div class="emoji-container">
<input type="hidden" name="mainSetupItemInnb" value=""/>
<input class="input-text full emoji-input" type="text" title="FAQ 메인 타이틀" name="itemMainSj"
placeholder="" value=""/>
<button class="btn sm dark emoji-button" type="button" onclick="initializeEmojiPicker(event)">
<i class=" icon icon_emoji"></i>
이모지
</button>
</div>
</div>
</td>
<th>FAQ<br>서브 타이틀</th>
<td>
<div class="td-inner">
<input class="input-text full" type="text" title="FAQ 서브타이틀" placeholder="" name="itemSubSj"
value=""/>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="table-wrapper">
<table class="table">
<caption>해당 테이블에 대한 설명</caption>
<colgroup>
<col style="width: 15%;">
<col style="width: 35%;">
<col style="width: 15%;">
<col style="width: 35%;">
</colgroup>
<tbody id="">
<tr>
<th>이용안내<br>메인 타이틀</th>
<td>
<div class="td-inner">
<div class="emoji-container">
<input type="hidden" name="mainSetupItemInnb" value=""/>
<input class="input-text full emoji-input" type="text" title="해당 인풋에 대한 설명" name="itemMainSj"
placeholder="" value=""/>
<button class="btn sm dark emoji-button" type="button" onclick="initializeEmojiPicker(event)">
<i class=" icon icon_emoji"></i>
이모지
</button>
</div>
</div>
</td>
<th>이용안내<br>서브 타이틀</th>
<td>
<div class="td-inner">
<div class="emoji-container">
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="" name="itemSubSj"
value=""/>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="table-wrapper">
<table class="table">
<caption>해당 테이블에 대한 설명</caption>
<colgroup>
<col style="width: 15%;">
<col style="width: 35%;">
<col style="width: 15%;">
<col style="width: 35%;">
</colgroup>
<tbody >
<tr>
<th>고객센터<br>메인 타이틀</th>
<td>
<div class="td-inner">
<div class="emoji-container">
<input type="hidden" name="mainSetupItemInnb" value=""/>
<input class="input-text full emoji-input" type="text" title="해당 인풋에 대한 설명" name="cscMainSj"
placeholder="" value=""/>
<button class="btn sm dark emoji-button" type="button" onclick="initializeEmojiPicker(event)">
<i class=" icon icon_emoji"></i>
이모지
</button>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</c:otherwise>
</c:choose>
</form>
</div>
<div class="modal-footer">
<a href="#" rel="modal:close" class="btn outline">취소</a>
<button class="btn primary" id="registBtn" type="button" onclick="fn_popup_regist('boardRegistForm', 'mainSetupItemInnb', '<c:out value="${ resultMap.paramVO.relmTdId }"/>', 'faq-pop', '<c:out value="${ resultMap.resultPopupList.resultContent.mainSetupInnb }"/>', '<c:out value="${ resultMap.paramVO.relmDvCd }"/>' );">저장</button>
</div>
</div>
<script src="/mngr/js/script.js" defer=""></script>

View File

@@ -0,0 +1,374 @@
<%@ page import="java.util.Date" %>
<%@ 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"%>
<%--
Class Name : SiteContentManageU.jsp
Description : 사이트 메인페이지 관리 jsp
Modification Information
수정일 수정자 수정내용
------- -------- ---------------------------
2024-03-19 추지훈 최초 생성
--%>
<script>
$(document).ready(function() {
$('#goods2TyRegistForm').on('keydown', function(e) {
if (e.keyCode == 13) {
e.preventDefault();
$('#registBtn').trigger("click");
}
});
const containers = document.querySelectorAll('.modal .emoji-container');
// 이모지마트 생성(공통)
containers.forEach((container, index) => {
const button = container.querySelector('.emoji-button');
if (!button) return;
const picker = new EmojiMart.Picker({
onEmojiSelect: emoji => {
const input = container.querySelector('.emoji-input');
input.value += emoji.native;
},
onClickOutside: (e) => {
if (e.target !== button)
picker.style.display = 'none';
},
locale: 'kr',
});
picker.style.display = 'none';
document.body.appendChild(picker);
button.addEventListener('click', () => {
picker.style.display = picker.style.display === 'none' ? 'flex' : 'none';
const rect = button.getBoundingClientRect();
picker.style.position = 'absolute';
picker.style.left = rect.left+'px';
picker.style.top = rect.bottom + window.scrollY+'px';
picker.style.zIndex = 1000;
});
});
<%--
const hiddenTdVal = '<c:out value="${ resultMap.paramVO.relmTdId }"/>';
const hiddenTdList = fn_get_popup_data(hiddenTdVal);
console.log("hiddenTdList", hiddenTdList);
if (hiddenTdList != null && hiddenTdList.length > 0) {
// 첫 번째 요소만 처리
let firstData = hiddenTdList[0];
console.log("첫 번째 요소 data : ", firstData);
// 메인 타이틀 설정
$('input[name="mainSj"]').val(firstData.mainSj);
// 서브 타이틀 설정
$('input[name="subSj"]').val(firstData.subSj);
// 우측 메인 타이틀 설정
$('input[name="mainRghtSj"]').val(firstData.mainRghtSj);
// 우측 서브 타이틀 설정
$('input[name="subRghtSj"]').val(firstData.subRghtSj);
}
--%>
});
</script>
<!-- 상품 - 2열 타입 설정 팝업 -->
<div id="twoBytwo-type-pop" class="modal" style="max-width: 1000px;">
<div class="modal-header">
<h4>상품 - 2X2 타입 설정</h4>
</div>
<div class="modal-content" style="height: 500px;">
<h3 class="content-section__inner-title">내용 <span class="blue-7">*pc만 적용됨</span></h3>
<form id="goods2TyRegistForm">
<div class="table-wrapper">
<table class="table">
<caption>해당 테이블에 대한 설명</caption>
<colgroup>
<col style="width: 15%;">
<col style="width: 35%;">
<col style="width: 15%;">
<col style="width: 35%;">
</colgroup>
<tbody>
<tr>
<c:choose>
<c:when test="${ not empty resultMap.resultPopupList.result && fn:length(resultMap.resultPopupList.result) > 0 }">
<c:forEach var="list" items="${ resultMap.resultPopupList.result }" varStatus="status">
<c:if test="${ status.first }">
<th>좌측 영역<br>서브 타이틀</th>
<td>
<div class="td-inner">
<input type="hidden" name="mainSetupItemInnb" value="<c:out value="${ list.mainSetupItemInnb }"/>"/>
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="" name="itemSubSj"
value="<c:out value="${ list.itemSubSj }"/>"/>
</div>
</td>
</c:if>
<c:if test="${ status.last }">
<th>우측 영역<br>서브 타이틀</th>
<td>
<div class="td-inner">
<input type="hidden" name="mainSetupItemInnb" value="<c:out value="${ list.mainSetupItemInnb }"/>"/>
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="" name="itemSubSj"
value="<c:out value="${ list.itemSubSj }"/>"/>
</div>
</td>
</c:if>
</c:forEach>
</c:when>
<c:otherwise>
<th>좌측 영역<br>서브 타이틀</th>
<td>
<div class="td-inner">
<input type="hidden" name="mainSetupItemInnb" value=""/>
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="" name="itemSubSj"
value=""/>
</div>
</td>
<th>우측 영역<br>서브 타이틀</th>
<td>
<div class="td-inner">
<input type="hidden" name="mainSetupItemInnb" value=""/>
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="" name="itemSubSj"
value=""/>
</div>
</td>
</c:otherwise>
</c:choose>
</tr>
<tr>
<c:choose>
<c:when test="${ not empty resultMap.resultPopupList.result && fn:length(resultMap.resultPopupList.result) > 0 }">
<c:forEach var="list" items="${ resultMap.resultPopupList.result }" varStatus="status">
<c:if test="${ status.first }">
<th>좌측 영역<br>메인 타이틀</th>
<td>
<div class="td-inner">
<div class="emoji-container">
<input class="input-text full emoji-input" type="text" title="해당 인풋에 대한 설명" name="itemMainSj"
placeholder="" value="<c:out value="${ list.itemMainSj }"/>"/>
<button class="btn sm dark emoji-button" type="button" onclick="initializeEmojiPicker(event)">
<i class=" icon icon_emoji"></i>
이모지
</button>
</div>
</div>
</td>
</c:if>
<c:if test="${ status.last }">
<th>우측 영역<br>메인 타이틀</th>
<td>
<div class="td-inner">
<div class="emoji-container">
<input class="input-text full emoji-input" type="text" title="해당 인풋에 대한 설명" name="itemMainSj"
placeholder="" value="<c:out value="${ list.itemMainSj }"/>"/>
<button class="btn sm dark emoji-button" type="button" onclick="initializeEmojiPicker(event)">
<i class=" icon icon_emoji"></i>
이모지
</button>
</div>
</div>
</td>
</c:if>
</c:forEach>
</c:when>
<c:otherwise>
<th>좌측 영역<br>메인 타이틀</th>
<td>
<div class="td-inner">
<div class="emoji-container">
<input class="input-text full emoji-input" type="text" title="해당 인풋에 대한 설명" name="itemMainSj"
placeholder="" value=""/>
<button class="btn sm dark emoji-button" type="button" onclick="initializeEmojiPicker(event)">
<i class=" icon icon_emoji"></i>
이모지
</button>
</div>
</div>
</td>
<th>우측 영역<br>메인 타이틀</th>
<td>
<div class="td-inner">
<div class="emoji-container">
<input class="input-text full emoji-input" type="text" title="해당 인풋에 대한 설명" name="itemMainSj"
placeholder="" value=""/>
<button class="btn sm dark emoji-button" type="button" onclick="initializeEmojiPicker(event)">
<i class=" icon icon_emoji"></i>
이모지
</button>
</div>
</div>
</td>
</c:otherwise>
</c:choose>
</tr>
</tbody>
</table>
</div>
<div class="form-control-container mb-10">
<div class="left">
<h3 class="content-section__inner-title mb-0">상품 그룹</h3>
</div>
<div class="center">
</div>
<div class="right">
<button type="button" id="goodsGrpBtn" onclick="fn_open_goodsGrp();" class="btn xsm outline">설정</button>
</div>
</div>
<div class="table-wrapper">
<table class="table">
<caption>해당 테이블에 대한 설명</caption>
<colgroup>
<col style="width: 15%;">
<col style="width: 35%;">
<col style="width: 15%;">
<col style="width: 35%;">
</colgroup>
<tbody>
<tr>
<c:choose>
<c:when test="${ not empty resultMap.resultPopupList.result && fn:length(resultMap.resultPopupList.result) > 0 }">
<c:forEach items="${ resultMap.resultPopupList.result }" var="list" varStatus="status">
<c:if test="${ status.first }">
<th>좌측 상품 그룹</th>
<td>
<div class="select-box">
<select class="full" title="상품 그룹 목록" name="goodsGroupInnb">
<c:forEach var="cdList" items="${ resultMap.resultPopupList.goodsGroupList }" varStatus="status">
<c:choose>
<c:when test="${ list.goodsGroupInnb eq cdList.goodsGroupInnb }">
<option value="<c:out value="${ cdList.goodsGroupInnb }"/>" selected="selected"><c:out value="${ cdList.goodsGroupNm }"/></option>
</c:when>
<c:otherwise>
<option value="<c:out value="${ cdList.goodsGroupInnb }"/>"><c:out value="${ cdList.goodsGroupNm }"/></option>
</c:otherwise>
</c:choose>
</c:forEach>
</select>
</div>
</td>
</c:if>
<c:if test="${ status.last }">
<th>우측 상품 그룹</th>
<td>
<div class="select-box">
<select class="full" title="상품 그룹 목록" name="goodsGroupInnb">
<c:forEach var="cdList" items="${ resultMap.resultPopupList.goodsGroupList }" varStatus="">
<c:choose>
<c:when test="${ list.goodsGroupInnb eq cdList.goodsGroupInnb }">
<option value="<c:out value="${ cdList.goodsGroupInnb }"/>" selected="selected"><c:out value="${ cdList.goodsGroupNm }"/></option>
</c:when>
<c:otherwise>
<option value="<c:out value="${ cdList.goodsGroupInnb }"/>"><c:out value="${ cdList.goodsGroupNm }"/></option>
</c:otherwise>
</c:choose>
</c:forEach>
</select>
</div>
</td>
</c:if>
</c:forEach>
</c:when>
<c:otherwise>
<th>좌측 상품 그룹</th>
<td>
<div class="select-box">
<select class="full" title="상품 그룹 목록" name="goodsGroupInnb">
<c:forEach var="cdList" items="${ resultMap.resultPopupList.goodsGroupList }" varStatus="status">
<option value="<c:out value="${ cdList.goodsGroupInnb }"/>"><c:out value="${ cdList.goodsGroupNm }"/></option>
</c:forEach>
</select>
</div>
</td>
<th>우측 상품 그룹</th>
<td>
<div class="select-box">
<select class="full" title="상품 그룹 목록" name="goodsGroupInnb">
<c:forEach var="cdList" items="${ resultMap.resultPopupList.goodsGroupList }" varStatus="">
<option value="<c:out value="${ cdList.goodsGroupInnb }"/>"><c:out value="${ cdList.goodsGroupNm }"/></option>
</c:forEach>
</select>
</div>
</td>
</c:otherwise>
</c:choose>
</tr>
</tbody>
</table>
</div>
<%--
<div class="form-control-container mb-10">
<div class="left">
<h3 class="content-section__inner-title mb-0">상품 정보</h3>
</div>
<div class="center">
</div>
<div class="right">
<a href="" class="btn xsm outline">설정</a>
</div>
</div>
<div class="table-wrapper">
<table class="table">
<caption>해당 테이블에 대한 설명</caption>
<colgroup>
<col style="width: 15%;">
<col>
</colgroup>
<tbody>
<tr>
<th>
상품정보
</th>
<td>
<div class="td-inner">
<div class="select-box">
<select class="full" title="해당 셀렉트에 대한 설명" name="goodsExpsrInfoInnb">
<c:forEach var="list" items="${ resultMap.resultPopupList.goodsExpsrInfoList }" varStatus="">
<c:choose>
<c:when test="${ not empty resultMap.resultPopupList.resultContent.goodsExpsrInfoInnb && resultMap.resultPopupList.resultContent.goodsExpsrInfoInnb eq list.goodsExpsrInfoInnb }">
<option value="<c:out value="${ list.goodsExpsrInfoInnb }"/>" selected="selected" ><c:out value="${ list.goodsInfoSetupSj }"/></option>
</c:when>
<c:otherwise>
<option value="<c:out value="${ list.goodsExpsrInfoInnb }"/>"><c:out value="${ list.goodsInfoSetupSj }"/></option>
</c:otherwise>
</c:choose>
</c:forEach>
</select>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
--%>
</form>
</div>
<div class="modal-footer">
<a href="#" rel="modal:close" class="btn outline">취소</a>
<button class="btn primary" id="registBtn" type="button" onclick="fn_popup_regist('goods2TyRegistForm', 'mainSetupItemInnb', '<c:out value="${ resultMap.paramVO.relmTdId }"/>', 'twoBytwo-type-pop', '<c:out value="${ resultMap.resultPopupList.resultContent.mainSetupInnb }"/>', '<c:out value="${ resultMap.paramVO.relmDvCd }"/>' );">저장</button>
</div>
</div>
<script src="/admin/js/script.js" defer=""></script>

View File

@@ -0,0 +1,246 @@
<%@ page import="java.util.Date" %>
<%@ 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"%>
<%--
Class Name : SiteContentManageU.jsp
Description : 사이트 메인페이지 관리 jsp
Modification Information
수정일 수정자 수정내용
------- -------- ---------------------------
2024-02-19 추지훈 최초 생성
--%>
<script>
$(document).ready(function() {
const containers = document.querySelectorAll('.modal .emoji-container');
// 이모지마트 생성(공통)
containers.forEach((container, index) => {
const button = container.querySelector('.emoji-button');
if (!button) return;
const picker = new EmojiMart.Picker({
onEmojiSelect: emoji => {
const input = container.querySelector('.emoji-input');
input.value += emoji.native;
},
onClickOutside: (e) => {
if (e.target !== button)
picker.style.display = 'none';
},
locale: 'kr',
});
picker.style.display = 'none';
document.body.appendChild(picker);
button.addEventListener('click', () => {
picker.style.display = picker.style.display === 'none' ? 'flex' : 'none';
const rect = button.getBoundingClientRect();
picker.style.position = 'absolute';
picker.style.left = rect.left+'px';
picker.style.top = rect.bottom + window.scrollY+'px';
picker.style.zIndex = 1000;
});
});
<%--
const hiddenTdVal = '<c:out value="${ resultMap.paramVO.relmTdId }"/>';
const hiddenTdList = fn_get_popup_data(hiddenTdVal);
console.log("hiddenTdList", hiddenTdList);
if (hiddenTdList != null && hiddenTdList.length > 0) {
// 첫 번째 요소만 처리
let firstData = hiddenTdList[0];
console.log("첫 번째 요소 data : ", firstData);
// 메인 타이틀 설정
$('input[name="mainSj"]').val(firstData.mainSj);
// 서브 타이틀 설정
$('input[name="subSj"]').val(firstData.subSj);
}
--%>
});
</script>
<!-- 상품 - 4열 타입 설정 팝업 -->
<div id="four-type-pop" class="modal" style="max-width: 640px;">
<div class="modal-header">
<h4>상품 - 4열 타입 설정</h4>
</div>
<div class="modal-content" style="height: 400px;">
<h3 class="content-section__inner-title">내용</h3>
<form id="goods4TyRegistForm">
<div class="table-wrapper">
<input type="hidden" id="deleteContentsItemList" name="deleteContentsItemList" value=""/>
<input type="hidden" id="mainSiteInnb" name="mainSiteInnb" value="<c:out value="${ resultMap.paramVO.mainSiteInnb }"/>"/>
<table class="table">
<caption>해당 테이블에 대한 설명</caption>
<colgroup>
<col style="width: 15%;">
<col>
</colgroup>
<tbody>
<tr>
<th>서브 타이틀</th>
<td>
<div class="td-inner">
<input type="hidden" name="mainSetupInnb" value="<c:out value="${ resultMap.resultPopupList.resultContent.mainSetupInnb }"/>"/>
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="" name="subSj"
value="<c:out value="${ resultMap.resultPopupList.resultContent.subSj }"/>"/>
</div>
</td>
</tr>
<tr>
<th>메인 타이틀</th>
<td>
<div class="td-inner">
<div class="emoji-container">
<input class="input-text full emoji-input" type="text" title="해당 인풋에 대한 설명" name="mainSj"
placeholder="" value="<c:out value="${ resultMap.resultPopupList.resultContent.mainSj }"/>"/>
<button class="btn sm dark emoji-button" type="button" onclick="initializeEmojiPicker(event)">
<i class=" icon icon_emoji"></i>
이모지
</button>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="form-control-container mb-10">
<div class="left">
<h3 class="content-section__inner-title mb-0">상품 그룹</h3>
</div>
<div class="center">
</div>
<div class="right">
<button type="button" id="goodsGrpBtn" onclick="fn_open_goodsGrp();" class="btn xsm outline">설정</button>
</div>
</div>
<div class="table-wrapper">
<table class="table vertical">
<caption>해당 테이블에 대한 설명</caption>
<colgroup>
<col>
</colgroup>
<thead>
<tr>
<th>상품 그룹</th>
</tr>
</thead>
<tbody>
<c:choose>
<c:when test="${ not empty resultMap.resultPopupList.result }">
<c:forEach var="list" items="${ resultMap.resultPopupList.result }" varStatus="status">
<c:if test="${ status.first }">
<tr>
<td>
<input type="hidden" name="mainSetupItemInnb" value="${ list.mainSetupItemInnb }"/>
<div class="select-box">
<select class="full" title="상품 그룹 목록" name="goodsGroupInnb">
<c:forEach var="cdList" items="${ resultMap.resultPopupList.goodsGroupList }" varStatus="">
<c:choose>
<c:when test="${ list.goodsGroupInnb eq cdList.goodsGroupInnb }">
<option value="<c:out value="${ cdList.goodsGroupInnb }"/>" selected="selected"><c:out value="${ cdList.goodsGroupNm }"/></option>
</c:when>
<c:otherwise>
<option value="<c:out value="${ cdList.goodsGroupInnb }"/>"><c:out value="${ cdList.goodsGroupNm }"/></option>
</c:otherwise>
</c:choose>
</c:forEach>
</select>
</div>
</td>
</tr>
</c:if>
</c:forEach>
</c:when>
<c:otherwise>
<tr>
<td>
<input type="hidden" name="mainSetupItemInnb" value=""/>
<div class="select-box">
<select class="full" title="상품 그룹 목록" name="goodsGroupInnb">
<c:forEach var="cdList" items="${ resultMap.resultPopupList.goodsGroupList }" varStatus="">
<option value="<c:out value="${ cdList.goodsGroupInnb }"/>"><c:out value="${ cdList.goodsGroupNm }"/></option>
</c:forEach>
</select>
</div>
</td>
</tr>
</c:otherwise>
</c:choose>
</tbody>
</table>
</div>
<%--
<div class="form-control-container mb-10">
<div class="left">
<h3 class="content-section__inner-title mb-0">상품 정보</h3>
</div>
<div class="center">
</div>
<div class="right">
<a href="" class="btn xsm outline">설정</a>
</div>
</div>
<div class="table-wrapper">
<table class="table">
<caption>해당 테이블에 대한 설명</caption>
<colgroup>
<col style="width: 15%;">
<col>
</colgroup>
<tbody>
<tr>
<th>
상품정보
</th>
<td>
<div class="td-inner">
<div class="select-box">
<select class="full" title="해당 셀렉트에 대한 설명" name="goodsExpsrInfoInnb">
<c:forEach var="list" items="${ resultMap.resultPopupList.goodsExpsrInfoList }" varStatus="">
<c:choose>
<c:when test="${ not empty resultMap.resultPopupList.resultContent.goodsExpsrInfoInnb && resultMap.resultPopupList.resultContent.goodsExpsrInfoInnb eq list.goodsExpsrInfoInnb }">
<option value="<c:out value="${ list.goodsExpsrInfoInnb }"/>" selected="selected" ><c:out value="${ list.goodsInfoSetupSj }"/></option>
</c:when>
<c:otherwise>
<option value="<c:out value="${ list.goodsExpsrInfoInnb }"/>"><c:out value="${ list.goodsInfoSetupSj }"/></option>
</c:otherwise>
</c:choose>
</c:forEach>
</select>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
--%>
</form>
</div>
<div class="modal-footer">
<a href="#" rel="modal:close" class="btn outline">취소</a>
<button class="btn primary" type="button" onclick="fn_popup_regist('goods4TyRegistForm', 'mainSetupInnb', '<c:out value="${ resultMap.paramVO.relmTdId }"/>', 'four-type-pop', '<c:out value="${ resultMap.resultPopupList.resultContent.mainSetupInnb }"/>', '<c:out value="${ resultMap.paramVO.relmDvCd }"/>' );">저장</button>
</div>
</div>
<script src="/admin/js/script.js" defer=""></script>

View File

@@ -0,0 +1,302 @@
<%@ page import="java.util.Date" %>
<%@ 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"%>
<%--
Class Name : SiteContentManageU.jsp
Description : 사이트 메인페이지 관리 jsp
Modification Information
수정일 수정자 수정내용
------- -------- ---------------------------
2024-03-19 추지훈 최초 생성
--%>
<script>
$(document).ready(function() {
$('#goodsCatgryRegistForm').on('keydown', function(e) {
if (e.keyCode == 13) {
e.preventDefault();
$('#registBtn').trigger("click");
}
});
const containers = document.querySelectorAll('.modal .emoji-container');
// 이모지마트 생성(공통)
containers.forEach((container, index) => {
const button = container.querySelector('.emoji-button');
if (!button) return;
const picker = new EmojiMart.Picker({
onEmojiSelect: emoji => {
const input = container.querySelector('.emoji-input');
input.value += emoji.native;
},
onClickOutside: (e) => {
if (e.target !== button)
picker.style.display = 'none';
},
locale: 'kr',
});
picker.style.display = 'none';
document.body.appendChild(picker);
button.addEventListener('click', () => {
picker.style.display = picker.style.display === 'none' ? 'flex' : 'none';
const rect = button.getBoundingClientRect();
picker.style.position = 'absolute';
picker.style.left = rect.left+'px';
picker.style.top = rect.bottom + window.scrollY+'px';
picker.style.zIndex = 1000;
});
});
});
</script>
<!-- 상품 - 카테고리별 타입 설정 팝업 -->
<div id="category-type-pop" class="modal mainSetupModal" style="max-width: 640px;">
<div class="modal-header">
<h4>상품 - 카테고리별 타입 설정</h4>
</div>
<div class="modal-content" style="height: 500px;">
<h3 class="content-section__inner-title">내용</h3>
<form id="goodsCatgryRegistForm">
<div class="table-wrapper">
<input type="hidden" id="deleteContentsItemList" name="deleteContentsItemList" value=""/>
<input type="hidden" id="mainSiteInnb" name="mainSiteInnb" value="<c:out value="${ resultMap.paramVO.mainSiteInnb }"/>"/>
<table class="table">
<caption>해당 테이블에 대한 설명</caption>
<colgroup>
<col style="width: 15%;">
<col>
</colgroup>
<tbody>
<tr>
<th>서브 타이틀</th>
<td>
<div class="td-inner">
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="" name="subSj"
value="<c:out value="${ resultMap.resultPopupList.resultContent.subSj }"/>">
</div>
</td>
</tr>
<tr>
<th>메인 타이틀</th>
<td>
<div class="td-inner">
<div class="emoji-container">
<input class="input-text full emoji-input" type="text" title="해당 인풋에 대한 설명" name="mainSj"
placeholder="" value="<c:out value="${ resultMap.resultPopupList.resultContent.mainSj }"/>">
<button class="btn sm dark emoji-button" type="button" onclick="initializeEmojiPicker(event)">
<i class=" icon icon_emoji"></i>
이모지
</button>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="form-control-container mb-10">
<div class="left">
<h3 class="content-section__inner-title mb-0">카테고리</h3>
</div>
<div class="center">
</div>
<div class="right">
</div>
</div>
<div class="table-wrapper">
<table class="table vertical" id="goodsCatgryTyTable">
<caption>해당 테이블에 대한 설명</caption>
<colgroup>
<col style="width: 25%;">
<col style="width: 65%;">
<col>
</colgroup>
<thead>
<tr>
<th>카테고리</th>
<th>이미지</th>
<th>
<button class="circle-btn add" type="button" onclick="fn_add_tr('goodsCatgryTyTable', 0,'','','','N'); fn_category_initialize('categoryPopTbody');"><span class="visually-hidden">추가</span></button>
</th>
</tr>
</thead>
<tbody id="categoryPopTbody">
<c:choose>
<c:when test="${ not empty resultMap.resultPopupList.result && fn:length(resultMap.resultPopupList.result) > 0 }">
<c:forEach items="${ resultMap.resultPopupList.result }" var="list" varStatus="status">
<tr>
<td>
<div class="select-box">
<select title="해당 셀렉트에 대한 설명" name="ctgryId">
<c:choose>
<c:when test="${ not empty resultMap.resultPopupList.goodsCatgryList }">
<c:forEach var="ctgryList" items="${ resultMap.resultPopupList.goodsCatgryList }" varStatus="">
<c:choose>
<c:when test="${ list.ctgryId eq ctgryList.ctgryId}">
<option value="<c:out value="${ ctgryList.ctgryId }"/>" selected="selected"><c:out value="${ ctgryList.ctgryNm }"/></option>
</c:when>
<c:otherwise>
<option value="<c:out value="${ ctgryList.ctgryId }"/>"><c:out value="${ ctgryList.ctgryNm}"/></option>
</c:otherwise>
</c:choose>
</c:forEach>
</c:when>
</c:choose>
</select>
</div>
</td>
<td class="text-left">
<div class="d-flex align-items-center gap-5">
<c:set var="display" value=""/>
<c:if test="${not empty list.orginlFilNm}">
<c:set var="display" value="display:none;"/>
</c:if>
<div class="input-file" style="${display}">
<input type="hidden" id="fileAt${ status.index }" name="fileAt" value=""/>
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.extensions.images')" var="acceptFileExtensions"/>
<input type="file" id="fileUpload${ status.index }" name="files" title="아이콘파일" accept="<c:out value="${ acceptFileExtensions }"/>" multiple="multiple" onchange="addFilesPopup(event, 1, '#fileListCategory${ status.index }');"/>
<label for="fileUpload${ status.index }">파일선택</label>
</div>
<ul class="file-list" id="fileListCategory${ status.index }">
<c:if test="${ not empty list.sysFilNm}">
<li id="${ list.mainSetupItemInnb}">
<a href="#" id="${ list.orginlFilNm}${ status.index }" onclick="downloadFile(this, '${resultMap.paramVO.sopmalCd}','MANC', ${ status.index });">
<i class="icon icon_file-list mr-2"></i>
<span class="file-list__item-title fileNm"><c:out value="${ list.orginlFilNm}"/></span>
<span class="file-list__item-size fileSz">(<c:out value="${ list.filMg}"/> KB)</span>
</a>
<button type="button" class="file-list__delete fileDl" id="" onclick="fn_delete_file_at.call(this); deleteFile(this,'${resultMap.paramVO.sopmalCd}','MANC',${status.index});"> <!-- fn_delete_imgFile('1') deleteFile(this, 1) -->
<span class="visually-hidden">파일 삭제</span>
</button>
</li>
</c:if>
</ul>
</div>
</td>
<td>
<input type="hidden" name="mainSetupItemInnb" value="${ list.mainSetupItemInnb }"/>
<button class="circle-btn delete" type="button" onclick="fn_delete_tr_main('goodsCatgryTyTable', 1); "><span class="visually-hidden">삭제</span></button>
</td>
</tr>
</c:forEach>
</c:when>
<c:otherwise>
<tr>
<td>
<div class="select-box">
<select class="full" title="해당 셀렉트에 대한 설명" name="ctgryId">
<c:choose>
<c:when test="${ not empty resultMap.resultPopupList.goodsCatgryList }">
<c:forEach var="ctgryList" items="${ resultMap.resultPopupList.goodsCatgryList }" varStatus="">
<option value="<c:out value="${ ctgryList.ctgryId }"/>"><c:out value="${ ctgryList.ctgryNm}"/></option>
</c:forEach>
</c:when>
</c:choose>
</select>
</div>
</td>
<td class="text-left">
<div class="d-flex align-items-center gap-5">
<div class="input-file">
<input type="hidden" id="fileAt${ status.index }" name="fileAt" value=""/>
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.extensions.images')" var="acceptFileExtensions"/>
<input type="file" id="fileUpload${ status.index }" name="files" title="아이콘파일" accept="<c:out value="${ acceptFileExtensions }"/>" multiple="multiple" onchange="addFilesPopup(event, 1, '#fileListCategory${ status.index }');"/>
<label for="fileUpload${ status.index }">파일선택</label>
</div>
<ul class="file-list" id="fileListCategory${ status.index }">
<c:if test="${ not empty list.sysFilNm}">
<li id="${ list.sysFilNm}">
<a href="#" id="${ list.orginlFilNm}${ status.index }" onclick="downloadFile(this, ${ status.index });">
<i class="icon icon_file-list mr-2"></i>
<span class="file-list__item-title fileNm"><c:out value="${ list.orginlFilNm}"/></span>
<span class="file-list__item-size fileSz">(<c:out value="${ list.filMg}"/> KB)</span>
</a>
<button type="button" class="file-list__delete fileDl" onclick="deleteFile(this, ${ status.index }); "> <!-- fn_delete_imgFile('1') deleteFile(this, 1) -->
<span class="visually-hidden">파일 삭제</span>
</button>
</li>
</c:if>
</ul>
</div>
</td>
<td>
<input type="hidden" name="mainSetupItemInnb" value=""/>
<button class="circle-btn delete" type="button" onclick="fn_delete_tr_main('goodsCatgryTyTable', 1); "><span class="visually-hidden">삭제</span></button>
</td>
</tr>
</c:otherwise>
</c:choose>
</tbody>
</table>
<p class="fyi blue-7">이미지 사이즈: 가로 64px, 세로 64px 권장</p>
</div>
<%--
<div class="form-control-container mb-10">
<div class="left">
<h3 class="content-section__inner-title mb-0">상품 정보</h3>
</div>
<div class="center">
</div>
<div class="right">
<a href="" class="btn xsm outline">설정</a>
</div>
</div>
<div class="table-wrapper">
<table class="table">
<caption>해당 테이블에 대한 설명</caption>
<colgroup>
<col style="width: 15%;">
<col>
</colgroup>
<tbody>
<tr>
<th>
상품정보
</th>
<td>
<div class="td-inner">
<div class="select-box">
<select class="full" title="해당 셀렉트에 대한 설명" name="goodsExpsrInfoInnb">
<c:forEach var="list" items="${ resultMap.resultPopupList.goodsExpsrInfoList }" varStatus="">
<c:choose>
<c:when test="${ not empty resultMap.resultPopupList.resultContent.goodsExpsrInfoInnb && resultMap.resultPopupList.resultContent.goodsExpsrInfoInnb eq list.goodsExpsrInfoInnb }">
<option value="<c:out value="${ list.goodsExpsrInfoInnb }"/>" selected="selected" ><c:out value="${ list.goodsInfoSetupSj }"/></option>
</c:when>
<c:otherwise>
<option value="<c:out value="${ list.goodsExpsrInfoInnb }"/>"><c:out value="${ list.goodsInfoSetupSj }"/></option>
</c:otherwise>
</c:choose>
</c:forEach>
</select>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
--%>
</form>
</div>
<div class="modal-footer">
<a href="#" rel="modal:close" class="btn outline">취소</a>
<button class="btn primary" id="registBtn" type="button" onclick="fn_popup_regist('goodsCatgryRegistForm', 'mainSetupItemInnb', '<c:out value="${ resultMap.paramVO.relmTdId }"/>', 'category-type-pop', '<c:out value="${ resultMap.resultPopupList.resultContent.mainSetupInnb }"/>', '<c:out value="${ resultMap.resultPopupList.resultContent.relmDvCd }"/>' );">저장</button>
</div>
</div>
<script src="/mngr/js/script.js" defer=""></script>

View File

@@ -0,0 +1,248 @@
<%@ page import="java.util.Date" %>
<%@ 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"%>
<%--
Class Name : SiteContentManageU.jsp
Description : 사이트 메인페이지 관리 jsp
Modification Information
수정일 수정자 수정내용
------- -------- ---------------------------
2024-03-19 추지훈 최초 생성
--%>
<script src="https://cdn.jsdelivr.net/npm/@joeattardi/emoji-button@3.0.3/dist/index.min.js"></script>
<!-- 이모지 마트 -->
<!-- <script src="/mngr/vendor/emoji-mart/browser.js"></script> -->
<script>
$(document).ready(function() {
$('#goodsGroupRegistForm').on('keydown', function(e) {
if (e.keyCode == 13) {
e.preventDefault();
$('#registBtn').trigger("click");
}
});
const containers = document.querySelectorAll('.modal .emoji-container');
// 이모지마트 생성(공통)
containers.forEach((container, index) => {
const button = container.querySelector('.emoji-button');
if (!button) return;
const picker = new EmojiMart.Picker({
onEmojiSelect: emoji => {
const input = container.querySelector('.emoji-input');
input.value += emoji.native;
},
onClickOutside: (e) => {
if (e.target !== button)
picker.style.display = 'none';
},
locale: 'kr',
});
picker.style.display = 'none';
document.body.appendChild(picker);
button.addEventListener('click', () => {
picker.style.display = picker.style.display === 'none' ? 'flex' : 'none';
const rect = button.getBoundingClientRect();
picker.style.position = 'absolute';
picker.style.left = rect.left+'px';
picker.style.top = rect.bottom + window.scrollY+'px';
picker.style.zIndex = 1000;
});
});
});
</script>
<!-- 상품 - 그룹별 타입 설정 팝업 -->
<div id="group-type-pop" class="modal" style="max-width: 520px;">
<div class="modal-header">
<h4>상품 - 그룹별 타입 설정</h4>
</div>
<div class="modal-content" style="height: 500px;">
<h3 class="content-section__inner-title">내용</h3>
<form id="goodsGroupRegistForm">
<div class="table-wrapper">
<input type="hidden" id="deleteContentsItemList" name="deleteContentsItemList" value=""/>
<input type="hidden" id="mainSiteInnb" name="mainSiteInnb" value="<c:out value="${ resultMap.paramVO.mainSiteInnb }"/>"/>
<table class="table">
<caption>해당 테이블에 대한 설명</caption>
<colgroup>
<col style="width: 15%;">
<col>
</colgroup>
<tbody>
<tr>
<th>서브 타이틀</th>
<td>
<div class="td-inner">
<input class="input-text full" type="text" title="서브타이틀" placeholder="" name="subSj"
value="<c:out value="${ resultMap.resultPopupList.resultContent.subSj }"/>">
</div>
</td>
</tr>
<tr>
<th>메인 타이틀</th>
<td>
<div class="td-inner">
<div class="emoji-container">
<input class="input-text full emoji-input" type="text" title="메인 타이틀" name="mainSj" id="testId"
placeholder="" value="<c:out value="${ resultMap.resultPopupList.resultContent.mainSj }"/>">
<!-- <button class="btn sm dark emoji-button" type="button" onclick="emoji_open(this, 'modal')"> -->
<button class="btn sm dark emoji-button" type="button">
<i class="icon icon_emoji"></i> 이모지
</button>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="form-control-container mb-10">
<div class="left">
<h3 class="content-section__inner-title mb-0">상품 그룹</h3>
</div>
<div class="center">
</div>
<div class="right">
<button type="button" id="goodsGrpBtn" onclick="fn_open_goodsGrp();" class="btn xsm outline">설정</button>
</div>
</div>
<div class="table-wrapper">
<table class="table vertical" id="goodsGroupTyTable">
<caption>해당 테이블에 대한 설명</caption>
<colgroup>
<col style="width: 80%;">
<col>
</colgroup>
<thead>
<tr>
<th>상품 그룹</th>
<th>
<button class="circle-btn add" type="button" onclick="fn_add_tr('goodsGroupTyTable', 0, '','','','N');"><span class="visually-hidden">추가</span></button>
</th>
</tr>
</thead>
<tbody id="popupListTbody">
<c:choose>
<c:when test="${ not empty resultMap.resultPopupList.result && fn:length(resultMap.resultPopupList.result) > 0 }">
<c:forEach items="${ resultMap.resultPopupList.result }" var="list" varStatus="status">
<tr>
<td>
<div class="select-box">
<select class="full" title="상품 그룹 목록" name="goodsGroupInnb">
<option value="">상품을 선택하세요.</option>
<c:forEach var="cdList" items="${ resultMap.resultPopupList.goodsGroupList }" varStatus="">
<c:choose>
<c:when test="${ list.goodsGroupInnb eq cdList.goodsGroupInnb }">
<option value="<c:out value="${ cdList.goodsGroupInnb }"/>" selected="selected"><c:out value="${ cdList.goodsGroupNm }"/></option>
</c:when>
<c:otherwise>
<option value="<c:out value="${ cdList.goodsGroupInnb }"/>"><c:out value="${ cdList.goodsGroupNm }"/></option>
</c:otherwise>
</c:choose>
</c:forEach>
</select>
</div>
</td>
<td>
<input type="hidden" name="mainSetupItemInnb" value="${ list.mainSetupItemInnb }"/>
<button class="circle-btn delete" type="button" onclick="fn_delete_tr_main('goodsGroupTyTable', 1);"><span class="visually-hidden">삭제</span></button>
</td>
</tr>
</c:forEach>
</c:when>
<c:otherwise>
<tr>
<td>
<div class="select-box">
<select class="full" title="상품 그룹 목록" name="goodsGroupInnb">
<c:forEach var="list" items="${ resultMap.resultPopupList.goodsGroupList }" varStatus="">
<option value="<c:out value="${ list.goodsGroupInnb }"/>"><c:out value="${ list.goodsGroupNm }"/></option>
</c:forEach>
</select>
</div>
</td>
<td>
<input type="hidden" name="mainSetupItemInnb" value=""/>
<button class="circle-btn delete" type="button" onclick="fn_delete_tr_main('goodsGroupTyTable', 1); "><span class="visually-hidden">삭제</span></button>
</td>
</tr>
</c:otherwise>
</c:choose>
</tbody>
</table>
</div>
<%--
<div class="form-control-container mb-10">
<div class="left">
<h3 class="content-section__inner-title mb-0">상품 정보</h3>
</div>
<div class="center">
</div>
<div class="right">
<a href="" class="btn xsm outline">설정</a>
</div>
</div>
<div class="table-wrapper">
<table class="table">
<caption>해당 테이블에 대한 설명</caption>
<colgroup>
<col style="width: 15%;">
<col>
</colgroup>
<tbody>
<tr>
<th>
상품정보
</th>
<td>
<div class="td-inner">
<div class="select-box">
<select class="full" title="해당 셀렉트에 대한 설명" name="goodsExpsrInfoInnb">
<c:forEach var="list" items="${ resultMap.resultPopupList.goodsExpsrInfoList }" varStatus="">
<c:choose>
<c:when test="${ not empty resultMap.resultPopupList.resultContent.goodsExpsrInfoInnb && resultMap.resultPopupList.resultContent.goodsExpsrInfoInnb eq list.goodsExpsrInfoInnb }">
<option value="<c:out value="${ list.goodsExpsrInfoInnb }"/>" selected="selected" ><c:out value="${ list.goodsInfoSetupSj }"/></option>
</c:when>
<c:otherwise>
<option value="<c:out value="${ list.goodsExpsrInfoInnb }"/>"><c:out value="${ list.goodsInfoSetupSj }"/></option>
</c:otherwise>
</c:choose>
</c:forEach>
</select>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
--%>
</form>
</div>
<div class="modal-footer">
<a href="#" rel="modal:close" class="btn outline">취소</a>
<button class="btn primary" id="registBtn" type="button" onclick="fn_popup_regist('goodsGroupRegistForm', 'mainSetupItemInnb', '<c:out value="${ resultMap.paramVO.relmTdId }"/>', 'group-type-pop', '<c:out value="${ resultMap.resultPopupList.resultContent.mainSetupInnb }"/>', '<c:out value="${ resultMap.paramVO.relmDvCd }"/>' );">저장</button>
</div>
</div>
<script src="/mngr/js/script.js" defer=""></script>

View File

@@ -0,0 +1,351 @@
<%@ page import="java.util.Date" %>
<%@ 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"%>
<%--
Class Name : SiteContentManageU.jsp
Description : 사이트 메인페이지 관리 jsp
Modification Information
수정일 수정자 수정내용
------- -------- ---------------------------
2024-02-19 추지훈 최초 생성
--%>
<script>
$(document).ready(function() {
const containers = document.querySelectorAll('.modal .emoji-container');
// 이모지마트 생성(공통)
containers.forEach((container, index) => {
const button = container.querySelector('.emoji-button');
if (!button) return;
const picker = new EmojiMart.Picker({
onEmojiSelect: emoji => {
const input = container.querySelector('.emoji-input');
input.value += emoji.native;
},
onClickOutside: (e) => {
if (e.target !== button)
picker.style.display = 'none';
},
locale: 'kr',
});
picker.style.display = 'none';
document.body.appendChild(picker);
button.addEventListener('click', () => {
picker.style.display = picker.style.display === 'none' ? 'flex' : 'none';
const rect = button.getBoundingClientRect();
picker.style.position = 'absolute';
picker.style.left = rect.left+'px';
picker.style.top = rect.bottom + window.scrollY+'px';
picker.style.zIndex = 1000;
});
});
<%--
const hiddenTdVal = '<c:out value="${ resultMap.paramVO.relmTdId }"/>';
const hiddenTdList = fn_get_popup_data(hiddenTdVal);
console.log("hiddenTdList", hiddenTdList);
if (hiddenTdList != null && hiddenTdList.length > 0) {
// 첫 번째 요소만 처리
let firstData = hiddenTdList[0];
console.log("첫 번째 요소 data : ", firstData);
// 메인 타이틀 설정
$('input[name="mainSj"]').val(firstData.mainSj);
// 서브 타이틀 설정
$('input[name="subSj"]').val(firstData.subSj);
// 연결 URL 설정
$('input[name="cnncUrl"]').val(firstData.cnncUrl);
}
--%>
});
</script>
<!-- 상품 - 이미지배너 타입 설정 팝업 -->
<div id="imageBanner-type-pop" class="modal mainSetupModal" style="max-width: 640px;">
<div class="modal-header">
<h4>상품 - 이미지배너 타입 설정</h4>
</div>
<div class="modal-content" style="height: 500px;">
<h3 class="content-section__inner-title">내용</h3>
<form id="goodsImgRegistForm">
<div class="table-wrapper">
<input type="hidden" id="deleteContentsItemList" name="deleteContentsItemList" value=""/>
<input type="hidden" id="mainSiteInnb" name="mainSiteInnb" value="<c:out value="${ resultMap.paramVO.mainSiteInnb }"/>"/>
<table class="table">
<caption>해당 테이블에 대한 설명</caption>
<colgroup>
<col style="width: 15%;">
<col>
</colgroup>
<tbody>
<tr>
<th>서브 타이틀</th>
<td>
<div class="td-inner">
<input type="hidden" name="mainSetupInnb" value="<c:out value="${ resultMap.resultPopupList.resultContent.mainSetupInnb }"/>"/>
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="" name="subSj"
value="<c:out value="${ resultMap.resultPopupList.resultContent.subSj }"/>"/>
</div>
</td>
</tr>
<tr>
<th>메인 타이틀</th>
<td>
<div class="td-inner">
<div class="emoji-container">
<input class="input-text full emoji-input" type="text" title="해당 인풋에 대한 설명" name="mainSj"
placeholder="" value="<c:out value="${ resultMap.resultPopupList.resultContent.mainSj }"/>"/>
<button class="btn sm dark emoji-button" type="button" onclick="initializeEmojiPicker(event)">
<i class=" icon icon_emoji"></i>
이모지
</button>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<p class="fyi blue-7">이미지 사이즈: 가로 410px, 세로 410px 권장</p>
<div class="table-wrapper">
<table class="table">
<caption>해당 테이블에 대한 설명</caption>
<colgroup>
<col style="width: 15%;">
<col>
</colgroup>
<tbody>
<c:choose>
<c:when test="${ not empty resultMap.resultPopupList.result }">
<c:forEach var="list" items="${ resultMap.resultPopupList.result }" varStatus="status">
<c:if test="${ status.first }">
<tr>
<th>이미지</th>
<td>
<div class="td-inner">
<div class="d-flex align-items-center gap-5">
<div class="input-file" <c:if test = "${not empty list.sysFilNm}">style="display: none;" </c:if>>
<input type="hidden" id="fileAt${ status.index }" name="fileAt" value=""/>
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.extensions.images')" var="acceptFileExtensions"/>
<input type="file" id="fileUpload${ status.index }" name="files" title="아이콘파일" accept="<c:out value="${ acceptFileExtensions }"/>" multiple="multiple" onchange="addFilesPopup(event, 1, '#fileListImg${ status.index }');"/>
<label for="fileUpload${ status.index }">파일선택</label>
</div>
<ul class="file-list" id="fileListImg${ status.index }">
<c:if test="${ not empty list.sysFilNm}">
<li id="${ list.mainSetupItemInnb}">
<a href="#" id="${ list.orginlFilNm}${ status.index }" onclick="downloadFile(this,'${resultMap.paramVO.sopmalCd}','MANC', ${ status.index });">
<i class="icon icon_file-list mr-2"></i>
<span class="file-list__item-title fileNm"><c:out value="${ list.orginlFilNm}"/></span>
<span class="file-list__item-size fileSz">(<c:out value="${ list.filMg}"/> KB)</span>
</a>
<button type="button" class="file-list__delete fileDl" onclick="fn_delete_file_at.call(this); deleteFile(this, ${ status.index });"> <!-- fn_delete_imgFile('1') deleteFile(this, 1) -->
<span class="visually-hidden">파일 삭제</span>
</button>
</li>
</c:if>
</ul>
</div>
</div>
</td>
</tr>
<tr>
<th>URL</th>
<td>
<div class="td-inner">
<input type="hidden" name="mainSetupItemInnb" value="${ list.mainSetupItemInnb }"/>
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="" name="itmeCnncUrl"
value="<c:out value="${ list.itmeCnncUrl }"/>"/>
</div>
</td>
</tr>
</c:if>
</c:forEach>
</c:when>
<c:otherwise>
<tr>
<th>이미지</th>
<td>
<div class="td-inner">
<div class="d-flex align-items-center gap-5">
<div class="input-file">
<input type="hidden" id="fileAt${ status.index }" name="fileAt" value=""/>
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.extensions.images')" var="acceptFileExtensions"/>
<input type="file" id="fileUpload${ status.index }" name="files" title="아이콘파일" accept="<c:out value="${ acceptFileExtensions }"/>" multiple="multiple" onchange="addFilesPopup(event, 1, '#fileListImg${ status.index }');"/>
<label for="fileUpload${ status.index }">파일선택</label>
</div>
<ul class="file-list" id="fileListImg${ status.index }">
<c:if test="${ not empty list.sysFilNm}">
<li id="${ list.sysFilNm}">
<a href="#" id="${ list.orginlFilNm}${ status.index }" onclick="downloadFile(this, ${ status.index });">
<i class="icon icon_file-list mr-2"></i>
<span class="file-list__item-title fileNm"><c:out value="${ list.orginlFilNm}"/></span>
<span class="file-list__item-size fileSz">(<c:out value="${ list.filMg}"/> KB)</span>
</a>
<button type="button" class="file-list__delete fileDl" onclick="deleteFile(this, 1);"> <!-- fn_delete_imgFile('1') deleteFile(this, 1) -->
<span class="visually-hidden">파일 삭제</span>
</button>
</li>
</c:if>
</ul>
</div>
</div>
</td>
</tr>
<tr>
<th>URL</th>
<td>
<div class="td-inner">
<input type="hidden" name="mainSetupItemInnb" value=""/>
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="" name="itmeCnncUrl"
value=""/>
</div>
</td>
</tr>
</c:otherwise>
</c:choose>
</tbody>
</table>
</div>
<div class="form-control-container mb-10">
<div class="left">
<h3 class="content-section__inner-title mb-0">상품 그룹</h3>
</div>
<div class="center">
</div>
<div class="right">
<button type="button" id="goodsGrpBtn" onclick="fn_open_goodsGrp();" class="btn xsm outline">설정</button>
</div>
</div>
<div class="table-wrapper">
<table class="table vertical">
<caption>해당 테이블에 대한 설명</caption>
<colgroup>
<col>
</colgroup>
<thead>
<tr>
<th>상품 그룹</th>
</tr>
</thead>
<tbody>
<c:choose>
<c:when test="${ not empty resultMap.resultPopupList.result }">
<c:forEach var="list" items="${ resultMap.resultPopupList.result }" varStatus="status">
<c:if test="${ status.first }">
<tr>
<td>
<div class="select-box">
<select class="full" title="상품 그룹 목록" name="goodsGroupInnb">
<c:forEach var="cdList" items="${ resultMap.resultPopupList.goodsGroupList }" varStatus="">
<c:choose>
<c:when test="${ list.goodsGroupInnb eq cdList.goodsGroupInnb }">
<option value="<c:out value="${ cdList.goodsGroupInnb }"/>" selected="selected"><c:out value="${ cdList.goodsGroupNm }"/></option>
</c:when>
<c:otherwise>
<option value="<c:out value="${ cdList.goodsGroupInnb }"/>"><c:out value="${ cdList.goodsGroupNm }"/></option>
</c:otherwise>
</c:choose>
</c:forEach>
</select>
</div>
</td>
</tr>
</c:if>
</c:forEach>
</c:when>
<c:otherwise>
<tr>
<td>
<div class="select-box">
<select class="full" title="상품 그룹 목록" name="goodsGroupInnb">
<c:forEach var="cdList" items="${ resultMap.resultPopupList.goodsGroupList }" varStatus="">
<option value="<c:out value="${ cdList.goodsGroupInnb }"/>"><c:out value="${ cdList.goodsGroupNm }"/></option>
</c:forEach>
</select>
</div>
</td>
</tr>
</c:otherwise>
</c:choose>
</tbody>
</table>
</div>
<%--
<div class="form-control-container mb-10">
<div class="left">
<h3 class="content-section__inner-title mb-0">상품 정보</h3>
</div>
<div class="center">
</div>
<div class="right">
<a href="" class="btn xsm outline">설정</a>
</div>
</div>
<div class="table-wrapper">
<table class="table">
<caption>해당 테이블에 대한 설명</caption>
<colgroup>
<col style="width: 15%;">
<col>
</colgroup>
<tbody>
<tr>
<th>
상품정보
</th>
<td>
<div class="td-inner">
<div class="select-box">
<select class="full" title="해당 셀렉트에 대한 설명" name="goodsExpsrInfoInnb">
<c:forEach var="list" items="${ resultMap.resultPopupList.goodsExpsrInfoList }" varStatus="">
<c:choose>
<c:when test="${ not empty resultMap.resultPopupList.resultContent.goodsExpsrInfoInnb && resultMap.resultPopupList.resultContent.goodsExpsrInfoInnb eq list.goodsExpsrInfoInnb }">
<option value="<c:out value="${ list.goodsExpsrInfoInnb }"/>" selected="selected" ><c:out value="${ list.goodsInfoSetupSj }"/></option>
</c:when>
<c:otherwise>
<option value="<c:out value="${ list.goodsExpsrInfoInnb }"/>"><c:out value="${ list.goodsInfoSetupSj }"/></option>
</c:otherwise>
</c:choose>
</c:forEach>
</select>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
--%>
</form>
</div>
<div class="modal-footer">
<a href="#" rel="modal:close" class="btn outline">취소</a>
<button class="btn primary" type="button" onclick="fn_popup_regist('goodsImgRegistForm', 'mainSetupInnb', '<c:out value="${ resultMap.paramVO.relmTdId }"/>', 'imageBanner-type-pop', '<c:out value="${ resultMap.resultPopupList.resultContent.mainSetupInnb }"/>', '<c:out value="${ resultMap.paramVO.relmDvCd }"/>' );">저장</button>
</div>
</div>
<script src="/admin/js/script.js" defer=""></script>

View File

@@ -0,0 +1,369 @@
<%@ page import="java.util.Date" %>
<%@ 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"%>
<%--
Class Name : SiteContentManageU.jsp
Description : 사이트 메인페이지 관리 jsp
Modification Information
수정일 수정자 수정내용
------- -------- ---------------------------
2024-02-19 추지훈 최초 생성
--%>
<script>
$(document).ready(function() {
const containers = document.querySelectorAll('.modal .emoji-container');
// 이모지마트 생성(공통)
containers.forEach((container, index) => {
const button = container.querySelector('.emoji-button');
if (!button) return;
const picker = new EmojiMart.Picker({
onEmojiSelect: emoji => {
const input = container.querySelector('.emoji-input');
input.value += emoji.native;
},
onClickOutside: (e) => {
if (e.target !== button)
picker.style.display = 'none';
},
locale: 'kr',
});
picker.style.display = 'none';
document.body.appendChild(picker);
button.addEventListener('click', () => {
picker.style.display = picker.style.display === 'none' ? 'flex' : 'none';
const rect = button.getBoundingClientRect();
picker.style.position = 'absolute';
picker.style.left = rect.left+'px';
picker.style.top = rect.bottom + window.scrollY+'px';
picker.style.zIndex = 1000;
});
});
});
</script>
<!-- 상품 - URL타입 설정 팝업 -->
<c:choose>
<c:when test = "${resultMap.resultPopupList.resultContent.imgExpsrDvCd eq 'P'}"> <%--pc 환경--%>
<c:set var="height" value="700"/>
<c:set var="width" value="510"/>
</c:when>
<c:otherwise> <%--모바일 환경--%>
<c:set var="height" value="310"/>
<c:set var="width" value="332"/>
</c:otherwise>
</c:choose>
<div id="url-type-pop" class="modal mainSetupModal" style="max-width: 640px;">
<div class="modal-header">
<h4>상품 - URL타입 설정</h4>
</div>
<div class="modal-content" style="height: 500px;">
<h3 class="content-section__inner-title">내용</h3>
<form id="goodsUrlRegistForm">
<div class="table-wrapper">
<input type="hidden" id="deleteContentsItemList" name="deleteContentsItemList" value=""/>
<input type="hidden" id="mainSiteInnb" name="mainSiteInnb" value="<c:out value="${ resultMap.paramVO.mainSiteInnb }"/>"/>
<table class="table">
<caption>해당 테이블에 대한 설명</caption>
<colgroup>
<col style="width: 15%;">
<col>
</colgroup>
<tbody>
<tr>
<th>서브 타이틀</th>
<td>
<div class="td-inner">
<input type="hidden" name="mainSetupInnb" value="<c:out value="${ resultMap.resultPopupList.resultContent.mainSetupInnb }"/>"/>
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="" name="subSj"
value="<c:out value="${ resultMap.resultPopupList.resultContent.subSj }"/>"/>
</div>
</td>
</tr>
<tr>
<th>메인 타이틀</th>
<td>
<div class="td-inner">
<div class="emoji-container">
<input class="input-text full emoji-input" type="text" title="해당 인풋에 대한 설명" name="mainSj"
placeholder="" value="<c:out value="${ resultMap.resultPopupList.resultContent.mainSj }"/>"/>
<button class="btn sm dark emoji-button" type="button" onclick="initializeEmojiPicker(event)">
<i class=" icon icon_emoji"></i>
이모지
</button>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<p class="fyi blue-7">이미지 사이즈: 가로 ${width}px, 세로 ${height}px 권장</p>
<div class="table-wrapper">
<table class="table">
<caption>해당 테이블에 대한 설명</caption>
<colgroup>
<col style="width: 15%;">
<col>
</colgroup>
<tbody>
<c:choose>
<c:when test="${ not empty resultMap.resultPopupList.result}">
<c:forEach items="${ resultMap.resultPopupList.result }" var="list" varStatus="status">
<c:if test="${ status.first }">
<tr>
<th>첨부파일</th>
<td>
<div class="td-inner">
<div class="d-flex align-items-center gap-5">
<div class="input-file" <c:if test = "${not empty list.sysFilNm}">style="display:none;" </c:if>>
<input type="hidden" id="fileAt${ status.index }" name="fileAt" value=""/>
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.extensions.images')" var="acceptFileExtensions"/>
<input type="file" id="fileUpload${ status.index }" name="files" title="아이콘파일" accept="<c:out value="${ acceptFileExtensions }"/>" multiple="multiple" onchange="addFilesPopup(event, 1, '#fileListImg${ status.index }');"/>
<label for="fileUpload${ status.index }">파일선택</label>
</div>
<ul class="file-list" id="fileListImg${ status.index }">
<c:if test="${ not empty list.sysFilNm}">
<li id="${ list.mainSetupItemInnb}">
<a href="#" id="${ list.orginlFilNm}${ status.index }" onclick="downloadFile(this,'${resultMap.paramVO.sopmalCd}','MANC', ${ status.index });">
<i class="icon icon_file-list mr-2"></i>
<span class="file-list__item-title fileNm"><c:out value="${ list.orginlFilNm}"/></span>
<span class="file-list__item-size fileSz">(<c:out value="${ list.filMg}"/> KB)</span>
</a>
<button type="button" class="file-list__delete fileDl" onclick="fn_delete_file_at.call(this); deleteFile(this, ${ status.index });"> <!-- fn_delete_imgFile('1') deleteFile(this, 1) -->
<span class="visually-hidden">파일 삭제</span>
</button>
</li>
</c:if>
</ul>
</div>
</div>
</td>
</tr>
<tr>
<th>메인 설명</th>
<td>
<div class="td-inner">
<input type="hidden" name="mainSetupItemInnb" value="${ list.mainSetupItemInnb }"/>
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="" name="itemMainDc"
value="<c:out value="${ list.itemMainDc }"/>"/>
</div>
</td>
</tr>
<tr>
<th>서브 설명</th>
<td>
<div class="td-inner">
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="" name="itemSubDc"
value="<c:out value="${ list.itemSubDc }"/>"/>
</div>
</td>
</tr>
<tr>
<th>URL</th>
<td>
<div class="td-inner">
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="" name="itmeCnncUrl"
value="<c:out value="${ list.itmeCnncUrl }"/>"/>
</div>
</td>
</tr>
</c:if>
</c:forEach>
</c:when>
<c:otherwise>
<tr>
<th>첨부파일</th>
<td>
<div class="td-inner">
<div class="d-flex align-items-center gap-5">
<div class="input-file">
<input type="hidden" id="fileAt${ status.index }" name="fileAt" value=""/>
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.extensions.images')" var="acceptFileExtensions"/>
<input type="file" id="fileUpload${ status.index }" name="files" title="아이콘파일" accept="<c:out value="${ acceptFileExtensions }"/>" multiple="multiple" onchange="addFilesPopup(event, 1, '#fileListImg${ status.index }');"/>
<label for="fileUpload${ status.index }">파일선택</label>
</div>
<ul class="file-list" id="fileListImg${ status.index }">
<c:if test="${ not empty list.sysFilNm}">
<li id="${ list.sysFilNm}">
<a href="#" id="${ list.orginlFilNm}${ status.index }" onclick="downloadFile(this, ${ status.index });">
<i class="icon icon_file-list mr-2"></i>
<span class="file-list__item-title fileNm"><c:out value="${ list.orginlFilNm}"/></span>
<span class="file-list__item-size fileSz">(<c:out value="${ list.filMg}"/> KB)</span>
</a>
<button type="button" class="file-list__delete fileDl" onclick="deleteFile(this, ${ status.index }); "> <!-- fn_delete_imgFile('1') deleteFile(this, 1) -->
<span class="visually-hidden">파일 삭제</span>
</button>
</li>
</c:if>
</ul>
</div>
</div>
</td>
</tr>
<tr>
<th>메인 설명</th>
<td>
<div class="td-inner">
<input type="hidden" name="mainSetupItemInnb" value=""/>
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="" name="itemMainDc"
value=""/>
</div>
</td>
</tr>
<tr>
<th>서브 설명</th>
<td>
<div class="td-inner">
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="" name="itemSubDc"
value=""/>
</div>
</td>
</tr>
<tr>
<th>URL</th>
<td>
<div class="td-inner">
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="" name="itmeCnncUrl"
value=""/>
</div>
</td>
</tr>
</c:otherwise>
</c:choose>
</tbody>
</table>
</div>
<div class="form-control-container mb-10">
<div class="left">
<h3 class="content-section__inner-title mb-0">상품 그룹</h3>
</div>
<div class="center">
</div>
<div class="right">
<button type="button" id="goodsGrpBtn" onclick="fn_open_goodsGrp();" class="btn xsm outline">설정</button>
</div>
</div>
<div class="table-wrapper">
<table class="table vertical">
<caption>해당 테이블에 대한 설명</caption>
<colgroup>
<col>
</colgroup>
<thead>
<tr>
<th>상품 그룹</th>
</tr>
</thead>
<tbody>
<c:choose>
<c:when test="${ not empty resultMap.resultPopupList.result }">
<c:forEach var="list" items="${ resultMap.resultPopupList.result }" varStatus="status">
<c:if test="${ status.first }">
<tr>
<td>
<div class="select-box">
<select class="full" title="상품 그룹 목록" name="goodsGroupInnb">
<c:forEach var="cdList" items="${ resultMap.resultPopupList.goodsGroupList }" varStatus="">
<c:choose>
<c:when test="${ list.goodsGroupInnb eq cdList.goodsGroupInnb }">
<option value="<c:out value="${ cdList.goodsGroupInnb }"/>" selected="selected"><c:out value="${ cdList.goodsGroupNm }"/></option>
</c:when>
<c:otherwise>
<option value="<c:out value="${ cdList.goodsGroupInnb }"/>"><c:out value="${ cdList.goodsGroupNm }"/></option>
</c:otherwise>
</c:choose>
</c:forEach>
</select>
</div>
</td>
</tr>
</c:if>
</c:forEach>
</c:when>
<c:otherwise>
<tr>
<td>
<div class="select-box">
<select class="full" title="상품 그룹 목록" name="goodsGroupInnb">
<c:forEach var="cdList" items="${ resultMap.resultPopupList.goodsGroupList }" varStatus="">
<option value="<c:out value="${ cdList.goodsGroupInnb }"/>"><c:out value="${ cdList.goodsGroupNm }"/></option>
</c:forEach>
</select>
</div>
</td>
</tr>
</c:otherwise>
</c:choose>
</tbody>
</table>
</div>
<%--
<div class="form-control-container mb-10">
<div class="left">
<h3 class="content-section__inner-title mb-0">상품 정보</h3>
</div>
<div class="center">
</div>
<div class="right">
<a href="" class="btn xsm outline">설정</a>
</div>
</div>
<div class="table-wrapper">
<table class="table">
<caption>해당 테이블에 대한 설명</caption>
<colgroup>
<col style="width: 15%;">
<col>
</colgroup>
<tbody>
<tr>
<th>
상품정보
</th>
<td>
<div class="td-inner">
<div class="select-box">
<select class="full" title="해당 셀렉트에 대한 설명" name="goodsExpsrInfoInnb">
<c:forEach var="list" items="${ resultMap.resultPopupList.goodsExpsrInfoList }" varStatus="">
<c:choose>
<c:when test="${ not empty resultMap.resultPopupList.resultContent.goodsExpsrInfoInnb && resultMap.resultPopupList.resultContent.goodsExpsrInfoInnb eq list.goodsExpsrInfoInnb }">
<option value="<c:out value="${ list.goodsExpsrInfoInnb }"/>" selected="selected" ><c:out value="${ list.goodsInfoSetupSj }"/></option>
</c:when>
<c:otherwise>
<option value="<c:out value="${ list.goodsExpsrInfoInnb }"/>"><c:out value="${ list.goodsInfoSetupSj }"/></option>
</c:otherwise>
</c:choose>
</c:forEach>
</select>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
--%>
</form>
</div>
<div class="modal-footer">
<a href="#" rel="modal:close" class="btn outline">취소</a>
<button class="btn primary" type="button" onclick="fn_popup_regist('goodsUrlRegistForm', 'mainSetupInnb', '<c:out value="${ resultMap.paramVO.relmTdId }"/>', 'url-type-pop', '<c:out value="${ resultMap.resultPopupList.resultContent.mainSetupInnb }"/>', '<c:out value="${ resultMap.paramVO.relmDvCd }"/>' );">저장</button>
</div>
</div>
<script src="/admin/js/script.js" defer=""></script>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,162 @@
<%@ page import="java.util.Date" %>
<%@ 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"%>
<%--
Class Name : SiteContentManageU.jsp
Description : 사이트 메인페이지 관리 jsp
Modification Information
수정일 수정자 수정내용
------- -------- ---------------------------
2024-02-19 추지훈 최초 생성
--%>
<script>
$(document).ready(function() {
<%--
const hiddenTdVal = '<c:out value="${ resultMap.paramVO.relmTdId }"/>';
const hiddenTdList = fn_get_popup_data(hiddenTdVal);
console.log("hiddenTdList", hiddenTdList);
if (hiddenTdList != null && hiddenTdList.length > 0) {
// 첫 번째 요소만 처리
let firstData = hiddenTdList[0];
console.log("첫 번째 요소 data : ", firstData);
// 메인 타이틀 설정
$('input[name="mainSj"]').val(firstData.mainSj);
// 계정 설정
$('input[name="acnt"]').val(firstData.acnt);
// 토큰 설정
$('input[name="tken"]').val(firstData.tken);
}
--%>
});
</script>
<!-- 인스타그램(SNS) 설정 팝업 -->
<div id="sns-pop" class="modal">
<div class="modal-header">
<h4>인스타그램(SNS) 설정</h4>
</div>
<div class="modal-content">
<h3 class="content-section__inner-title">내용</h3>
<form id="snsRegistForm">
<div class="table-wrapper">
<input type="hidden" id="deleteContentsItemList" name="deleteContentsItemList" value=""/>
<input type="hidden" id="mainSiteInnb" name="mainSiteInnb" value="<c:out value="${ resultMap.paramVO.mainSiteInnb }"/>"/>
<table class="table">
<caption>해당 테이블에 대한 설명</caption>
<colgroup>
<col style="width: 15%;">
<col>
</colgroup>
<tbody>
<tr>
<th>메인 타이틀</th>
<td>
<div class="td-inner">
<div class="emoji-container">
<input type="hidden" name="mainSetupInnb" value="<c:out value="${ resultMap.resultPopupList.resultContent.mainSetupInnb }"/>"/>
<input class="input-text full emoji-input" type="text" title="해당 인풋에 대한 설명" name="mainSj"
placeholder="" value="<c:out value="${ resultMap.resultPopupList.resultContent.mainSj }"/>"/>
<button class="btn sm dark emoji-button" type="button" onclick="initializeEmojiPicker(event)">
<i class=" icon icon_emoji"></i>
이모지
</button>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<h3 class="content-section__inner-title">인스타그램 연동</h3>
<div class="table-wrapper">
<table class="table">
<caption>해당 테이블에 대한 설명</caption>
<colgroup>
<col style="width: 15%;">
<col>
</colgroup>
<tbody>
<c:choose>
<c:when test="${ not empty resultMap.resultPopupList.result }">
<c:forEach var="list" items="${ resultMap.resultPopupList.result }" varStatus="status">
<c:if test="${ status.first }">
<tr>
<th>user_id</th>
<td>
<div class="td-inner">
<input type="hidden" name="mainSetupItemInnb" value="${ list.mainSetupItemInnb }"/>
<input type="hidden" name="pltfomDv" value="instagram"/>
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="" name="acnt"
value="<c:out value="${ list.acnt }"/>"/>
</div>
</td>
</tr>
<tr>
<th>token</th>
<td>
<div class="td-inner">
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="" name="tken"
value="<c:out value="${ list.tken }"/>"/>
</div>
</td>
</tr>
</c:if>
</c:forEach>
</c:when>
<c:otherwise>
<tr>
<th>user_id</th>
<td>
<div class="td-inner">
<input type="hidden" name="mainSetupItemInnb" value=""/>
<input type="hidden" name="pltfomDv" value="instagram"/>
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="" name="acnt"
value=""/>
</div>
</td>
</tr>
<tr>
<th>token</th>
<td>
<div class="td-inner">
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="" name="tken"
value=""/>
</div>
</td>
</tr>
</c:otherwise>
</c:choose>
</tbody>
</table>
</div>
</form>
</div>
<div class="modal-footer">
<a href="#" rel="modal:close" class="btn outline">취소</a>
<button class="btn primary" type="button" onclick="fn_popup_regist('snsRegistForm', 'mainSetupInnb', '<c:out value="${ resultMap.paramVO.relmTdId }"/>', 'sns-pop', '<c:out value="${ resultMap.resultPopupList.resultContent.mainSetupInnb }"/>' );">저장</button>
</div>
</div>
<script src="/admin/js/script.js" defer=""></script>

View File

@@ -0,0 +1,244 @@
<%@ page import="java.util.Date" %>
<%@ 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"%>
<%--
Class Name : SiteContentManageU.jsp
Description : 사이트 메인페이지 관리 jsp
Modification Information
수정일 수정자 수정내용
------- -------- ---------------------------
2024-03-19 추지훈 최초 생성
--%>
<script>
$(document).ready(function() {
});
</script>
<!-- 타임세일 설정 팝업 -->
<div id="timesale-pop" class="modal mainSetupModal" style="max-width: 640px;">
<div class="modal-header">
<h4>타임세일 설정</h4>
</div>
<div class="modal-content">
<h3 class="content-section__inner-title">배경이미지</h3>
<form id="tmeDscntRegistForm">
<div class="table-wrapper">
<input type="hidden" id="deleteContentsItemList" name="deleteContentsItemList" value=""/>
<input type="hidden" id="mainSiteInnb" name="mainSiteInnb" value="<c:out value="${ resultMap.paramVO.mainSiteInnb }"/>"/>
<table class="table">
<caption>해당 테이블에 대한 설명</caption>
<colgroup>
<col style="width: 15%;">
<col>
</colgroup>
<tbody>
<c:choose>
<c:when test="${ not empty resultMap.resultPopupList.result}">
<c:forEach items="${ resultMap.resultPopupList.result }" var="list" varStatus="status">
<c:if test="${ status.first }">
<tr>
<th>첨부파일</th>
<td>
<div class="td-inner">
<div class="d-flex align-items-center gap-5">
<div class="input-file" <c:if test = "${not empty list.sysFilNm}">style="display:none;" </c:if>>
<input type="hidden" id="fileAt${ status.index }" name="fileAt" value=""/>
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.extensions.images')" var="acceptFileExtensions"/>
<input type="file" id="fileUpload${ status.index }" name="files" title="아이콘파일" accept="<c:out value="${ acceptFileExtensions }"/>" multiple="multiple" onchange="addFilesPopup(event, 1, '#fileListImg${ status.index }');"/>
<label for="fileUpload${ status.index }">파일선택</label>
</div>
<ul class="file-list" id="fileListImg${ status.index }">
<c:if test="${ not empty list.sysFilNm}">
<li id="${ list.mainSetupItemInnb}">
<a href="#" id="${ list.orginlFilNm}${ status.index }" onclick="downloadFile(this,${resultMap.paramVO.sopmalCd},'MANC', ${ status.index });">
<i class="icon icon_file-list mr-2"></i>
<span class="file-list__item-title fileNm"><c:out value="${ list.orginlFilNm}"/></span>
<span class="file-list__item-size fileSz">(<c:out value="${ list.filMg}"/> KB)</span>
</a>
<button type="button" class="file-list__delete fileDl" onclick="deleteFile(this, ${ status.index }); fn_delete_file_at.call(this);"> <!-- fn_delete_imgFile('1') deleteFile(this, 1) -->
<span class="visually-hidden">파일 삭제</span>
</button>
</li>
</c:if>
</ul>
</div>
</div>
</td>
</tr>
</c:if>
</c:forEach>
</c:when>
<c:otherwise>
<tr>
<th>첨부파일</th>
<td>
<div class="td-inner">
<div class="d-flex align-items-center gap-5">
<div class="input-file">
<input type="hidden" id="fileAt${ status.index }" name="fileAt" value=""/>
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.extensions.images')" var="acceptFileExtensions"/>
<input type="file" id="fileUpload${ status.index }" name="files" title="아이콘파일" accept="<c:out value="${ acceptFileExtensions }"/>" multiple="multiple" onchange="addFilesPopup(event, 1, '#fileListImg${ status.index }');"/>
<label for="fileUpload${ status.index }">파일선택</label>
</div>
<ul class="file-list" id="fileListImg${ status.index }">
<c:if test="${ not empty list.sysFilNm}">
<li id="${ list.sysFilNm}">
<a href="#" id="${ list.orginlFilNm}${ status.index }" onclick="downloadFile(this, ${ status.index });">
<i class="icon icon_file-list mr-2"></i>
<span class="file-list__item-title fileNm"><c:out value="${ list.orginlFilNm}"/></span>
<span class="file-list__item-size fileSz">(<c:out value="${ list.filMg}"/> KB)</span>
</a>
<button type="button" class="file-list__delete fileDl" onclick="deleteFile(this, ${ status.index }); "> <!-- fn_delete_imgFile('1') deleteFile(this, 1) -->
<span class="visually-hidden">파일 삭제</span>
</button>
</li>
</c:if>
</ul>
</div>
</div>
</td>
</tr>
</c:otherwise>
</c:choose>
</tbody>
</table>
<span class="blue-7" style="font-size:small">이미지 사이즈: 가로 1280px, 세로 133~850px 권장</span>
</div>
<div class="form-control-container mb-10">
<div class="left">
<h3 class="content-section__inner-title mb-0">이벤트 상품</h3>
</div>
<div class="center">
</div>
<div class="right">
</div>
</div>
<div class="table-wrapper">
<table class="table vertical">
<caption>해당 테이블에 대한 설명</caption>
<colgroup>
<col>
</colgroup>
<thead>
<tr>
<th>이벤트 선택</th>
</tr>
</thead>
<tbody>
<c:choose>
<c:when test="${ not empty resultMap.resultPopupList.result}">
<c:forEach items="${ resultMap.resultPopupList.result }" var="list" varStatus="status">
<c:if test="${ status.first }">
<tr>
<td>
<input type="hidden" name="mainSetupItemInnb" value="${ list.mainSetupItemInnb }"/>
<c:set var="firstElement" value="${resultMap.resultPopupList.result[0] }" />
<div class="select-box">
<select class="full" title="이벤트 목록" name="evtInnb">
<c:choose>
<c:when test="${ not empty resultMap.resultPopupList.tmeDscntEventList }">
<c:forEach var="evtList" items="${ resultMap.resultPopupList.tmeDscntEventList }" varStatus="">
<c:choose>
<c:when test="${ firstElement.evtInnb eq evtList.evtInnb}">
<option value="<c:out value="${ evtList.evtInnb }"/>" selected="selected"><c:out value="${ evtList.evtnm}"/></option>
</c:when>
<c:otherwise>
<option value="<c:out value="${ evtList.evtInnb }"/>"><c:out value="${ evtList.evtnm}"/></option>
</c:otherwise>
</c:choose>
</c:forEach>
</c:when>
</c:choose>
</select>
</div>
</td>
</tr>
</c:if>
</c:forEach>
</c:when>
<c:otherwise>
<tr>
<td>
<input type="hidden" name="mainSetupItemInnb" value=""/>
<div class="select-box">
<select class="full" title="이벤트 목록" name="evtInnb">
<c:choose>
<c:when test="${ not empty resultMap.resultPopupList.tmeDscntEventList }">
<c:forEach var="evtList" items="${ resultMap.resultPopupList.tmeDscntEventList }" varStatus="">
<option value="<c:out value="${ evtList.evtInnb }"/>"><c:out value="${ evtList.evtnm}"/></option>
</c:forEach>
</c:when>
</c:choose>
</select>
</div>
</td>
</tr>
</c:otherwise>
</c:choose>
</tbody>
</table>
</div>
<%--
<div class="form-control-container mb-10">
<div class="left">
<h3 class="content-section__inner-title mb-0">상품 정보</h3>
</div>
<div class="center">
</div>
<div class="right">
<a href="" class="btn xsm outline">설정</a>
</div>
</div>
<div class="table-wrapper">
<table class="table">
<caption>해당 테이블에 대한 설명</caption>
<colgroup>
<col style="width: 15%;">
<col>
</colgroup>
<tbody>
<tr>
<th>
상품정보
</th>
<td>
<div class="td-inner">
<div class="select-box">
<select class="full" title="해당 셀렉트에 대한 설명" name="goodsExpsrInfoInnb">
<c:forEach var="list" items="${ resultMap.resultPopupList.goodsExpsrInfoList }" varStatus="">
<c:choose>
<c:when test="${ not empty resultMap.resultPopupList.resultContent.goodsExpsrInfoInnb && resultMap.resultPopupList.resultContent.goodsExpsrInfoInnb eq list.goodsExpsrInfoInnb }">
<option value="<c:out value="${ list.goodsExpsrInfoInnb }"/>" selected="selected" ><c:out value="${ list.goodsInfoSetupSj }"/></option>
</c:when>
<c:otherwise>
<option value="<c:out value="${ list.goodsExpsrInfoInnb }"/>"><c:out value="${ list.goodsInfoSetupSj }"/></option>
</c:otherwise>
</c:choose>
</c:forEach>
</select>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
--%>
</form>
</div>
<div class="modal-footer">
<a href="#" rel="modal:close" class="btn outline">취소</a>
<button class="btn primary" type="button" onclick="fn_popup_regist('tmeDscntRegistForm', 'mainSetupItemInnb', '<c:out value="${ resultMap.paramVO.relmTdId }"/>', 'timesale-pop', '<c:out value="${ resultMap.resultPopupList.resultContent.mainSetupInnb }"/>' );">저장</button>
</div>
</div>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,56 @@
<%@ page import="java.util.Date" %>
<%@ 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"%>
<%--
Class Name : SiteHeaderPopularGoodsListR.jsp
Description : 인기 상품 그룹 상품 목록 조회 jsp
Modification Information
수정일 수정자 수정내용
------- -------- ---------------------------
2024-03-19 추지훈 최초 생성
--%>
<c:choose>
<c:when test="${ not empty resultMap.goodsList && fn:length(resultMap.goodsList) > 0 }">
<c:set var="count" value="0" />
<c:set var="countName" value="0" />
<c:forEach items="${ resultMap.goodsList }" var="list" varStatus="status">
<tr>
<td><c:out value="${ list.expsrOrdr }"/></td>
<td>
<input type="hidden" name="popuylarChngGoodsList[${countName}].goodsInnb" value="<c:out value="${ list.goodsInnb }"/>" />
<c:out value="${ list.goodsNm }"/>
</td>
<td>
<div class="custom-radio-container justify-center">
<c:forEach var="cdList" items="${ resultMap.populChagCdList }" varStatus="">
<div class="custom-radio">
<input type="radio" id="r-${count}" name="popuylarChngGoodsList[${countName}].popularChngDv" value="<c:out value="${ cdList.cd }"/>"
<c:if test="${ cdList.cd eq list.popularChngDv }">checked="checked"</c:if>
>
<label for="r-${count}"><c:out value="${ cdList.cdNm }"/></label>
</div>
<c:set var="count" value="${count + 1}" />
</c:forEach>
<c:set var="countName" value="${countName + 1}" />
</div>
</td>
</tr>
</c:forEach>
</c:when>
<c:otherwise>
<tr>
<td colspan="100%" ><spring:message code="common.nodata"/></td>
</tr>
</c:otherwise>
</c:choose>