묻고답하기

This commit is contained in:
KNKIM 2021-07-26 10:48:08 +09:00
parent 5d6ebdf1cc
commit b9dde1b3bc
6 changed files with 806 additions and 716 deletions

View File

@ -1,83 +1,83 @@
<% <%
/** /**
* <pre> * <pre>
* @Class Name : getSampleInfo.jsp * @Class Name : getSampleInfo.jsp
* *
* @Description : RESTful API 호출 샘플 * @Description : RESTful API 호출 샘플
* *
* *
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021) * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
* *
* </pre> * </pre>
* *
* @ ------------ -------- --------------------------- * @ ------------ -------- ---------------------------
* @ 수정일 수정자 수정내용 * @ 수정일 수정자 수정내용
* @ ------------ -------- --------------------------- * @ ------------ -------- ---------------------------
* @ 2021. 6. 15. KNKIM 최초 생성 * @ 2021. 6. 15. KNKIM 최초 생성
* *
* *
* @author 이씨플라자 * DIGITALSHIP KNKIM * @author 이씨플라자 * DIGITALSHIP KNKIM
* @since 2021. 6. 15. * @since 2021. 6. 15.
* @version 1.0 * @version 1.0
* *
*/ */
%> %>
<%@ page language="java" contentType="text/html; charset=UTF-8" %> <%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> <%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> <%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %> <%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
<c:set var="pageTitle">QRCode 회원정보</c:set> <c:set var="pageTitle">QRCode 회원정보</c:set>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>${pageTitle}</title> <title>${pageTitle}</title>
<!-- W2UI --> <!-- W2UI -->
<link rel="stylesheet" type="text/css" href="/nlib/js/w2ui/w2ui-nlib.css" /> <link rel="stylesheet" type="text/css" href="/nlib/js/w2ui/w2ui-nlib.css" />
<script type="text/javascript" src="/nlib/js/w2ui/w2ui-1.5.min.js"></script> <script type="text/javascript" src="/nlib/js/w2ui/w2ui-1.5.min.js"></script>
</head> </head>
<body> <body>
<!-- javascript warning tag --> <!-- javascript warning tag -->
<noscript class="noScriptTitle"><spring:message code="common.noScriptTitle.msg" /></noscript> <noscript class="noScriptTitle"><spring:message code="common.noScriptTitle.msg" /></noscript>
<form:form commandName="reqInfo" <form:form commandName="reqInfo"
action="${pageContext.request.contextPath}/sample/barcode/getMemberQRCode.do" method="post" action="${pageContext.request.contextPath}/sample/barcode/getMemberQRCode.do" method="post"
target="_blank" target="_blank"
onSubmit="fncAuthorInsert(document.forms[0]); return false;"> onSubmit="fncAuthorInsert(document.forms[0]); return false;">
<div id="grid" style="width: 100%; height: 250px;"></div> <div id="grid" style="width: 100%; height: 250px;"></div>
</form:form> </form:form>
<script type="text/javaScript" language="javascript"> <script type="text/javaScript" language="javascript">
$(function () { $(function () {
$('#grid').w2grid({ $('#grid').w2grid({
name: 'grid', name: 'grid',
header: 'List of Names', header: 'List of Names',
columns: [ columns: [
{ field: 'fname', text: '이름', size: '30%' }, { field: 'fname', text: '이름', size: '30%' },
{ field: 'lname', text: '성명', size: '30%' }, { field: 'lname', text: '성명', size: '30%' },
{ field: 'email', text: '이메일', size: '40%' }, { field: 'email', text: '이메일', size: '40%' },
{ field: 'sdate', text: '시작일자', size: '120px' } { field: 'sdate', text: '시작일자', size: '120px' }
], ],
records: [ records: [
{ recid: 1, fname: "Peter", lname: "Jeremia", email: 'peter@mail.com', sdate: '2/1/2010' }, { recid: 1, fname: "Peter", lname: "Jeremia", email: 'peter@mail.com', sdate: '2/1/2010' },
{ recid: 2, fname: "Bruce", lname: "Wilkerson", email: 'bruce@mail.com', sdate: '6/1/2010' }, { recid: 2, fname: "Bruce", lname: "Wilkerson", email: 'bruce@mail.com', sdate: '6/1/2010' },
{ recid: 3, fname: "John", lname: "McAlister", email: 'john@mail.com', sdate: '1/16/2010' }, { recid: 3, fname: "John", lname: "McAlister", email: 'john@mail.com', sdate: '1/16/2010' },
{ recid: 4, fname: "Ravi", lname: "Zacharies", email: 'ravi@mail.com', sdate: '3/13/2007' }, { recid: 4, fname: "Ravi", lname: "Zacharies", email: 'ravi@mail.com', sdate: '3/13/2007' },
{ recid: 5, fname: "William", lname: "Dembski", email: 'will@mail.com', sdate: '9/30/2011' }, { recid: 5, fname: "William", lname: "Dembski", email: 'will@mail.com', sdate: '9/30/2011' },
{ recid: 6, fname: "David", lname: "Peterson", email: 'david@mail.com', sdate: '4/5/2010' } { recid: 6, fname: "David", lname: "Peterson", email: 'david@mail.com', sdate: '4/5/2010' }
] ]
}); });
}); });
</script> </script>
</body> </body>
</html> </html>

