From 8db2f7292df0b693842acc42db6cc5af2728158c Mon Sep 17 00:00:00 2001 From: KNKIM Date: Thu, 4 Nov 2021 18:15:13 +0900 Subject: [PATCH] =?UTF-8?q?QNA=20=EB=93=B1=20=ED=85=9C=ED=94=8C=EB=A6=BF?= =?UTF-8?q?=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/nlib/bbs/service/ArticleVO.java | 10 + .../nlib/bbs/service/impl/QnaServiceImpl.java | 119 +++-- src/main/java/nlib/bbs/web/QnaController.java | 150 +++++- .../mapper/nlib/bbs/AttachFileDAO_SQL.xml | 2 + .../mapper/nlib/bbs/QnaDAO_SQL.xml | 4 +- .../WEB-INF/jsp/nlib/bbs/insertQnaForm.jsp | 278 ++++++----- .../WEB-INF/jsp/nlib/bbs/listAncmnts.jsp | 38 +- .../webapp/WEB-INF/jsp/nlib/bbs/listFaqs.jsp | 37 +- .../webapp/WEB-INF/jsp/nlib/bbs/listQnas.jsp | 433 +++++++++--------- .../WEB-INF/jsp/nlib/bbs/selectQnaArticle.jsp | 268 +++++------ .../WEB-INF/jsp/nlib/cmm/headerSubPart.jsp | 13 +- src/main/webapp/WEB-INF/jsp/nlib/cmm/home.jsp | 2 +- src/main/webapp/images/img/img-logo.svg | 3 + src/main/webapp/js/fileupload/dropzone.js | 34 +- 14 files changed, 871 insertions(+), 520 deletions(-) create mode 100644 src/main/webapp/images/img/img-logo.svg diff --git a/src/main/java/nlib/bbs/service/ArticleVO.java b/src/main/java/nlib/bbs/service/ArticleVO.java index abcaa58a..14e694a0 100644 --- a/src/main/java/nlib/bbs/service/ArticleVO.java +++ b/src/main/java/nlib/bbs/service/ArticleVO.java @@ -37,6 +37,8 @@ public class ArticleVO extends PagingVO { private String bdAttachFileId; /* 첨부파일아이디 */ private String attachYn; /* 첨부파일존재여부 */ private List attachFiles; /* 첨부파일목록 */ + private List removedAttachFiles; /* 삭제첨부파일목록 */ + private String regId; /* 등록자아이디 */ private String regNm; /* 등록자명 */ @@ -333,4 +335,12 @@ public class ArticleVO extends PagingVO { this.resultCode = resultCode; } + public List getRemovedAttachFiles() { + return removedAttachFiles; + } + + public void setRemovedAttachFiles(List removedAttachFiles) { + this.removedAttachFiles = removedAttachFiles; + } + } diff --git a/src/main/java/nlib/bbs/service/impl/QnaServiceImpl.java b/src/main/java/nlib/bbs/service/impl/QnaServiceImpl.java index b7b2f890..445af779 100644 --- a/src/main/java/nlib/bbs/service/impl/QnaServiceImpl.java +++ b/src/main/java/nlib/bbs/service/impl/QnaServiceImpl.java @@ -12,6 +12,7 @@ import nlib.bbs.service.ArticleVO; import nlib.bbs.service.AttachFileService; import nlib.bbs.service.AttachFileVO; import nlib.bbs.service.QnaService; +import nlib.util.StringUtil; import nlib.util.UUID; @Service("qnaService") @@ -49,36 +50,83 @@ public class QnaServiceImpl extends BoardServiceImpl implements QnaService articleVO.setResultMessage("정상적으로 등록되었습니다."); if(articleVO.getAttachFileCnt() > 0) { - int savedCnt = 0; - List attachFileList = articleVO.getAttachFiles(); - - // 첨부파일그룹 등록 - int groupCnt = attachFileService.insertAttachFileGroup(attachFileList.get(0)); - - if(groupCnt > 0) { - - // 첨부파일 등록 - for(int i=0; i 첨부파일 등록에 실패하였습니다 : " + attachFileVO.getOrignlFileNm()); - } - } - - if(savedCnt != articleVO.getAttachFileCnt()) { - articleVO.setResultMessage(String.format("총 %d개 파일 중 %개 파일만 정상등록되었습니다.", articleVO.getAttachFileCnt(), savedCnt)); - } - - } else { - articleVO.setResultMessage("게시글은 등록되었으나, 첨부파일그룹 등록에 실패하여 첨부파일 등록처리가 수행되지 않았습니다."); - } - + addAttachFiles(articleVO); } return articleVO; } + + /** + * 첨부파일을 추가한다. + * + * @param articleVO + * @throws Exception + */ + public void addAttachFiles(ArticleVO articleVO) throws Exception { + int savedCnt = 0; + List attachFileList = articleVO.getAttachFiles(); + + // 첨부파일그룹 등록 + int groupCnt = attachFileService.insertAttachFileGroup(attachFileList.get(0)); + + if(groupCnt > 0) { + + // 첨부파일 등록 + for(int i=0; i 첨부파일 등록에 실패하였습니다 : " + attachFileVO.getOrignlFileNm()); + } + } + + if(savedCnt != articleVO.getAttachFileCnt()) { + articleVO.setResultMessage(String.format("총 %d개 파일 중 %개 파일만 정상등록되었습니다.", articleVO.getAttachFileCnt(), savedCnt)); + } + + } else { + articleVO.setResultMessage("게시글은 등록되었으나, 첨부파일그룹 등록에 실패하여 첨부파일 등록처리가 수행되지 않았습니다."); + } + } + + + /** + * 첨부파일을 삭제한다. + * + * @param articleVO + * @throws Exception + */ + public void removeAttachFiles(ArticleVO articleVO) throws Exception { + int savedCnt = 0; + List attachFileList = articleVO.getRemovedAttachFiles(); + + if(attachFileList == null || attachFileList.size() < 1) return; + + String attachFileId = attachFileList.get(0).getAttachFileId(); + + if(StringUtil.isNotEmpty(attachFileId)) { + + // 첨부파일 삭제 + for(int i=0; i 첨부파일 삭제에 실패하였습니다 : " + attachFileVO.getOrignlFileNm()); + } + } + + if(savedCnt != attachFileList.size()) { + articleVO.setResultMessage(String.format("총 %d개 파일 중 %개 파일만 정상 삭제되었습니다.", attachFileList.size(), savedCnt)); + } + + } else { + articleVO.setResultMessage("첨부파일그룹ID 정보가 누락되어 첨부파일 삭제가 불가합니다."); + } + + return; + } /** * Q&A 게시글을 수정한다. @@ -86,8 +134,23 @@ public class QnaServiceImpl extends BoardServiceImpl implements QnaService * @param reqVO * @return */ - public int updateArticle(ArticleVO articleVO) { - return qnaDAO.updateArticle(articleVO); + public int updateArticle(ArticleVO articleVO) throws Exception { + int updateRet = qnaDAO.updateArticle(articleVO); + + // 첨부파일 추가 + List addedFiles = articleVO.getAttachFiles(); + if(addedFiles != null && addedFiles.size() > 0) { + addAttachFiles(articleVO); + } + + List removedAttachFiles = articleVO.getRemovedAttachFiles(); + if(removedAttachFiles != null && removedAttachFiles.size() > 0) { + removeAttachFiles(articleVO); + } + + // 첨부파일 삭제 + + return updateRet; } /** diff --git a/src/main/java/nlib/bbs/web/QnaController.java b/src/main/java/nlib/bbs/web/QnaController.java index baa49d31..093017b7 100644 --- a/src/main/java/nlib/bbs/web/QnaController.java +++ b/src/main/java/nlib/bbs/web/QnaController.java @@ -177,7 +177,7 @@ public class QnaController extends NlibCommonController { searchArticleVO = redirectSearchArticleVO; } else { ArticleVO articleVO = qnaService.selectArticle(searchArticleVO); - if(articleVO != null && StringUtil.isEmpty(redirectSearchArticleVO.getTitle())) { + if(articleVO != null && !StringUtil.isEmpty(articleVO.getTitle())) { articleVO.setSearchKeyword(searchArticleVO.getSearchKeyword()); articleVO.setPageIndex(searchArticleVO.getPageIndex()); articleVO.setPageSize(searchArticleVO.getPageSize()); @@ -303,7 +303,7 @@ public class QnaController extends NlibCommonController { } } - + //--------------------------- // 등록처리 //--------------------------- @@ -331,7 +331,9 @@ public class QnaController extends NlibCommonController { @RequestMapping("/bbs/updateQnaArticle.do") public String updateQnaArticle( HttpServletRequest request - , ArticleVO articleVO + , ArticleVO articleVO + , String fileList + , String removedfile , RedirectAttributes redirectAttrs , ModelMap model) throws Exception { @@ -346,6 +348,148 @@ public class QnaController extends NlibCommonController { return "redirect:/bbs/insertQnaForm.do"; } + + //--------------------------- + // 첨부파일 정보 설정 + //--------------------------- + if(StringUtil.isNotEmpty(fileList)) { + + String fileListJsonStr = fileList; + if(fileListJsonStr.startsWith("&")) fileListJsonStr = StringEscapeUtils.unescapeHtml(fileListJsonStr); + if(fileListJsonStr.startsWith("\"")) fileListJsonStr = fileListJsonStr.substring(1); + if(fileListJsonStr.endsWith("\"")) fileListJsonStr = fileListJsonStr.substring(0, fileListJsonStr.length()-1); + fileListJsonStr = fileListJsonStr.replaceAll("\\\\", ""); + + log.debug("fileListJsonStr : " + fileListJsonStr); + + ObjectMapper mapper = new ObjectMapper(); + List> fileListObj = null; + try { + fileListObj = mapper.readValue(fileListJsonStr, new TypeReference>>() { + }); + + for (Map map : fileListObj) { + MapUtils.debugPrint(System.out, "map", map); + } + + } catch (JsonMappingException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (JsonProcessingException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + if(fileListObj != null && fileListObj.size() > 0) { + + String attachFileId = (String)(fileListObj.get(0).get("attachFileId")); + if(StringUtil.isEmpty(attachFileId)) { + log.error("첨부파일 아이디(attachFileId) 값은 필수 항목입니다. 첨부파일 처리에 실패하였습니다. 그러나, 게시물 등록은 계속 진행됩니다."); + } + + if(StringUtil.isNotEmpty(attachFileId)) { + articleVO.setBdAttachFileId(attachFileId); + + String fileSStreCours = NlibProperty.getProperty("fileupload.base.path") + NlibProperty.getProperty("fileupload.bbs.qna.subpath") + "/"; + List attachFiles = new ArrayList(); + + for(int i=0; i> removedFileListObj = null; + try { + removedFileListObj = mapper.readValue(removedFileListJsonStr, new TypeReference>>() { + }); + + for (Map map : removedFileListObj) { + MapUtils.debugPrint(System.out, "map", map); + } + + } catch (JsonMappingException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (JsonProcessingException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + if(removedFileListObj != null && removedFileListObj.size() > 0) { + + String attachFileId = (String)(removedFileListObj.get(0).get("attachFileId")); + if(StringUtil.isEmpty(attachFileId)) { + log.error("첨부파일 아이디(attachFileId) 값은 필수 항목입니다. 첨부파일 삭제에 실패하였습니다. 그러나, 게시물 등록은 계속 진행됩니다."); + } + + if(StringUtil.isNotEmpty(attachFileId)) { + articleVO.setBdAttachFileId(attachFileId); + + String fileSStreCours = NlibProperty.getProperty("fileupload.base.path") + NlibProperty.getProperty("fileupload.bbs.qna.subpath") + "/"; + List removedAttachFiles = new ArrayList(); + + for(int i=0; i diff --git a/src/main/resources/egovframework/mapper/nlib/bbs/QnaDAO_SQL.xml b/src/main/resources/egovframework/mapper/nlib/bbs/QnaDAO_SQL.xml index 22f9775b..79df2a89 100644 --- a/src/main/resources/egovframework/mapper/nlib/bbs/QnaDAO_SQL.xml +++ b/src/main/resources/egovframework/mapper/nlib/bbs/QnaDAO_SQL.xml @@ -36,6 +36,7 @@ , IFNULL(A.ANSWER_YN, 'N') AS ANSWER_YN , IFNULL(A.USE_YN, 'Y') AS USE_YN , IFNULL(A.SECRET_YN, 'N') AS SECRET_YN + , IFNULL(A.EMAIL_RECV_YN, 'N') AS EMAIL_RECV_YN , A.VIEW_CNT , CASE WHEN A.BD_ATTACH_FILE_ID IS NULL OR A.BD_ATTACH_FILE_ID = '' THEN 'N' ELSE 'Y' END AS ATTACH_YN , DATE_FORMAT(A.REG_DD, '%Y-%m-%d') AS REG_DD @@ -87,6 +88,7 @@ , A.TITLE , A.CONTENT , IFNULL(A.ANSWER_YN, 'N') AS ANSWER_YN + , IFNULL(A.EMAIL_RECV_YN, 'N') AS EMAIL_RECV_YN , A.ANSWER , IFNULL(A.USE_YN, 'Y') AS USE_YN , IFNULL(A.SECRET_YN, 'N') AS SECRET_YN @@ -94,6 +96,7 @@ , A.BD_ATTACH_FILE_ID , CASE WHEN A.BD_ATTACH_FILE_ID IS NULL OR A.BD_ATTACH_FILE_ID = '' THEN 'N' ELSE 'Y' END AS ATTACH_YN , DATE_FORMAT(A.REG_DD, '%Y-%m-%d') AS REG_DD + , DATE_FORMAT(A.MOD_DD, '%Y-%m-%d') AS MOD_DD , C.USER_NM AS REG_NM , CASE WHEN #{loginedMbInfoId} IS NULL OR #{loginedMbInfoId} = '' THEN 'N' @@ -114,7 +117,6 @@ ON A.REG_ID = C.USER_ID WHERE A.QNA_ID = #{articleId} AND IFNULL(A.USE_YN, 'Y') = 'Y' - ORDER BY A.REG_DD DESC ]]> diff --git a/src/main/webapp/WEB-INF/jsp/nlib/bbs/insertQnaForm.jsp b/src/main/webapp/WEB-INF/jsp/nlib/bbs/insertQnaForm.jsp index b562dd7a..cc1dac1c 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/bbs/insertQnaForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/bbs/insertQnaForm.jsp @@ -30,22 +30,19 @@ <%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> <%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %> +Q&A - Q&A - 수정 + 수정 - Q&A - 등록 + 등록 - - - -${pageTitle} - - + @@ -57,6 +54,7 @@ - - -

${pageTitle }

- -메시지 : ${message } -
- -
+ +
+

Q&A 섹션영역

+
+
+
+
    +
  • HOME
  • +
  • 고객지원
  • +
  • ${pageTitle }
  • +
+
    +
  • ${pageTitle } ${pageTitleSub }
  • +
+
+
화살표 아이콘
+
+
+ +
+
+
+ Q&A 작성 +

* 표시는 필수 입력 항목입니다.

+
+
    + + + + + + + + + + +
    +
  • +
    제목
    +
    + delFileList : + bdAttachFileId : + + +
    +
  • +
  • +
    + + + checked /> + +
    +
  • +
  • +
    답변메일 수신여부
    +
    + checked /> + +
    +
  • +
  • +
    내용
    +
    + +
    +
  • +
    + + +
  • +
    첨부파일
    +
    +
    +
    + + +
    +
    + +
    +
  • +
+
+
+ + +
+
+
+
+ +
+
+
- - - - - - - - -  
-  
- - - - - - - - - - - - - - - - - - - - - - - -
제목 -
- ${title} -
작성자 - - -
비밀글 checked - />
-
답변메일 수신여부 checked - /> - ${searchArticle.email} - (답변 수신메일 주소는 내 정보에서 수정하실 수 있습니다.) -
-
질문내용
-
- -
- - - - - - - 


- -
-
-
-
- 이곳에 파일을 끌어다 놓거나, 클릭하여 올릴 파일을 선택하세요. -
-
-
- - - diff --git a/src/main/webapp/WEB-INF/jsp/nlib/bbs/listAncmnts.jsp b/src/main/webapp/WEB-INF/jsp/nlib/bbs/listAncmnts.jsp index 44191c91..56fea3e8 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/bbs/listAncmnts.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/bbs/listAncmnts.jsp @@ -60,7 +60,8 @@ // 선택한 글 상세 보기로 이동 function fn_viewDetail(articleId) { - + $('#articleForm').removeAttr('onsubmit'); + $("#articleForm").attr("action", "${pageContext.request.contextPath}/bbs/selectAncmntArticle.do"); $("#articleId").val(articleId); $("#articleForm").submit(); } @@ -124,21 +125,27 @@ } // 기존 데이터 CLEAR - $( "ul.list-notice li").not('.t-tit-line').remove(); + $( "ul.list-notice li").not('.t-tit-line').not('.no-result').remove(); - // 출력 - $.each(jsonObj.data,function(key,obj) { - var li = $(document.createElement('li')); - li.append($('').attr('class', 't-num').html(obj.rno)); - li.append($('').attr('class', 't-type').html((obj.notiYn == "Y" ? '공지' : ''))); - li.append($('').attr('class', 't-tit').html("" + obj.title + "")); - li.append($('').attr('class', 't-writer').html(obj.regNm)); - li.append($('').attr('class', 't-date').html(obj.regDd)); - li.append($('').attr('class', 't-file').html((obj.attachYn == "Y" ? '파일 아이콘' : ''))); - - $( "ul.list-notice").append(li); + if(!jsonObj.data || jsonObj.data.length <= 0 ) { + $("ul.list-notice li.no-result").show(); + } else { + $("ul.list-notice li.no-result").hide(); - }); + // 출력 + $.each(jsonObj.data,function(key,obj) { + var li = $(document.createElement('li')); + li.append($('').attr('class', 't-num').html(obj.rno)); + li.append($('').attr('class', 't-type').html((obj.notiYn == "Y" ? '공지' : ''))); + li.append($('').attr('class', 't-tit').html("" + obj.title + "")); + li.append($('').attr('class', 't-writer').html(obj.regNm)); + li.append($('').attr('class', 't-date').html(obj.regDd)); + li.append($('').attr('class', 't-file').html((obj.attachYn == "Y" ? '파일 아이콘' : ''))); + + $( "ul.list-notice").append(li); + + }); + } pageLoad("fn_searchArticle", jsonObj.pagingPageIndex, jsonObj.pagingTotRecordCount, jsonObj.pagingStartPage, jsonObj.pagingEndPage, jsonObj.pagingLastPage); @@ -219,6 +226,9 @@ 등록일 첨부 + diff --git a/src/main/webapp/WEB-INF/jsp/nlib/bbs/listFaqs.jsp b/src/main/webapp/WEB-INF/jsp/nlib/bbs/listFaqs.jsp index 8036c05a..773c0b5a 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/bbs/listFaqs.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/bbs/listFaqs.jsp @@ -154,20 +154,28 @@ $( document ).ready(function() { } // 기존 데이터 CLEAR - $( "ul.list-faq li").remove(); + $( "ul.list-faq li").not('.no-result').remove(); + + if(!jsonObj.data || jsonObj.data.length <= 0 ) { + $("ul.list-faq li.no-result").show(); + } else { + $("ul.list-faq li.no-result").hide(); + + // 출력 + $.each(jsonObj.data,function(key,obj) { + var li = $(document.createElement('li')); + li.attr("articleId", obj.articleId); + li.append($('').attr('class', 'question').on("click", function() { + fn_viewDetail(this, obj.articleId); + })); + li.find(".question").append($('').attr("class", "type").html("[" + obj.questionTypeName + "]")); + li.find(".question").append($('').html(obj.title)); + li.append($('
').attr('class', 'answer').attr('style', 'display: none;')); + $( "ul.list-faq").append(li); + }); + } + - // 출력 - $.each(jsonObj.data,function(key,obj) { - var li = $(document.createElement('li')); - li.attr("articleId", obj.articleId); - li.append($('').attr('class', 'question').on("click", function() { - fn_viewDetail(this, obj.articleId); - })); - li.find(".question").append($('').attr("class", "type").html("[" + obj.questionTypeName + "]")); - li.find(".question").append($('').html(obj.title)); - li.append($('
').attr('class', 'answer').attr('style', 'display: none;')); - $( "ul.list-faq").append(li); - }); pageLoad("fn_searchArticle", jsonObj.pagingPageIndex, jsonObj.pagingTotRecordCount, jsonObj.pagingStartPage, jsonObj.pagingEndPage, jsonObj.pagingLastPage); }).fail(function (jqXHR, textStatus, errorThrown) { @@ -271,6 +279,9 @@ function fn_changeQuestionType(searchQuestionType) {
    +
diff --git a/src/main/webapp/WEB-INF/jsp/nlib/bbs/listQnas.jsp b/src/main/webapp/WEB-INF/jsp/nlib/bbs/listQnas.jsp index b6a0302b..4325d5c9 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/bbs/listQnas.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/bbs/listQnas.jsp @@ -30,138 +30,27 @@ <%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> <%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %> +<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags"%> -묻고답하기(DB) +Q&A - - - - ${pageTitle} - - - - - - - -//게시글 작성으로 이동 -function fn_newArticle() { - $("#articleNo").val(""); - $("#articleForm").attr("action", "${pageContext.request.contextPath}/bbs/insertQnaForm.do"); - $("#articleForm").submit(); -} + +
+

Q&A 섹션영역

+
+
+
+
    +
  • HOME
  • +
  • 고객지원
  • +
  • ${pageTitle }
  • +
+
    +
  • ${pageTitle }
  • +
+
+
화살표 아이콘
+
+
+
+
+ +
+
+
+
+
0
+ +
+ +
+
+ +
+
+ + +
+
+ + + + + + + +
+
+
- - +
+
+ +
+
- +
+
    +
  • + NO + 제목 + 등록자 + 등록일 + 답변 +
  • + +
+
+ +
+ +
-

${pageTitle }

+
    - 메시지 : ${message} - -
    - 총
    -
    - - - -  
    - - - - - - - - -
    전체내 질문
    -
    - -
    - - - - - - - - - - - - -
    - -
    - - - - - - - -
    - - - +
    + +
    + +
    +
    +
    + +
    +
    +
    +
    diff --git a/src/main/webapp/WEB-INF/jsp/nlib/bbs/selectQnaArticle.jsp b/src/main/webapp/WEB-INF/jsp/nlib/bbs/selectQnaArticle.jsp index 07f2ec4e..96ca0a85 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/bbs/selectQnaArticle.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/bbs/selectQnaArticle.jsp @@ -31,12 +31,7 @@ <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> <%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %> -Q&A - 상세조회 - - - - -${pageTitle} +Q&A - - - - -

    ${pageTitle }

    - -메시지 : ${message } -
    + +
    +

    Q&A 섹션영역

    +
    +
    +
    +
      +
    • HOME
    • +
    • 고객지원
    • +
    • ${pageTitle }
    • +
    +
      +
    • ${pageTitle }
    • +
    +
    +
    화살표 아이콘
    +
    +
    + +
    +
    +
    +
    +

    + + + + 답변완료 + + + + ${article.title} + + 자물쇠 아이콘 + +

    + + ${article.regNm } + ${article.regDd } + +
    + + +
    + <% + // 파일정보 : 저장파일ID=원파일명 + %> + +
    + 파일 아이콘 + ${attachFile.orignlFileNm}, ${attachFile.fileSize} byte(s) + +
    +
    +
    +
    + +
    +
    +
    +

    + ${article.unescapedContent} +

    +
    +
    + +
    +
    + 답변 + ${article.modDd } +
    +
    +

    + ${article.answer} +

    +
    +
    +
    +
    +
    +
    + + + + + +
    +
    + +
    +
    +
    +
    +
    + +
    +
    +
    + +
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    작성일${article.regDd }답변여부 - 답변완료 - 답변대기중 -
    비밀글여부 - 비밀글 - 일반 - 제목${article.title}
    질문자${article.regNm}
    질문내용
    ${article.unescapedContent}
    답변내용${article.answer}
    - <% - // 파일정보 : 저장파일ID=원파일명 - %> - - ${attachFile.orignlFileNm} (${attachFile.fileSize} byte(s))
    -
    -
    첨부파일 없음 -
    - -
    - - - - - - - - - - -
    - -
    + + + + + +
    - - - - - + + + + + -
    - - - + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/nlib/cmm/headerSubPart.jsp b/src/main/webapp/WEB-INF/jsp/nlib/cmm/headerSubPart.jsp index 73ca4ac2..e124e5d5 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/cmm/headerSubPart.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/cmm/headerSubPart.jsp @@ -11,14 +11,7 @@ String councilNm = (String)session.getAttribute("councilNm"); %> - -

    헤더영역

    -

    소장자료관

    +

    ${councilNm}소장자료관

    검색

    diff --git a/src/main/webapp/WEB-INF/jsp/nlib/cmm/home.jsp b/src/main/webapp/WEB-INF/jsp/nlib/cmm/home.jsp index d26cc7cd..dc3bfcd2 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/cmm/home.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/cmm/home.jsp @@ -8,7 +8,7 @@ diff --git a/src/main/webapp/images/img/img-logo.svg b/src/main/webapp/images/img/img-logo.svg new file mode 100644 index 00000000..c0529e5b --- /dev/null +++ b/src/main/webapp/images/img/img-logo.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/main/webapp/js/fileupload/dropzone.js b/src/main/webapp/js/fileupload/dropzone.js index 9a43a0b2..946119a5 100644 --- a/src/main/webapp/js/fileupload/dropzone.js +++ b/src/main/webapp/js/fileupload/dropzone.js @@ -97,6 +97,7 @@ Dropzone = (function(_super) { var extend, resolveOption; + var inProc = false; // NLIB 멀티파일 올리는 중 __extends(Dropzone, _super); @@ -150,7 +151,7 @@ //dictInvalidFileType: "You can't upload files of this type.", dictInvalidFileType: "허용된 파일 형식만 첨부가능합니다 (이미지,문서 파일) ", // NLIB dictResponseError: "Server responded with {{statusCode}} code.", - dictCancelUpload: "Cancel upload", + dictCancelUpload: "", dictCancelUploadConfirmation: "Are you sure you want to cancel this upload?", //dictRemoveFile: "Remove file", dictRemoveFile: "취소", // NLIB @@ -236,6 +237,7 @@ and don't overwrite those options. */ drop: function(e) { + inProc = true; return this.element.classList.remove("dz-drag-hover"); }, dragstart: noop, @@ -267,7 +269,7 @@ _ref = file.previewElement.querySelectorAll("[data-dz-name]"); for (_i = 0, _len = _ref.length; _i < _len; _i++) { node = _ref[_i]; - node.textContent = file.name; + node.textContent = (file.name + "_" + file.accepted + "_" + file.type); // DDDDDDDDDDDDDDDDDDDDddddd } _ref1 = file.previewElement.querySelectorAll("[data-dz-size]"); for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { @@ -275,7 +277,9 @@ node.innerHTML = this.filesize(file.size); } if (this.options.addRemoveLinks) { - file._removeLink = Dropzone.createElement("" + this.options.dictRemoveFile + ""); + //file._removeLink = Dropzone.createElement("" + this.options.dictRemoveFile + ""); + // NLIB DDDDDDDDDDDDDDDDDDDDDDDDDDDD + file._removeLink = Dropzone.createElement(''); file.previewElement.appendChild(file._removeLink); } removeFileEvent = (function(_this) { @@ -389,18 +393,26 @@ canceledmultiple: noop, complete: function(file) { if (file._removeLink) { - file._removeLink.textContent = this.options.dictRemoveFile; + //file._removeLink.textContent = this.options.dictRemoveFile; } if (file.previewElement) { return file.previewElement.classList.add("dz-complete"); } }, - completemultiple: noop, - maxfilesexceeded: noop, + completemultiple: //noop, + function() { + }, + + maxfilesexceeded: function(file) { // NLIB + if(inProc) alert("첨부가능한 최대 파일 개수는 " + this.options.maxFiles + "개 입니다.\n초과된 개수의 파일은 첨부되지 않습니다."); + inProc = false; + this.removeFile(file); + }, maxfilesreached: noop, queuecomplete: noop, addedfiles: noop, - previewTemplate: "
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n Check\n \n \n \n \n \n
    \n
    \n \n Error\n \n \n \n \n \n \n \n
    \n
    " + //previewTemplate: "
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n Check\n \n \n \n \n \n
    \n
    \n \n Error\n \n \n \n \n \n \n \n
    \n
    " + previewTemplate: '
    파일 아이콘()
    &nsp;' }; extend = function() { @@ -985,7 +997,8 @@ _this._errorProcessing([file], error); } else { file.accepted = true; - if (_this.options.autoQueue) { + //if (_this.options.autoQueue) { + if (file.fileUploadType != "uploaded" && _this.options.autoQueue) { // NLIB _this.enqueueFile(file); } } @@ -1133,7 +1146,8 @@ } queuedFiles = this.getQueuedFiles(); if (!(queuedFiles.length > 0)) { - return; + this.emit("queuecomplete"); // NLIB 추가 + return; } if (this.options.uploadMultiple) { return this.processFiles(queuedFiles.slice(0, parallelUploads - processingLength)); @@ -1400,6 +1414,8 @@ file.status = Dropzone.ERROR; this.emit("error", file, message, xhr); this.emit("complete", file); + + this.removeFile(file); // NLIB } if (this.options.uploadMultiple) { this.emit("errormultiple", files, message, xhr);