[Spring][쇼핑몰 프로젝트][18] 상품 등록 - 작가 선택(팝업창) 구현 - 1

https://kimvampa.tistory.com/195
This commit is contained in:
SeoJin Kim
2021-03-24 15:56:27 +09:00
parent 351ffa0888
commit 7c642b82ae
10 changed files with 101 additions and 6 deletions

View File

@@ -133,5 +133,12 @@ public class AdminController {
return "redirect:/admin/goodsManage";
}
/* 작가 검색 팝업창 */
@GetMapping("/authorPop")
public void authorPopGET() throws Exception{
logger.info("authorPopGET.......");
}
}

View File

@@ -0,0 +1,12 @@
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<h1>작가 선택 pop 페이지</h1>
</body>
</html>

View File

@@ -37,7 +37,9 @@
<label>작가</label>
</div>
<div class="form_section_content">
<input name="authorId" value="0">
<input id="authorName_input" readonly="readonly">
<input id="authorId_input" name="authorId" type="hidden">
<button class="authorId_btn">작가 선택</button>
</div>
</div>
<div class="form_section">
@@ -175,6 +177,18 @@ $("#enrollBtn").on("click",function(e){
$( "input[name='publeYear']" ).datepicker(config);
});
/* 작가 선택 버튼 */
$('.authorId_btn').on("click",function(e){
e.preventDefault();
let popUrl = "/admin/authorPop";
let popOption = "width = 650px, height=550px, top=300px, left=300px, scrollbars=yes";
window.open(popUrl,"작가 찾기",popOption);
});
</script>

View File

@@ -144,7 +144,7 @@ ul{
}
.ui-datepicker-trigger { /* 캘린더 css 설정 */
.ui-datepicker-trigger { /* 캘린더 css 설정 */
margin-left: 25px;
width: 14%;
height: 38px;
@@ -158,6 +158,20 @@ input[name='publeYear'] {
text-align: center;
}
.authorId_btn { /* 작가 선택 css 설정 */
margin-left: 20px;
width: 14%;
height: 38px;
font-weight: 600;
background-color: #dfe8f5;
font-size: 15px;
cursor:pointer;
}
#authorName_input {
width: 80%;
text-align: center;
}
/* 버튼 영역 */
.btn_section{

View File

@@ -1,5 +1,5 @@
#Generated by Maven Integration for Eclipse
#Tue Mar 23 08:56:29 KST 2021
#Wed Mar 24 14:23:16 KST 2021
m2e.projectLocation=C\:\\Users\\sjinj\\git\\Blog_Project\\VamPa
m2e.projectName=VamPa
groupId=com.vam

View File

@@ -132,6 +132,14 @@ public class AdminController {
return "redirect:/admin/goodsManage";
}
/* 작가 검색 팝업창 */
@GetMapping("/authorPop")
public void authorPopGET() throws Exception{
logger.info("authorPopGET.......");
}
}

View File

@@ -0,0 +1,12 @@
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<h1>작가 선택 pop 페이지</h1>
</body>
</html>

View File

@@ -37,7 +37,9 @@
<label>작가</label>
</div>
<div class="form_section_content">
<input name="authorId" value="0">
<input id="authorName_input" readonly="readonly">
<input id="authorId_input" name="authorId" type="hidden">
<button class="authorId_btn">작가 선택</button>
</div>
</div>
<div class="form_section">
@@ -175,6 +177,18 @@ $("#enrollBtn").on("click",function(e){
$( "input[name='publeYear']" ).datepicker(config);
});
/* 작가 선택 버튼 */
$('.authorId_btn').on("click",function(e){
e.preventDefault();
let popUrl = "/admin/authorPop";
let popOption = "width = 650px, height=550px, top=300px, left=300px, scrollbars=yes";
window.open(popUrl,"작가 찾기",popOption);
});
</script>

View File

@@ -144,7 +144,7 @@ ul{
}
.ui-datepicker-trigger { /* 캘린더 css 설정 */
.ui-datepicker-trigger { /* 캘린더 css 설정 */
margin-left: 25px;
width: 14%;
height: 38px;
@@ -158,6 +158,20 @@ input[name='publeYear'] {
text-align: center;
}
.authorId_btn { /* 작가 선택 css 설정 */
margin-left: 20px;
width: 14%;
height: 38px;
font-weight: 600;
background-color: #dfe8f5;
font-size: 15px;
cursor:pointer;
}
#authorName_input {
width: 80%;
text-align: center;
}
/* 버튼 영역 */
.btn_section{

View File

@@ -1,5 +1,5 @@
#Generated by Maven Integration for Eclipse
#Tue Mar 23 08:56:29 KST 2021
#Wed Mar 24 14:23:17 KST 2021
m2e.projectLocation=C\:\\Users\\sjinj\\git\\Blog_Project\\VamPa_MySQL
m2e.projectName=VamPa_MySQL
groupId=com.vam