View File

@ -1,121 +1,121 @@
<% <%
/** /**
* <pre> * <pre>
* @Class Name : listQnAs.jsp * @Class Name : listQnAs.jsp
* *
* @Description : 묻고답하기 목록을 조회한다. * @Description : 묻고답하기 목록을 조회한다.
* *
* *
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021) * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
* *
* </pre> * </pre>
* *
* @ ------------ -------- --------------------------- * @ ------------ -------- ---------------------------
* @ 수정일 수정자 수정내용 * @ 수정일 수정자 수정내용
* @ ------------ -------- --------------------------- * @ ------------ -------- ---------------------------
* @ 2021. 7. 13. KNKIM 최초 생성 * @ 2021. 7. 13. KNKIM 최초 생성
* *
* *
* @author 이씨플라자 * DIGITALSHIP KNKIM * @author 이씨플라자 * DIGITALSHIP KNKIM
* @since 2021. 7. 13. * @since 2021. 7. 13.
* @version 1.0 * @version 1.0
* *
*/ */
%> %>
<%@ page language="java" contentType="text/html; charset=UTF-8" %> <%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> <%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> <%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %> <%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
<c:set var="pageTitle">묻고답하기 - 글쓰기</c:set> <c:set var="pageTitle">묻고답하기 - 글쓰기</c:set>
<!-- File Upload : 시작 --> <!-- File Upload : 시작 -->
<link rel="stylesheet" href="${pageContext.request.contextPath}/js/fileupload/dropzone.css" /> <link rel="stylesheet" href="${pageContext.request.contextPath}/js/fileupload/dropzone.css" />
<link rel="stylesheet" href="${pageContext.request.contextPath}/js/fileupload/style.css" /> <link rel="stylesheet" href="${pageContext.request.contextPath}/js/fileupload/style.css" />
<script src="${pageContext.request.contextPath}/js/fileupload/dropzone.js"></script> <script src="${pageContext.request.contextPath}/js/fileupload/dropzone.js"></script>
<!-- File Upload : 종료 --> <!-- File Upload : 종료 -->
<h3>${pageTitle }</h3> <h3>${pageTitle }</h3>
<!-- 글쓰기 : 폼 --> <!-- 글쓰기 : 폼 -->
<form:form commandName="reqInfo" <form:form commandName="reqInfo"
action="${pageContext.request.contextPath}/board/insertQnA.do" action="${pageContext.request.contextPath}/board/insertQnA.do"
method="post"> method="post">
<table> <table>
<tr> <tr>
<td>제목</td> <td>제목</td>
<td><input type="input" name="title" id="title" value="" /></td> <td><input type="input" name="title" id="title" value="" /></td>
</tr> </tr>
<tr> <tr>
<td>작성자명</td> <td>작성자명</td>
<td><input type="input" name="writerName" id="writerName" value="" /></td> <td><input type="input" name="writerName" id="writerName" value="" /></td>
</tr> </tr>
<tr> <tr>
<td>비밀번호</td> <td>비밀번호</td>
<td><input type="input" name="password" id="password" value="" /></td> <td><input type="input" name="password" id="password" value="" /></td>
</tr> </tr>
<tr> <tr>
<td>이메일</td> <td>이메일</td>
<td><input type="input" name="email" id="email" value="" /></td> <td><input type="input" name="email" id="email" value="" /></td>
</tr> </tr>
<tr> <tr>
<td>내용</td> <td>내용</td>
<td><textarea name="content" id="content" value=""></textarea></td> <td><textarea name="content" id="content" value=""></textarea></td>
</tr> </tr>
<tr> <tr>
<td>첨부파일</td> <td>첨부파일</td>
<td><input type="input" name="email" id="email" value="" /></td> <td><input type="input" name="email" id="email" value="" /></td>
</tr> </tr>
</table> </table>
<input type="button" name="btnNew" id="btnNew" value="확인" <input type="button" name="btnNew" id="btnNew" value="확인"
onclick="javascript:fileUploadNow();" /> onclick="javascript:fileUploadNow();" />
<input type="button" name="btnNew" id="btnNew" value="취소" <input type="button" name="btnNew" id="btnNew" value="취소"
onclick="javascript:location.href='${pageContext.request.contextPath}/board/listQnAs.do';" /> onclick="javascript:location.href='${pageContext.request.contextPath}/board/listQnAs.do';" />
</form:form> </form:form>
<div id="dropzone"> <div id="dropzone">
<form action="${pageContext.request.contextPath}/fileupload/uploadFile.do" <form action="${pageContext.request.contextPath}/fileupload/uploadFile.do"
class="dropzone needsclick" id="myDropzone" name="myDropzone"> class="dropzone needsclick" id="myDropzone" name="myDropzone">
<div class="dz-message needsclick"> <div class="dz-message needsclick">
<button type="button" class="dz-button">Drop files here or click to select files.</button><br /> <button type="button" class="dz-button">Drop files here or click to select files.</button><br />
<span class="note needsclick">이곳에 파일을 끌어다 놓거나, 클릭하여 올릴 파일을 선택하세요.</span> <span class="note needsclick">이곳에 파일을 끌어다 놓거나, 클릭하여 올릴 파일을 선택하세요.</span>
</div> </div>
</form> </form>
</div> </div>
<script type="text/javaScript" language="javascript"> <script type="text/javaScript" language="javascript">
// 파일업로드 객체 생성 // 파일업로드 객체 생성
var myDropzone = new Dropzone("form#myDropzone", { url: "${pageContext.request.contextPath}/fileupload/uploadFilesAjax.do?subPathKey=fileupload.bbs.qna.subpath"}); var myDropzone = new Dropzone("form#myDropzone", { url: "${pageContext.request.contextPath}/fileupload/uploadFilesAjax.do?subPathKey=fileupload.bbs.qna.subpath"});
// 각 파일별 업로드 성공시 호출됨 // 각 파일별 업로드 성공시 호출됨
myDropzone.on("success", function(file) { myDropzone.on("success", function(file) {
alert("success : " + file.name); alert("success : " + file.name);
}); });
myDropzone.on("complete", function(file) { myDropzone.on("complete", function(file) {
alert("complete : " + file.name); alert("complete : " + file.name);
}); });
myDropzone.on("queuecomplete", function() { myDropzone.on("queuecomplete", function() {
alert("queuecomplete : " + file.name); alert("queuecomplete : " + file.name);
}); });
function fileUploadNow() { function fileUploadNow() {
myDropzone.processQueue(); myDropzone.processQueue();
} }
</script> </script>

