From 7ccba8a51fcc5e74203a0095dcd979f0d0836f56 Mon Sep 17 00:00:00 2001 From: KNKIM Date: Thu, 29 Jul 2021 14:13:37 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9B=B9=EC=8B=9C=ED=81=90=EC=96=B4=EC=BD=94?= =?UTF-8?q?=EB=94=A9=20=EC=A0=81=EC=9A=A9=20=EB=B0=8F=20=EC=BD=94=EB=93=9C?= =?UTF-8?q?=20=EC=A0=95=EB=A6=AC,=20CSS,=20JS=20=EC=B6=94=EA=B0=80?= =?UTF-8?q?=EB=B3=B4=EC=99=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/dataxml/uac.service.board.qna_GET.xml | 3 + .../java/nlib/bbs/web/BoardController.java | 7 +- .../WEB-INF/jsp/nlib/board/listQnAs.jsp | 25 ++-- .../WEB-INF/jsp/nlib/board/selectQnA.jsp | 65 ++++---- .../WEB-INF/jsp/nlib/board/updateQnAForm.jsp | 139 +++++++++--------- src/main/webapp/css/nlib.css | 14 ++ src/main/webapp/js/nlib.js | 19 ++- 7 files changed, 149 insertions(+), 123 deletions(-) diff --git a/data/dataxml/uac.service.board.qna_GET.xml b/data/dataxml/uac.service.board.qna_GET.xml index 641c52c3..3f926a39 100644 --- a/data/dataxml/uac.service.board.qna_GET.xml +++ b/data/dataxml/uac.service.board.qna_GET.xml @@ -4,6 +4,7 @@ 5 101 + Q&A 공지사항 테스트 111 15 @@ -23,6 +24,7 @@ 4 101 + Q&A 이전의 글제목입니다. 2021-07-19 김아무 @@ -31,6 +33,7 @@ 6 102 + Q&A 다음의 글제목입니다. 2021-07-20 홍아무 diff --git a/src/main/java/nlib/bbs/web/BoardController.java b/src/main/java/nlib/bbs/web/BoardController.java index 7920cce5..bfa68499 100644 --- a/src/main/java/nlib/bbs/web/BoardController.java +++ b/src/main/java/nlib/bbs/web/BoardController.java @@ -178,6 +178,8 @@ public class BoardController extends NlibCommonController String searchKeyword = paramMap.get("searchKeyword"); String pageIndex = paramMap.get("pageIndex"); String pageSize = paramMap.get("pageSize"); + String message = paramMap.get("message"); + // 게시물 번호 String articleNo = paramMap.get("articleNo"); @@ -186,6 +188,7 @@ public class BoardController extends NlibCommonController log.debug("selectQnA > pageSize = " + pageSize); log.debug("selectQnA > searchKeyword = " + searchKeyword); log.debug("selectQnA > articleNo = " + articleNo); + log.debug("selectQnA > message = " + message); //------------------------------- // REQ VO 구성 @@ -209,6 +212,7 @@ public class BoardController extends NlibCommonController model.addAttribute("article" , resVO.getInfo()); model.addAttribute("preArticle" , resVO.getList().get(0)); model.addAttribute("nextArticle" , resVO.getList().get(1)); + model.addAttribute("message" , message); model.addAttribute("pageIndex" , pageIndex); model.addAttribute("pageSize" , pageSize); @@ -395,9 +399,10 @@ public class BoardController extends NlibCommonController model.addAttribute("article" , resVO.getInfo()); // 검색 정보 - model.addAttribute("pageIndex" , pageIndex); + model.addAttribute("pageIndex" , pageIndex); model.addAttribute("pageSize" , pageSize); model.addAttribute("searchKeyword", searchKeyword); + model.addAttribute("message" , ""); return "redirect:nlib/board/selectQnA"; } diff --git a/src/main/webapp/WEB-INF/jsp/nlib/board/listQnAs.jsp b/src/main/webapp/WEB-INF/jsp/nlib/board/listQnAs.jsp index 4053ab7d..0992f3f7 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/board/listQnAs.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/board/listQnAs.jsp @@ -100,7 +100,7 @@ $( document ).ready(function() { var articleNo = getData["articleNo"]; // 상세 내용 보기 - fn_view_detail(articleNo); + fn_viewDetail(articleNo); }, //====================================== @@ -117,32 +117,39 @@ $( document ).ready(function() { // 페이지 크기 변경시 재조회 $("#pageSize").on("change", function(e) { - fn_search_article($("#pageSize").val(), 1); + fn_searchArticle($("#pageSize").val(), 1); }); // 검색 버튼 클릭 $("#btnSearch").on("click", function(e) { - fn_search_article($("#pageSize").val(), 1); + fn_searchArticle($("#pageSize").val(), 1); }); //초기 자료 조회 - fn_search_article(); + fn_searchArticle(); }); // document ready // 선택한 게시글 상세 보기로 이동 -function fn_view_detail(articleNo) { +function fn_viewDetail(articleNo) { $("#articleNo").val(articleNo); $("#articleForm").attr("action", "${pageContext.request.contextPath}/board/selectQnA.do"); $("#articleForm").submit(); } +// 게시글 작성으로 이동 +function fn_newArticle() { + $("#articleNo").val(""); + $("#articleForm").attr("action", "${pageContext.request.contextPath}/board/insertQnAForm.do"); + $("#articleForm").submit(); +} + // 그리드 데이터 조회 호출 -function fn_search_article(pageSize, pageIndex) { +function fn_searchArticle(pageSize, pageIndex) { $("#jsGrid").jsGrid("search" - , {'pageSize' : (pageSize ? pageSize : fn_getIntValue("pageSize", ${pageSize}) ), - 'pageIndex': (pageIndex ? pageIndex : fn_getIntValue("pageIndex", 1)) + , {'pageSize' : (pageSize ? pageSize : fn_getIntValue("pageSize", ${pageSize}) ), + 'pageIndex' : (pageIndex ? pageIndex : fn_getIntValue("pageIndex", 1)) } ); } @@ -173,7 +180,7 @@ function fn_search_article(pageSize, pageIndex) { + onclick="fn_newArticle()">글쓰기 diff --git a/src/main/webapp/WEB-INF/jsp/nlib/board/selectQnA.jsp b/src/main/webapp/WEB-INF/jsp/nlib/board/selectQnA.jsp index 19f24858..41600701 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/board/selectQnA.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/board/selectQnA.jsp @@ -34,52 +34,47 @@ 묻고답하기 - 상세조회 - + ${pageTitle} - - - - - -

