From f69e642079c9def3e3284ec9e71c462f92bacf5b Mon Sep 17 00:00:00 2001 From: SeoJin Kim Date: Tue, 13 Jul 2021 16:34:32 +0900 Subject: [PATCH] =?UTF-8?q?[Spring][=EC=87=BC=ED=95=91=EB=AA=B0=20?= =?UTF-8?q?=ED=94=84=EB=A1=9C=EC=A0=9D=ED=8A=B8][29]=20=EC=83=81=ED=92=88?= =?UTF-8?q?=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EC=88=98=EC=A0=95=20-=201(?= =?UTF-8?q?=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EC=B6=9C=EB=A0=A5)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://kimvampa.tistory.com/235 --- .../WEB-INF/views/admin/goodsModify.jsp | 52 +++++++++++++++++- .../resources/css/admin/goodsModify.css | 30 +++++++++++ .../maven/com.vam/controller/pom.properties | 2 +- .../WEB-INF/views/admin/goodsModify.jsp | 53 ++++++++++++++++++- .../resources/css/admin/goodsModify.css | 29 ++++++++++ .../maven/com.vam/controller/pom.properties | 2 +- 6 files changed, 164 insertions(+), 4 deletions(-) diff --git a/VamPa/src/main/webapp/WEB-INF/views/admin/goodsModify.jsp b/VamPa/src/main/webapp/WEB-INF/views/admin/goodsModify.jsp index 4fb0f7d..d8fbc13 100644 --- a/VamPa/src/main/webapp/WEB-INF/views/admin/goodsModify.jsp +++ b/VamPa/src/main/webapp/WEB-INF/views/admin/goodsModify.jsp @@ -1,5 +1,7 @@ <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> @@ -15,7 +17,6 @@ - <%@include file="../includes/admin/header.jsp" %> @@ -135,6 +136,17 @@ 책 목차를 입력해주세요. +
+
+ +
+
+ +
+ +
+
+
@@ -308,6 +320,44 @@ $("#discount_interface").val(discountRate); + /* 기존 이미지 출력 */ + let bookId = ''; + let uploadReslut = $("#uploadReslut"); + + $.getJSON("/getAttachList", {bookId : bookId}, function(arr){ + + console.log(arr); + + if(arr.length === 0){ + + + let str = ""; + str += "
"; + str += ""; + str += "
"; + + uploadReslut.html(str); + return; + } + + let str = ""; + let obj = arr[0]; + + let fileCallPath = encodeURIComponent(obj.uploadPath + "/s_" + obj.uuid + "_" + obj.fileName); + str += "
"; + str += "
x
"; + str += ""; + str += ""; + str += ""; + str += "
"; + + uploadReslut.html(str); + + });// GetJSON + }); // document ready diff --git a/VamPa/src/main/webapp/resources/css/admin/goodsModify.css b/VamPa/src/main/webapp/resources/css/admin/goodsModify.css index 3b2359e..9d6273d 100644 --- a/VamPa/src/main/webapp/resources/css/admin/goodsModify.css +++ b/VamPa/src/main/webapp/resources/css/admin/goodsModify.css @@ -167,6 +167,36 @@ input[name='publeYear'] { height: 170px; } +/* 상품 이미지 */ + #result_card img{ + max-width: 100%; + height: auto; + display: block; + padding: 5px; + margin-top: 10px; + margin: auto; + } + #result_card { + position: relative; + } + .imgDeleteBtn{ + position: absolute; + top: 0; + right: 5%; + background-color: #ef7d7d; + color: wheat; + font-weight: 900; + width: 30px; + height: 30px; + border-radius: 50%; + line-height: 26px; + text-align: center; + border: none; + display: block; + cursor: pointer; + } + + /* 버튼 영역 */ .btn_section{ text-align: center; diff --git a/VamPa/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.properties b/VamPa/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.properties index 5480dbe..d096ce3 100644 --- a/VamPa/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.properties +++ b/VamPa/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.properties @@ -1,5 +1,5 @@ #Generated by Maven Integration for Eclipse -#Sun Jul 04 23:43:48 KST 2021 +#Tue Jul 13 15:56:55 KST 2021 m2e.projectLocation=C\:\\Users\\sjinj\\git\\Blog_Project2\\VamPa m2e.projectName=VamPa groupId=com.vam diff --git a/VamPa_MySQL/src/main/webapp/WEB-INF/views/admin/goodsModify.jsp b/VamPa_MySQL/src/main/webapp/WEB-INF/views/admin/goodsModify.jsp index ffc24b0..0cd3904 100644 --- a/VamPa_MySQL/src/main/webapp/WEB-INF/views/admin/goodsModify.jsp +++ b/VamPa_MySQL/src/main/webapp/WEB-INF/views/admin/goodsModify.jsp @@ -1,5 +1,7 @@ <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> + <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> @@ -15,7 +17,7 @@ - + <%@include file="../includes/admin/header.jsp" %> @@ -135,6 +137,17 @@ 책 목차를 입력해주세요.
+
+
+ +
+
+ +
+ +
+
+
@@ -305,6 +318,44 @@ $(".span_discount").html(discountPrice); $("#discount_interface").val(discountRate); + /* 기존 이미지 출력 */ + let bookId = ''; + let uploadReslut = $("#uploadReslut"); + + $.getJSON("/getAttachList", {bookId : bookId}, function(arr){ + + console.log(arr); + + if(arr.length === 0){ + + + let str = ""; + str += "
"; + str += ""; + str += "
"; + + uploadReslut.html(str); + return; + } + + let str = ""; + let obj = arr[0]; + + let fileCallPath = encodeURIComponent(obj.uploadPath + "/s_" + obj.uuid + "_" + obj.fileName); + str += "
"; + str += "
x
"; + str += ""; + str += ""; + str += ""; + str += "
"; + + uploadReslut.html(str); + + });// GetJSON + }); // document ready diff --git a/VamPa_MySQL/src/main/webapp/resources/css/admin/goodsModify.css b/VamPa_MySQL/src/main/webapp/resources/css/admin/goodsModify.css index 3b2359e..5dcea04 100644 --- a/VamPa_MySQL/src/main/webapp/resources/css/admin/goodsModify.css +++ b/VamPa_MySQL/src/main/webapp/resources/css/admin/goodsModify.css @@ -167,6 +167,35 @@ input[name='publeYear'] { height: 170px; } +/* 상품 이미지 */ + #result_card img{ + max-width: 100%; + height: auto; + display: block; + padding: 5px; + margin-top: 10px; + margin: auto; + } + #result_card { + position: relative; + } + .imgDeleteBtn{ + position: absolute; + top: 0; + right: 5%; + background-color: #ef7d7d; + color: wheat; + font-weight: 900; + width: 30px; + height: 30px; + border-radius: 50%; + line-height: 26px; + text-align: center; + border: none; + display: block; + cursor: pointer; + } + /* 버튼 영역 */ .btn_section{ text-align: center; diff --git a/VamPa_MySQL/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.properties b/VamPa_MySQL/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.properties index ec8e11d..1fe7f9b 100644 --- a/VamPa_MySQL/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.properties +++ b/VamPa_MySQL/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.properties @@ -1,5 +1,5 @@ #Generated by Maven Integration for Eclipse -#Sun Jul 04 23:43:44 KST 2021 +#Tue Jul 13 15:56:56 KST 2021 m2e.projectLocation=C\:\\Users\\sjinj\\git\\Blog_Project2\\VamPa_MySQL m2e.projectName=VamPa_MySQL groupId=com.vam