View File

@ -1,83 +1,83 @@
<% <%
/** /**
* <pre> * <pre>
* @Class Name : getSampleInfo.jsp * @Class Name : getSampleInfo.jsp
* *
* @Description : RESTful API 호출 샘플 * @Description : RESTful API 호출 샘플
* *
* *
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021) * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
* *
* </pre> * </pre>
* *
* @ ------------ -------- --------------------------- * @ ------------ -------- ---------------------------
* @ 수정일 수정자 수정내용 * @ 수정일 수정자 수정내용
* @ ------------ -------- --------------------------- * @ ------------ -------- ---------------------------
* @ 2021. 6. 15. KNKIM 최초 생성 * @ 2021. 6. 15. KNKIM 최초 생성
* *
* *
* @author 이씨플라자 * DIGITALSHIP KNKIM * @author 이씨플라자 * DIGITALSHIP KNKIM
* @since 2021. 6. 15. * @since 2021. 6. 15.
* @version 1.0 * @version 1.0
* *
*/ */
%> %>
<%@ page language="java" contentType="text/html; charset=UTF-8" %> <%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> <%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> <%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %> <%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
<c:set var="pageTitle">QRCode 회원정보</c:set> <c:set var="pageTitle">QRCode 회원정보</c:set>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>${pageTitle}</title> <title>${pageTitle}</title>
<!-- W2UI --> <!-- W2UI -->
<link rel="stylesheet" type="text/css" href="/nlib/js/w2ui/w2ui-nlib.css" /> <link rel="stylesheet" type="text/css" href="/nlib/js/w2ui/w2ui-nlib.css" />
<script type="text/javascript" src="/nlib/js/w2ui/w2ui-1.5.min.js"></script> <script type="text/javascript" src="/nlib/js/w2ui/w2ui-1.5.min.js"></script>
</head> </head>
<body> <body>
<!-- javascript warning tag --> <!-- javascript warning tag -->
<noscript class="noScriptTitle"><spring:message code="common.noScriptTitle.msg" /></noscript> <noscript class="noScriptTitle"><spring:message code="common.noScriptTitle.msg" /></noscript>
<form:form commandName="reqInfo" <form:form commandName="reqInfo"
action="${pageContext.request.contextPath}/sample/barcode/getMemberQRCode.do" method="post" action="${pageContext.request.contextPath}/sample/barcode/getMemberQRCode.do" method="post"
target="_blank" target="_blank"
onSubmit="fncAuthorInsert(document.forms[0]); return false;"> onSubmit="fncAuthorInsert(document.forms[0]); return false;">
<div id="grid" style="width: 100%; height: 250px;"></div> <div id="grid" style="width: 100%; height: 250px;"></div>
</form:form> </form:form>
<script type="text/javaScript" language="javascript"> <script type="text/javaScript" language="javascript">
$(function () { $(function () {
$('#grid').w2grid({ $('#grid').w2grid({
name: 'grid', name: 'grid',
header: 'List of Names', header: 'List of Names',
columns: [ columns: [
{ field: 'fname', text: '이름', size: '30%' }, { field: 'fname', text: '이름', size: '30%' },
{ field: 'lname', text: '성명', size: '30%' }, { field: 'lname', text: '성명', size: '30%' },
{ field: 'email', text: '이메일', size: '40%' }, { field: 'email', text: '이메일', size: '40%' },
{ field: 'sdate', text: '시작일자', size: '120px' } { field: 'sdate', text: '시작일자', size: '120px' }
], ],
records: [ records: [
{ recid: 1, fname: "Peter", lname: "Jeremia", email: 'peter@mail.com', sdate: '2/1/2010' }, { recid: 1, fname: "Peter", lname: "Jeremia", email: 'peter@mail.com', sdate: '2/1/2010' },
{ recid: 2, fname: "Bruce", lname: "Wilkerson", email: 'bruce@mail.com', sdate: '6/1/2010' }, { recid: 2, fname: "Bruce", lname: "Wilkerson", email: 'bruce@mail.com', sdate: '6/1/2010' },
{ recid: 3, fname: "John", lname: "McAlister", email: 'john@mail.com', sdate: '1/16/2010' }, { recid: 3, fname: "John", lname: "McAlister", email: 'john@mail.com', sdate: '1/16/2010' },
{ recid: 4, fname: "Ravi", lname: "Zacharies", email: 'ravi@mail.com', sdate: '3/13/2007' }, { recid: 4, fname: "Ravi", lname: "Zacharies", email: 'ravi@mail.com', sdate: '3/13/2007' },
{ recid: 5, fname: "William", lname: "Dembski", email: 'will@mail.com', sdate: '9/30/2011' }, { recid: 5, fname: "William", lname: "Dembski", email: 'will@mail.com', sdate: '9/30/2011' },
{ recid: 6, fname: "David", lname: "Peterson", email: 'david@mail.com', sdate: '4/5/2010' } { recid: 6, fname: "David", lname: "Peterson", email: 'david@mail.com', sdate: '4/5/2010' }
] ]
}); });
}); });
</script> </script>
</body> </body>
</html> </html>