${pageTitle }

-${message } +메시지 : ${message }
- - - - - - + + + + + + + - +
- - - - - + + + + + - + - + @@ -91,20 +86,20 @@
유형Q & A작성자 : ${article.regUserName }작성일 : ${article.regDate }상태 : ${article.repStatus }유형${article.articleTypeName }작성자 : ${article.regUserName }작성일 : ${article.regDate }상태 : ${article.repStatus }
질문내용질문내용 ${article.contentQeust}
${article.contentQeustFile}
답변내용답변내용 ${article.contentReply}
- - - - - - + + + + + + - - - - - - + + + + + +
이전글Q&A${preArticle.title }작성자 : ${preArticle.regUserName }작성일 : ${preArticle.regDate }상태 : ${preArticle.repStatus }이전글${preArticle.articleTypeName }${preArticle.title }작성자 : ${preArticle.regUserName }작성일 : ${preArticle.regDate }상태 : ${preArticle.repStatus }
다음글Q&A${nextArticle.title }작성자 : ${nextArticle.regUserName }작성일 : ${nextArticle.regDate }상태 : ${nextArticle.repStatus }다음글${nextArticle.articleTypeName }${nextArticle.title }작성자 : ${nextArticle.regUserName }작성일 : ${nextArticle.regDate }상태 : ${nextArticle.repStatus }
@@ -148,7 +143,7 @@ function fn_updateForm(passwd) { // 게시글 수정 화면으로 이동 function fn_updatePassword() { - fn_promptPassword("비밀번호를 입력하여 주시기 바랍니다.", "fn_updateForm") + fn_promptPassword("비밀번호를 입력하여 주시기 바랍니다.", "111", "fn_updateForm") } diff --git a/src/main/webapp/WEB-INF/jsp/nlib/board/updateQnAForm.jsp b/src/main/webapp/WEB-INF/jsp/nlib/board/updateQnAForm.jsp index 05176da5..28e0562e 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/board/updateQnAForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/board/updateQnAForm.jsp @@ -43,72 +43,13 @@ - - - - -

${pageTitle }

- -${message } -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
제목
작성자
이메일
기존비밀번호
비밀번호
질문내용
- -
- - - - - -
- - - + + + + +

${pageTitle }

+ +메시지 : ${message } +
+ +
+ + + + + + + + +  
+  
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
제목
작성자
이메일
기존비밀번호
비밀번호
질문내용
+ +
+ + + + +
diff --git a/src/main/webapp/css/nlib.css b/src/main/webapp/css/nlib.css index 409fc080..3b194ac0 100644 --- a/src/main/webapp/css/nlib.css +++ b/src/main/webapp/css/nlib.css @@ -156,6 +156,7 @@ button { } .table_content table, th, td { border: 1px solid #444444; + line-height: 30px; } @@ -202,3 +203,16 @@ button { width: 100%; height: 0px; } + +input { + line-height: 25px; +} + +input:read-only { + background-color: #eee !important; +} + + +th { + background-color: #eef !important; +} diff --git a/src/main/webapp/js/nlib.js b/src/main/webapp/js/nlib.js index 7e417c0c..4a96ecbb 100644 --- a/src/main/webapp/js/nlib.js +++ b/src/main/webapp/js/nlib.js @@ -8,17 +8,20 @@ // 팝업으로 비밀번호를 입력받아서 콜백함수에 전달한다. -function fn_promptPassword(msg, callbackFucName) { - var thePrompt = window.open("", "_NLIB_POMPT_PASSWORD", "widht=100, height=100"); - var theHTML = ""; +function fn_promptPassword(msg, placeholder, callbackFucName) { + var options = "top=200, left=200, width=300, height=200, status=no, menubar=no, toolbar=yes, resizable=no"; + var thePrompt = window.open("", "_NLIB_POMPT_PASSWORD", options); + var theHTML = "" + placeholder + ""; theHTML += "

" + msg + "

"; theHTML += "
"; - theHTML += "비밀번호: "; - theHTML += "
"; - theHTML += ""; - theHTML += ""; + theHTML += "비밀번호: "; + theHTML += " 
"; + theHTML += " 
"; + theHTML += ""; + theHTML += ""; + theHTML += ""; thePrompt.document.body.innerHTML = theHTML; }