View File

@ -1,146 +1,146 @@
<% <%
/** /**
* <pre> * <pre>
* @Class Name : listNotices.jsp * @Class Name : listNotices.jsp
* *
* @Description : JS-GRID 샘플 화면 * @Description : JS-GRID 샘플 화면
* *
* *
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021) * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
* *
* </pre> * </pre>
* *
* @ ------------ -------- --------------------------- * @ ------------ -------- ---------------------------
* @ 수정일 수정자 수정내용 * @ 수정일 수정자 수정내용
* @ ------------ -------- --------------------------- * @ ------------ -------- ---------------------------
* @ 2021. 6. 15. KNKIM 최초 생성 * @ 2021. 6. 15. KNKIM 최초 생성
* *
* *
* @author 이씨플라자 * DIGITALSHIP KNKIM * @author 이씨플라자 * DIGITALSHIP KNKIM
* @since 2021. 6. 15. * @since 2021. 6. 15.
* @version 1.0 * @version 1.0
* *
*/ */
%> %>
<%@ page language="java" contentType="text/html; charset=UTF-8" %> <%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> <%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> <%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %> <%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
<c:set var="pageTitle">공지사항</c:set> <c:set var="pageTitle">공지사항</c:set>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>${pageTitle}</title> <title>${pageTitle}</title>
<!-- GRID --> <!-- GRID -->
<link type="text/css" rel="stylesheet" href="/nlib/js/jsgrid/nlib-jsgrid.css" /> <link type="text/css" rel="stylesheet" href="/nlib/js/jsgrid/nlib-jsgrid.css" />
<link type="text/css" rel="stylesheet" href="/nlib/js/jsgrid/nlib-jsgrid-theme.css" /> <link type="text/css" rel="stylesheet" href="/nlib/js/jsgrid/nlib-jsgrid-theme.css" />
<script src="/nlib/js/jsgrid/nlib-jsgrid.js"></script> <script src="/nlib/js/jsgrid/nlib-jsgrid.js"></script>
</head> </head>
<body> <body>
<form:form commandName="reqInfo" <form:form commandName="reqInfo"
action="${pageContext.request.contextPath}/sample/barcode/getMemberQRCode.do" method="post" action="${pageContext.request.contextPath}/sample/barcode/getMemberQRCode.do" method="post"
target="_blank" target="_blank"
onSubmit="fncAuthorInsert(document.forms[0]); return false;"> onSubmit="fncAuthorInsert(document.forms[0]); return false;">
<div id="jsGrid" name="jsGrid" ></div> <div id="jsGrid" name="jsGrid" ></div>
</form:form> </form:form>
<script type="text/javaScript" language="javascript"> <script type="text/javaScript" language="javascript">
// 그리드 데이터 // 그리드 데이터
var clients = [ var clients = [
{ "noticeNo": 1, "noticeType": "01", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, { "noticeNo": 1, "noticeType": "01", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 2, "noticeType": "02", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, { "noticeNo": 2, "noticeType": "02", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 3, "noticeType": "03", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, { "noticeNo": 3, "noticeType": "03", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 4, "noticeType": "04", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, { "noticeNo": 4, "noticeType": "04", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 5, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, { "noticeNo": 5, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 6, "noticeType": "06", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, { "noticeNo": 6, "noticeType": "06", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 7, "noticeType": "06", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, { "noticeNo": 7, "noticeType": "06", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, { "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, { "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, { "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, { "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, { "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, { "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, { "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, { "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, { "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, { "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, { "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, { "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, { "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, { "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, { "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, { "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, { "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, { "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, { "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, { "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, { "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, { "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, { "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, { "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, { "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, { "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, { "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, { "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, { "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, { "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, { "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 9, "noticeType": "01", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" } { "noticeNo": 9, "noticeType": "01", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }
]; ];
// 그리드내 콤보박스 값 // 그리드내 콤보박스 값
var noticeTypes = [ var noticeTypes = [
{ Name: "공지" , Id: "01" }, { Name: "공지" , Id: "01" },
{ Name: "자료" , Id: "02" }, { Name: "자료" , Id: "02" },
{ Name: "모집" , Id: "03" }, { Name: "모집" , Id: "03" },
{ Name: "입찰" , Id: "04" }, { Name: "입찰" , Id: "04" },
{ Name: "발표" , Id: "05" }, { Name: "발표" , Id: "05" },
{ Name: "이벤트", Id: "06" } { Name: "이벤트", Id: "06" }
]; ];
// 그리드 생성 // 그리드 생성
$("#jsGrid").jsGrid({ $("#jsGrid").jsGrid({
width: "100%", width: "100%",
height: "100%", height: "100%",
inserting: false, inserting: false,
editing: false, editing: false,
sorting: true, sorting: true,
paging: true, paging: true,
pageSize: 10, pageSize: 10,
pageButtonCount: 10, pageButtonCount: 10,
pageIndex: 1, pageIndex: 1,
pageFirstText: " << ", pageFirstText: " << ",
pagePrevText: " < ", pagePrevText: " < ",
pageLastText: " >> ", pageLastText: " >> ",
pageNextText: " > ", pageNextText: " > ",
pagerFormat: "{first} {prev} {pages} {next} {last}", pagerFormat: "{first} {prev} {pages} {next} {last}",
data: clients, data: clients,
fields: [ fields: [
{ title:"번호", name: "noticeNo" , type: "number" , width: 50, align: "center"}, { title:"번호", name: "noticeNo" , type: "number" , width: 50, align: "center"},
{ title:"유형", name: "noticeType", type: "select", width: 80, align: "center", items: noticeTypes, valueField: "Id", textField: "Name" }, { title:"유형", name: "noticeType", type: "select", width: 80, align: "center", items: noticeTypes, valueField: "Id", textField: "Name" },
{ title:"제목", name: "title", type: "text" , width: 200, align: "left" }, { title:"제목", name: "title", type: "text" , width: 200, align: "left" },
{ title:"조회수", name: "readCount", type: "number", width: 50, align: "center" }, { title:"조회수", name: "readCount", type: "number", width: 50, align: "center" },
{ title:"등록일", name: "regDate", type: "text", width: 100, align: "center"} { title:"등록일", name: "regDate", type: "text", width: 100, align: "center"}
] ]
}); });
</script> </script>
</body> </body>
</html> </html>

View File

@ -1,200 +1,216 @@
<% <%
/** /**
* <pre> * <pre>
* @Class Name : listQnAs.jsp * @Class Name : listQnAs.jsp
* *
* @Description : 묻고답하기 목록을 조회한다. * @Description : 묻고답하기 목록을 조회한다.
* *
* *
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021) * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
* *
* </pre> * </pre>
* *
* @ ------------ -------- --------------------------- * @ ------------ -------- ---------------------------
* @ 수정일 수정자 수정내용 * @ 수정일 수정자 수정내용
* @ ------------ -------- --------------------------- * @ ------------ -------- ---------------------------
* @ 2021. 7. 13. KNKIM 최초 생성 * @ 2021. 7. 13. KNKIM 최초 생성
* *
* *
* @author 이씨플라자 * DIGITALSHIP KNKIM * @author 이씨플라자 * DIGITALSHIP KNKIM
* @since 2021. 7. 13. * @since 2021. 7. 13.
* @version 1.0 * @version 1.0
* *
*/ */
%> %>
<%@ page language="java" contentType="text/html; charset=UTF-8" %> <%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> <%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> <%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %> <%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
<c:set var="pageTitle">묻고답하기</c:set> <c:set var="pageTitle">묻고답하기</c:set>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>${pageTitle}</title> <title>${pageTitle}</title>
<!-- GRID --> <!-- GRID -->
<link type="text/css" rel="stylesheet" href="/nlib/js/jsgrid/nlib-jsgrid.css" /> <link type="text/css" rel="stylesheet" href="/nlib/js/jsgrid/nlib-jsgrid.css" />
<link type="text/css" rel="stylesheet" href="/nlib/js/jsgrid/nlib-jsgrid-theme.css" /> <link type="text/css" rel="stylesheet" href="/nlib/js/jsgrid/nlib-jsgrid-theme.css" />
<script src="/nlib/js/jsgrid/nlib-jsgrid.js"></script> <script src="/nlib/js/jsgrid/nlib-jsgrid.js"></script>
</head> </head>
<body onload="fn_init()"> <body onload="fn_init()">
<h1>묻고답하기</h1> <h1>${pageTitle }</h1>
<form name="articleForm" <form name="articleForm" id="articleForm"
action="${pageContext.request.contextPath}/board/listQnAs.do" action="${pageContext.request.contextPath}/board/listQnAs.do"
method="post" method="post">
onSubmit="fn_search_article(); return false;">
<!-- 검색조건 -->
<!-- 검색조건 --> <select name="pageRows" id="pageRows" title="목록에 보여줄 글 개수">
<select name="pageRows" id="pageRows" title="목록에 보여줄 글 개수"> <option value="10">10개씩 보기</option>
<option value="10">10개씩 보기</option> <option value="50">50개씩 보기</option>
<option value="50">50개씩 보기</option> <option value="100">100개씩 보기</option>
<option value="100">100개씩 보기</option> </select>
</select>
<input type="text" name="pageNo" id="pageNo" title="페이지번호" value="1" size="5" maxlength="5" />
<input type="text" name="pageNo" id="pageNo" title="페이지번호" value="1" size="5" maxlength="5" /> <input type="text" name="searchKeyword" id="searchKeyword" title="검색어" value="${searchKeyword }" size="35" maxlength="50" />
<input type="button" name="btnSearch" id="btnSearch" value="검색" />
<input type="text" name="searchKeyword" id="searchKeyword" title="검색어" value="" size="35" maxlength="50" />
<div id="jsGrid" name="jsGrid" style="height: 100%"></div>
<input type="submit" name="btnSearch" id="btnSearch" value="검색" />
<input type="button" name="btnNew" id="btnNew" value="글쓰기" <button type="button" name="btnNew" id="btnNew" class="float"
onclick="javascript:location.href='${pageContext.request.contextPath}/board/insertQnAForm.do';" /> onclick="javascript:location.href='${pageContext.request.contextPath}/board/insertQnAForm.do';">글쓰기</button>
<div id="jsGrid" name="jsGrid" ></div> <input type="text" name="articleNo" id="articleNo" value="" title="선택글번호" readonly />
</form> </form>
<script type="text/javaScript" language="javascript">
// 그리드 데이터
var clients = [ <script type="text/javaScript" language="javascript">
{ "noticeNo": 1, "noticeType": "01", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 2, "noticeType": "02", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, //=======================================================
{ "noticeNo": 3, "noticeType": "03", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, // 그리드내 선택옵션 코드값 설정 : 공지사항 유형 코드 (각 요청에 맞게 조정)
{ "noticeNo": 4, "noticeType": "04", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, //=======================================================
{ "noticeNo": 5, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, var articleTypes = [
{ "noticeNo": 6, "noticeType": "06", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, { Name: "공지" , Id: "01" },
{ "noticeNo": 7, "noticeType": "06", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, { Name: "자료" , Id: "02" },
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, { Name: "모집" , Id: "03" },
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, { Name: "입찰" , Id: "04" },
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, { Name: "발표" , Id: "05" },
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, { Name: "이벤트", Id: "06" }
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, ];
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, //=======================================================
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, // 그리드 생성 환경설정
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, //=======================================================
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, $("#jsGrid").jsGrid({
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, autoload: true, /* 화면로드된 후, 자동 loadData 처리 여부 */
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, controller: {
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, loadData: function (filter) {
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, var data = $.Deferred();
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, //======================================
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, // 요청 정보 구성 : 시작 (각 요청에 맞게 조정)
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, //======================================
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, var reqUrl = "${pageContext.request.contextPath}/board/listQnAsAjax.do";
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, var searchKeyword = document.articleForm.searchKeyword.value;
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, //var pageNo = document.articleForm.pageNo.value;
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, var pageNo = filter.pageIndex;
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, //var pageRows = document.articleForm.pageRows.value;
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, var pageRows = filter.pageSize;
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, var inputData = {
{ "noticeNo": 8, "noticeType": "05", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, "searchKeyword" : searchKeyword /*encodeURIComponent(searchKeyword)*/
{ "noticeNo": 9, "noticeType": "01", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" } , "pageNo" : pageNo
]; , "pageRows": pageRows};
// 그리드내 콤보박스 값 console.log(JSON.stringify(inputData));
var noticeTypes = [
{ Name: "공지" , Id: "01" }, //--------------------------------------
{ Name: "자료" , Id: "02" }, // 요청 처리
{ Name: "모집" , Id: "03" }, //--------------------------------------
{ Name: "입찰" , Id: "04" }, $.ajax({
{ Name: "발표" , Id: "05" }, type: "post",
{ Name: "이벤트", Id: "06" } contentType: "application/json; charset=utf-8",
]; url: reqUrl,
dataType: "json",
// 그리드 생성 data: JSON.stringify(inputData),
$("#jsGrid").jsGrid({ }).done(function(response){
width: "100%", // 그리드 데이터 예시 : [{ "articleNo": 1, "articleType": "01" }, { "articleNo": 2, "articleType": "02" }]
height: "100%", data.resolve(JSON.parse(response));
});
inserting: false, return data.promise();
editing: false, } // loadData
sorting: true, },
paging: true,
pageSize: 10, rowClick: function(args) {
pageButtonCount: 10,
pageIndex: 1, // 클릭된 행의 자료 객체
pageFirstText: " << ", var getData = args.item;
pagePrevText: " < ",
pageLastText: " >> ", // 추출할 컬럼의 데이터 가져오기
pageNextText: " > ", var articleNo = getData["articleNo"];
pagerFormat: "{first} {prev} {pages} {next} {last}",
// 상세 내용 보기
fn_view_detail(articleNo);
/* 이하만 설정 */
/* },
data: clients,
*/ //======================================
// 그리드 컬럼 정의 (각 요청에 맞게 조정)
fields: [ //======================================
{ title:"번호", name: "noticeNo" , type: "number" , width: 50, align: "center"}, fields: [
{ title:"유형", name: "noticeType", type: "select", width: 80, align: "center", items: noticeTypes, valueField: "Id", textField: "Name" }, { title:"번호", name: "articleNo" , type: "number" , width: 50, align: "center"},
{ title:"제목", name: "title", type: "text" , width: 200, align: "left" }, { title:"유형", name: "articleType", type: "select", width: 80, align: "center", items: articleTypes, valueField: "Id", textField: "Name" },
{ title:"조회수", name: "readCount", type: "number", width: 50, align: "center" }, { title:"제목", name: "title", type: "text" , width: 200, align: "left" },
{ title:"등록일", name: "regDate", type: "text", width: 100, align: "center"} { title:"조회수", name: "readCount", type: "number", width: 50, align: "center" },
] { title:"등록일", name: "regDate", type: "text", width: 100, align: "center"}
}); ]
});
function fn_search_article() {
var searchKeyword = document.articleForm.searchKeyword.value;
var pageNo = document.articleForm.pageNo.value; // 선택한 게시글 상세 보기로 이동
var pageRows = document.articleForm.pageRows.value; function fn_view_detail(articleNo) {
$("#articleNo").val(articleNo);
var inputData = { $("#articleForm").attr("action", "${pageContext.request.contextPath}/board/selectQnA.do");
"searchKeyword" : searchKeyword /*encodeURIComponent(searchKeyword)*/ $("#articleForm").submit();
, "pageNo" : pageNo }
, "pageRows": pageRows};
//lert(JSON.stringify(inputData)); function fn_search_article() {
var searchKeyword = document.articleForm.searchKeyword.value;
$.ajax({ var pageNo = document.articleForm.pageNo.value;
url:"${pageContext.request.contextPath}/board/listQnAsAjax.do", var pageRows = document.articleForm.pageRows.value;
contentType: "application/json; charset=utf-8", /* */
type: "post", var inputData = {
data: JSON.stringify(inputData), "searchKeyword" : searchKeyword /*encodeURIComponent(searchKeyword)*/
dataType:'json', /* Server Response Data Type */ ,
success: function(returnData, status){ "pageNo" : pageNo,
var jsonObj = JSON.parse(returnData); "pageRows" : pageRows
alert("record=" + JSON.stringify(jsonObj.info.record)); };
$("#jsGrid").jsGrid("loadData", jsonObj.info.record)
}, //lert(JSON.stringify(inputData));
error: function(data){
alert("조회에 실패하였습니다.\n" + data.code + " : " + data.message); $.ajax({
} url : "${pageContext.request.contextPath}/board/listQnAsAjax.do",
}); contentType : "application/json; charset=utf-8", /* */
} type : "post",
data : JSON.stringify(inputData),
function fn_init() { dataType : 'json', /* Server Response Data Type */
fn_search_article(); async : true,
document.articleForm.searchKeyword.focus(); success : function(returnData, status) {
} var jsonObj = JSON.parse(returnData);
</script> alert("record=" + JSON.stringify(jsonObj));
$("#jsGrid").jsGrid("data") = jsonObj;
</body> },
</html> error : function(data) {
alert("조회에 실패하였습니다.\n" + data.code + " : " + data.message);
}
});
}
function fn_init() {
//fn_search_article();
document.articleForm.searchKeyword.focus();
//$("#jsGrid").jsGrid("loadData");
//$("#jsGrid").jsGrid("data") = client2;
}
</script>
</body>
</html>

View File

@ -1,83 +1,157 @@
<% <%
/** /**
* <pre> * <pre>
* @Class Name : getSampleInfo.jsp * @Class Name : selectQnA.jsp
* *
* @Description : RESTful API 호출 샘플 * @Description : 묻고답하기 상세내용을 조회한다.
* *
* *
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021) * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
* *
* </pre> * </pre>
* *
* @ ------------ -------- --------------------------- * @ ------------ -------- ---------------------------
* @ 수정일 수정자 수정내용 * @ 수정일 수정자 수정내용
* @ ------------ -------- --------------------------- * @ ------------ -------- ---------------------------
* @ 2021. 6. 15. KNKIM 최초 생성 * @ 2021. 7. 22. KNKIM 최초 생성
* *
* *
* @author 이씨플라자 * DIGITALSHIP KNKIM * @author 이씨플라자 * DIGITALSHIP KNKIM
* @since 2021. 6. 15. * @since 2021. 7. 22.
* @version 1.0 * @version 1.0
* *
*/ */
%> %>
<%@ page language="java" contentType="text/html; charset=UTF-8" %> <%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> <%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> <%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %> <%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
<c:set var="pageTitle">QRCode 회원정보</c:set>
<c:set var="pageTitle">묻고답하기 - 상세조회</c:set>
<!DOCTYPE html>
<html> <!DOCTYPE html>
<head> <html>
<title>${pageTitle}</title> <head>
<title>${pageTitle}</title>
<!-- W2UI -->
<link rel="stylesheet" type="text/css" href="/nlib/js/w2ui/w2ui-nlib.css" /> <!-- GRID -->
<script type="text/javascript" src="/nlib/js/w2ui/w2ui-1.5.min.js"></script> <link type="text/css" rel="stylesheet" href="/nlib/js/jsgrid/nlib-jsgrid.css" />
</head> <link type="text/css" rel="stylesheet" href="/nlib/js/jsgrid/nlib-jsgrid-theme.css" />
<script src="/nlib/js/jsgrid/nlib-jsgrid.js"></script>
<body>
<!-- javascript warning tag --> </head>
<noscript class="noScriptTitle"><spring:message code="common.noScriptTitle.msg" /></noscript>
<form:form commandName="reqInfo" <body>
action="${pageContext.request.contextPath}/sample/barcode/getMemberQRCode.do" method="post"
target="_blank" <h1>${pageTitle }</h1>
onSubmit="fncAuthorInsert(document.forms[0]); return false;">
<span style="color:red;">${message }</span>
<div id="grid" style="width: 100%; height: 250px;"></div> <br />
</form:form> <form name="articleForm" id="articleForm"
action="${pageContext.request.contextPath}/board/listQnAs.do"
method="post">
<script type="text/javaScript" language="javascript">
$(function () { <input type="text" name="pageNo" id="pageNo" title="페이지번호" value="${pageNo}" size="5" maxlength="5" readonly />
$('#grid').w2grid({ <input type="text" name="pageRows" id="pageRows" title="목록에 보여줄 글 개" value="${pageRows}" size="5" maxlength="5" readonly />
name: 'grid', <input type="text" name="searchKeyword" id="searchKeyword" title="검색어" value="${searchKeyword}" size="35" maxlength="50" readonly />
header: 'List of Names', <input type="text" name="articleNo" id="articleNo" value="${articleNo}" title="선택글번호" readonly />
columns: [ <input type="text" name="articlePassword" id="articlePassword" value="${articlePassword}" title="글비밀번호" readonly />
{ field: 'fname', text: '이름', size: '30%' },
{ field: 'lname', text: '성명', size: '30%' }, <table class="table_content" style="width:100% !important;">
{ field: 'email', text: '이메일', size: '40%' }, <tr>
{ field: 'sdate', text: '시작일자', size: '120px' } <td>유형</td>
], <td>Q & A</td>
records: [ <td>작성자 : ${article.regUserName }</td>
{ recid: 1, fname: "Peter", lname: "Jeremia", email: 'peter@mail.com', sdate: '2/1/2010' }, <td>작성일 : ${article.regDate }</td>
{ recid: 2, fname: "Bruce", lname: "Wilkerson", email: 'bruce@mail.com', sdate: '6/1/2010' }, <td>상태 : ${article.repStatus }</td>
{ recid: 3, fname: "John", lname: "McAlister", email: 'john@mail.com', sdate: '1/16/2010' }, </tr>
{ recid: 4, fname: "Ravi", lname: "Zacharies", email: 'ravi@mail.com', sdate: '3/13/2007' }, <tr>
{ recid: 5, fname: "William", lname: "Dembski", email: 'will@mail.com', sdate: '9/30/2011' }, <td rowspan="2">질문내용</td>
{ recid: 6, fname: "David", lname: "Peterson", email: 'david@mail.com', sdate: '4/5/2010' } <td colspan="4">${article.contentQeust}</td>
] </tr>
}); <tr>
}); <td colspan="4">${article.contentQeustFile}</td>
</script> </tr>
<tr>
</body> <td rowspan="2">답변내용</td>
</html> <td colspan="4">${article.contentReply}</td>
</tr>
<tr>
<td colspan="4">${article.contentReplyFile}</td>
</tr>
</table>
<br/>
<table class="table_content" style="width:100% !important;">
<tr>
<td>이전글</td>
<td>Q&A</td>
<td><a href=#" onclick="fn_view_detail('${preArticle.articleNo }')">${preArticle.title }</a></td>
<td>작성자 : ${preArticle.regUserName }</td>
<td>작성일 : ${preArticle.regDate }</td>
<td>상태 : ${preArticle.repStatus }</td>
</tr>
<tr>
<td>다음글</td>
<td>Q&A</td>
<td><a href=#" onclick="fn_view_detail('${nextArticle.articleNo }')">${nextArticle.title }</a></td>
<td>작성자 : ${nextArticle.regUserName }</td>
<td>작성일 : ${nextArticle.regDate }</td>
<td>상태 : ${nextArticle.repStatus }</td>
</tr>
</table>
<button type="button" name="btnNew" id="btnNew" class="float"
onclick="fn_list()">목록</button>
<button type="button" name="btnNew" id="btnNew" class="float"
onclick="fn_updatePassword()">수정</button>
</form>
<script type="text/javaScript" language="javascript">
//선택한 게시글 상세 보기로 이동
function fn_view_detail(articleNo) {
$("#articleNo").val(articleNo);
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/selectQnA.do");
$("#articleForm").submit();
}
// 선택한 게시글 상세 보기로 이동
function fn_list() {
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/listQnAs.do");
$("#articleForm").submit();
}
// 수정을 위한 비밀번호 입력
function fn_updateForm(passwd) {
if(passwd == null || passwd == "") {
alert("수정을 위한 게시물의 비밀번호를 입력하여 주시기 바랍니다.");
return;
}
$("#articlePassword").val(passwd);
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/updateQnAForm.do");
$("#articleForm").submit();
}
// 게시글 수정 화면으로 이동
function fn_updatePassword() {
fn_prompt_password("비밀번호를 입력하여 주시기 바랍니다.", "fn_updateForm")
}
</script>
</body>
</html>