diff --git a/src/main/java/nlib/bbs/service/AttachFileService.java b/src/main/java/nlib/bbs/service/AttachFileService.java index 0a94d514..336e41af 100644 --- a/src/main/java/nlib/bbs/service/AttachFileService.java +++ b/src/main/java/nlib/bbs/service/AttachFileService.java @@ -32,6 +32,15 @@ import nlib.user.service.NlibLoginVO; public interface AttachFileService { + /** + * 첨부파일 개수를 조회한다. + * + * @param attachFileId + * @return + * @throws Exception + */ + public int countAttachFiles(String attachFileId) throws Exception; + /** * 첨부파일 목록을 조회한다. * diff --git a/src/main/java/nlib/bbs/service/impl/AttachFileDAO.java b/src/main/java/nlib/bbs/service/impl/AttachFileDAO.java index f9767e82..52d8e6a6 100644 --- a/src/main/java/nlib/bbs/service/impl/AttachFileDAO.java +++ b/src/main/java/nlib/bbs/service/impl/AttachFileDAO.java @@ -40,6 +40,16 @@ import nlib.util.StringUtil; @Mapper("attachFileDAO") public interface AttachFileDAO { + + /** + * 첨부파일 개수를 조회한다. + * + * @param attachFileId + * @return + * @throws Exception + */ + public int countAttachFiles(String attachFileId) throws Exception; + /** * 첨부파일 목록을 조회한다. * diff --git a/src/main/java/nlib/bbs/service/impl/AttachFileServiceImpl.java b/src/main/java/nlib/bbs/service/impl/AttachFileServiceImpl.java index 388d9d17..a861fd6a 100644 --- a/src/main/java/nlib/bbs/service/impl/AttachFileServiceImpl.java +++ b/src/main/java/nlib/bbs/service/impl/AttachFileServiceImpl.java @@ -47,6 +47,18 @@ public class AttachFileServiceImpl implements AttachFileService @Resource(name = "qnaService") private QnaService qnaService; + + /** + * 첨부파일 개수를 조회한다. + * + * @param attachFileId + * @return + * @throws Exception + */ + public int countAttachFiles(String attachFileId) throws Exception { + return attachFileDAO.countAttachFiles(attachFileId); + } + /** * 첨부파일 목록을 조회한다. * diff --git a/src/main/java/nlib/bbs/service/impl/QnaServiceImpl.java b/src/main/java/nlib/bbs/service/impl/QnaServiceImpl.java index d48614dd..6f4b1473 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.cmm.service.NlibProperty; import nlib.util.StringUtil; import nlib.util.UUID; @@ -47,12 +48,13 @@ public class QnaServiceImpl extends BoardServiceImpl implements QnaService } articleVO.setResultCode("S001"); - articleVO.setResultMessage("정상적으로 등록되었습니다."); if(articleVO.getAttachFileCnt() > 0) { addAttachFiles(articleVO); } + articleVO.setResultMessage("정상적으로 등록되었습니다." + (StringUtil.isNotEmpty(articleVO.getResultMessage())? "\\\\n " + articleVO.getResultMessage() : "")); + return articleVO; } @@ -66,23 +68,39 @@ public class QnaServiceImpl extends BoardServiceImpl implements QnaService int savedCnt = 0; List attachFileList = articleVO.getAttachFiles(); + // 최대 개수 + int maxFileCount = NlibProperty.getInt("fileupload.max.files", 5); + // 첨부파일그룹 등록 int groupCnt = attachFileService.insertAttachFileGroup(attachFileList.get(0)); if(groupCnt > 0) { + int curFileCount = attachFileService.countAttachFiles(articleVO.getBdAttachFileId()); + int addingCount = maxFileCount - curFileCount; + // 첨부파일 등록 - for(int i=0; i 첨부파일 등록에 실패하였습니다 : " + attachFileVO.getOrignlFileNm()); + if(addingCount > 0) { + for(int i=0; i= addingCount) { + String message = "최대 허용 개수가 도달하여 등록을 중단합니다."; + log.error(message); + articleVO.setResultMessage(message); + break; + } + + AttachFileVO attachFileVO = attachFileList.get(i); + int retAttFile = attachFileService.insertAttachFile(attachFileVO); + savedCnt += retAttFile; + if(retAttFile < 1) { + log.error("insertArticle > 첨부파일 등록에 실패하였습니다 : " + attachFileVO.getOrignlFileNm()); + } } } if(savedCnt != articleVO.getAttachFileCnt()) { - articleVO.setResultMessage(String.format("총 %d개 파일 중 %개 파일만 정상등록되었습니다.", articleVO.getAttachFileCnt(), savedCnt)); + articleVO.setResultMessage("총 " + articleVO.getAttachFileCnt() + "개 파일 중 " + savedCnt + "개 파일만 정상등록되었습니다."); } } else { @@ -135,20 +153,20 @@ public class QnaServiceImpl extends BoardServiceImpl implements QnaService * @return */ public int updateArticle(ArticleVO articleVO) throws Exception { + int updateRet = qnaDAO.updateArticle(articleVO); + + // 첨부파일 삭제 + List removedAttachFiles = articleVO.getRemovedAttachFiles(); + if(removedAttachFiles != null && removedAttachFiles.size() > 0) { + removeAttachFiles(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 6b818122..55e4c564 100644 --- a/src/main/java/nlib/bbs/web/QnaController.java +++ b/src/main/java/nlib/bbs/web/QnaController.java @@ -10,7 +10,6 @@ import java.util.Map; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; -import org.apache.commons.collections.MapUtils; import org.apache.commons.lang.StringEscapeUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -38,6 +37,7 @@ import nlib.cmm.service.NlibProperty; import nlib.cmm.service.PagingVO; import nlib.user.service.NlibLoginVO; import nlib.util.StringUtil; +import nlib.util.UUID; @Controller public class QnaController extends NlibCommonController { @@ -222,10 +222,15 @@ public class QnaController extends NlibCommonController { searchArticleVO.setEmail(nlibLoginVO.getEmail()); model.addAttribute("searchArticle", searchArticleVO); - + + // 첨부파일 업로드 설정값 + model.addAttribute("maxFilesize" , NlibProperty.getString("fileupload.max.mbsize")); + model.addAttribute("maxFiles" , NlibProperty.getString("fileupload.max.files")); + model.addAttribute("acceptedFiles", NlibProperty.getString("fileupload.acceptable.ext")); + return "nlib/bbs/insertQnaForm"; } - + /** * 묻고답하기 등록 처리한다. @@ -245,6 +250,8 @@ public class QnaController extends NlibCommonController { , RedirectAttributes redirectAttrs , ModelMap model) throws Exception { + log.debug("========================================> insertQna : 진입함"); + NlibLoginVO loginVO = getNlibLoginVO(authentication); String message = null; @@ -301,6 +308,7 @@ public class QnaController extends NlibCommonController { String attachFileId = (String)(fileListObj.get(0).get("attachFileId")); if(StringUtil.isEmpty(attachFileId)) { log.error("첨부파일 아이디(attachFileId) 값은 필수 항목입니다. 첨부파일 처리에 실패하였습니다. 그러나, 게시물 등록은 계속 진행됩니다."); + attachFileId = UUID.getNewAttachFileId(); } if(StringUtil.isNotEmpty(attachFileId)) { @@ -309,7 +317,10 @@ public class QnaController extends NlibCommonController { String fileSStreCours = NlibProperty.getProperty("fileupload.base.path") + NlibProperty.getProperty("fileupload.bbs.qna.subpath") + "/"; List attachFiles = new ArrayList(); - for(int i=0; i removedAttachFiles = new ArrayList(); for(int i=0; i= maxFileCount) { + log.error("최대 개수를 초과하여 이후 파일은 처리되지 않습니다."); + break; + } + + acceptableExt = false; + Entry entry = itr.next(); file = entry.getValue(); @@ -176,10 +192,25 @@ public class FileUploadController extends NlibCommonController { int index = orignlFileNm.lastIndexOf("."); String fileExt = (index < 1 ? "" : orignlFileNm.substring(index + 1)); - //String newName = UUID.getPhysicalFileName(); - + if(acceptableExtList != null) { + + if(acceptableExtList.contains("." + fileExt)) { + acceptableExt = true; + } else if(acceptableExtList.contains("image/*")) { + acceptableExt = ".jpg,.jpe,.jpge,.bmp,.gif,.png".contains("." + fileExt); + } + } + if(!acceptableExt) { + log.error("허용되지 않는 파일 확장자 입니다. : " + orignlFileNm); + continue; + } int size = (int)file.getSize(); + if(size > maxFileSize) { + log.error("첨부파일이 허용 크기를 초과합니다. : " + orignlFileNm); + continue; + } + String streFileNm = UUID.getNewStreFileNm(); filePath = FILEUPLOAD_BASE_PATH + subPath + "/" + streFileNm; @@ -189,7 +220,7 @@ public class FileUploadController extends NlibCommonController { atvo = new AttachFileVO(); atvo.setSubPathKey(subPathKey); - atvo.setAttachFileId(attachFileId); + //atvo.setAttachFileId(attachFileId); // 실제 DB 저장 처리될때 설정함 atvo.setStreFileNm(streFileNm); atvo.setOrignlFileNm(orignlFileNm); atvo.setFileExt(fileExt); diff --git a/src/main/resources/egovframework/mapper/nlib/bbs/AttachFileDAO_SQL.xml b/src/main/resources/egovframework/mapper/nlib/bbs/AttachFileDAO_SQL.xml index d8d81b8d..1acc2ec4 100644 --- a/src/main/resources/egovframework/mapper/nlib/bbs/AttachFileDAO_SQL.xml +++ b/src/main/resources/egovframework/mapper/nlib/bbs/AttachFileDAO_SQL.xml @@ -3,6 +3,16 @@ "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> + + + + + 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 6658d1f9..ba841f4a 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/bbs/listQnas.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/bbs/listQnas.jsp @@ -38,7 +38,7 @@ $( document ).ready(function() { - fn_setPageTitle("Q&A"); + fn_setPageTitle(""); // 검색 수행 이벤트 $("#btnSearch").on("click", function(e) { @@ -51,10 +51,10 @@ }); // 메시지 표출 - if(!gfn_isEmpty("")) { + if(!gfn_isEmpty("") || !gfn_isEmpty("")) { setTimeout(function() { - alert(""); - }, 1000); // 화면 표출되도록 딜레이 줌 + alert("" + " "); + }, 700); // 화면 표출되도록 딜레이 줌 } //초기 자료 조회 diff --git a/src/main/webapp/WEB-INF/jsp/nlib/collection/searchItemDetail.jsp b/src/main/webapp/WEB-INF/jsp/nlib/collection/searchItemDetail.jsp index 5adb95c5..09a81f26 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/collection/searchItemDetail.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/collection/searchItemDetail.jsp @@ -93,8 +93,9 @@ function goList(){
-
-
+ +
+
온라인열람 @@ -113,11 +114,8 @@ function goList(){
-
-
" alt="">
-
-
-
+
+
@@ -130,7 +128,14 @@ function goList(){
-
+
+ +
+
" alt="">
+
+ +
+
  • diff --git a/src/main/webapp/css/default.css b/src/main/webapp/css/default.css index 8adf3f2f..cf630f0a 100644 --- a/src/main/webapp/css/default.css +++ b/src/main/webapp/css/default.css @@ -930,39 +930,42 @@ transform: rotate(45deg);} .data.detail .inner {} .data.detail .inner .row-top {width:100%;padding:45px 0px;display:inline-block;background: linear-gradient(to right, #485864, #6a7b8c);} .data.detail .inner .row-top .center {width:1400px;margin:0 auto;} +.data.detail .inner .row-top .center .title-box {display:inline-block;position:relative;width:100%;} +.data.detail .inner .row-top .center .title-box .cla-info {margin-bottom:10px;} +.data.detail .inner .row-top .center .title-box .cla-info .con-1 {display: inline;} +.data.detail .inner .row-top .center .title-box .cla-info .con-1 span {background:#fff;border:2px solid #333;border-radius:50px;color:#333;padding:1px 10px 2px;font-size:12px;font-weight: 500;display: inline-block;} +.data.detail .inner .row-top .center .title-box .cla-info .con-1 span.online {color:#376795;border:2px solid #376795;} +.data.detail .inner .row-top .center .title-box .cla-info .con-1 span.loan {color:#b68946;border:2px solid #b68946;} +.data.detail .inner .row-top .center .title-box .cla-info .con-1 span.visit {color:#2b8b99;border:2px solid #2b8b99;} +.data.detail .inner .row-top .center .title-box .cla-info .con-2 {display: inline-block;padding:0px 0px 0px 10px;} +.data.detail .inner .row-top .center .title-box .cla-info .con-2 .code {font-size:16px;color:#fff;line-height: 26px;} +.data.detail .inner .row-top .center .title-box .tit-info {font-size:24px;color:#fff;font-weight: 500;margin-bottom:20px;/*max-height: 105px;*/width:83%;height:auto;padding-bottom:10px;overflow: hidden;margin-bottom: 0px;} + +.data.detail .inner .row-top .center .title-box .btn-info {display: inline-block;position:absolute;right:0px;bottom:5px;} +.data.detail .inner .row-top .center .title-box .btn-info button {background:#f5f5f5;width:auto;height:30px;line-height:28px;width:30px;border-radius: 3px;font-size:14px;color:#222;font-weight: 500;text-align: center;border:1px solid #ddd;} +.data.detail .inner .row-top .center .title-box .btn-info button.view {width:auto;padding:0px 26px;} +.data.detail .inner .row-top .center .title-box .btn-info button.ris {} +.data.detail .inner .row-top .center .title-box .btn-info button.favorit {text-indent: -99999px;background:url(/images/icon/icon-data-star.png) no-repeat center #f5f5f5;} +/*.data.detail .inner .row-top .center .right .con-1 button.favorit.on {background:url(/images/icon/icon-data-star-on.png) no-repeat center #f5f5f5;}*/ +.data.detail .inner .row-top .center .title-box .btn-info button.share {text-indent: -99999px;background:url(/images/icon/icon-data-share.png) no-repeat center #f5f5f5;} +.data.detail .inner .row-top .center .title-box .btn-info button.original {width:200px;display:none;} + .data.detail .inner .row-top .center .left {float:left;width:490px;margin-right:60px;text-align:left;} .data.detail .inner .row-top .center .right {float:left;width:850px;text-align: left;} -.data.detail .inner .row-top .center .left .cla {margin-bottom:10px;} -.data.detail .inner .row-top .center .left .cla .con-1 {display: inline;} -.data.detail .inner .row-top .center .left .cla .con-1 span {background:#fff;border:2px solid #333;border-radius:50px;color:#333;padding:1px 10px 2px;font-size:12px;font-weight: 500;display: inline-block;} -.data.detail .inner .row-top .center .left .cla .con-1 span.online {color:#376795;border:2px solid #376795;} -.data.detail .inner .row-top .center .left .cla .con-1 span.loan {color:#b68946;border:2px solid #b68946;} -.data.detail .inner .row-top .center .left .cla .con-1 span.visit {color:#2b8b99;border:2px solid #2b8b99;} -.data.detail .inner .row-top .center .left .cla .con-2 {display: inline-block;padding:0px 0px 0px 10px;} -.data.detail .inner .row-top .center .left .cla .con-2 .code {font-size:16px;color:#fff;line-height: 26px;} -.data.detail .inner .row-top .center .left .tit {font-size:24px;color:#fff;font-weight: 500;margin-bottom:20px;/*max-height: 105px;*/height:auto;overflow: hidden;} .data.detail .inner .row-top .center .left .img {background:#fff;display: inline-block;width:100%;height:445px;display: flex;align-items: center;justify-content: center;} -.data.detail .inner .row-top .center .right .con-1 {display: inline-block;width:100%;height:100px;border-bottom:1px solid #ddd;text-align: right;margin-bottom: 30px;} -.data.detail .inner .row-top .center .right .con-1 button {background:#f5f5f5;width:auto;height:30px;line-height:28px;width:30px;border-radius: 3px;font-size:14px;color:#222;font-weight: 500;text-align: center;border:1px solid #ddd;margin-top:55px;} -.data.detail .inner .row-top .center .right .con-1 button.view {width:auto;padding:0px 26px;} -.data.detail .inner .row-top .center .right .con-1 button.ris {} -.data.detail .inner .row-top .center .right .con-1 button.favorit {text-indent: -99999px;background:url(/images/icon/icon-data-star.png) no-repeat center #f5f5f5;} -/*.data.detail .inner .row-top .center .right .con-1 button.favorit.on {background:url(/images/icon/icon-data-star-on.png) no-repeat center #f5f5f5;}*/ -.data.detail .inner .row-top .center .right .con-1 button.share {text-indent: -99999px;background:url(/images/icon/icon-data-share.png) no-repeat center #f5f5f5;} - .data.detail .inner .row-top .center .right .con-1 button.original {width:200px;display:none;} -.data.detail .inner .row-top .center .right .con-2 {} -.data.detail .inner .row-top .center .right .con-2 .de-data {} -.data.detail .inner .row-top .center .right .con-2 .de-data ul {width: 100%;/*display: flex;flex-direction: column;*/} -.data.detail .inner .row-top .center .right .con-2 .de-data ul li {float:left;width:50%;margin:0px 0px 12px;} -.data.detail .inner .row-top .center .right .con-2 .de-data ul.full-width li {width:100%;} -.data.detail .inner .row-top .center .right .con-2 .de-data ul li span {font-size:14px;color:#fff;} -.data.detail .inner .row-top .center .right .con-2 .de-data ul li span:nth-of-type(1) {font-weight: 400;display:inline-block;margin-right:20px;min-width:70px;} -.data.detail .inner .row-top .center .right .con-2 .de-data ul li span:nth-of-type(2) {font-weight: 200;} -.data.detail .inner .row-top .center .right .con-2 .b-btn {margin:30px 0px 25px;display:inline-block;width:100%;} -.data.detail .inner .row-top .center .right .con-2 .b-btn button {font-size:14px;font-weight: 500;} -.data.detail .inner .row-top .center .right .con-2 .keyword {} -.data.detail .inner .row-top .center .right .con-2 .keyword span {background: #f4f4f4;color:#333;display:inline-block;padding:1px 10px 2px;border-radius: 50px;font-size:12px;margin-bottom:5px;} -.data.detail .inner .row-top .center .right .con-2 .keyword span.first {background: #b68948;color:#fff;margin-right:10px;padding:1px 16px 2px;} +.data.detail .inner .row-top .center .right .data-info {border-top:1px solid #ddd;padding-top:20px;} +.data.detail .inner .row-top .center .right .data-info .de-data {} +.data.detail .inner .row-top .center .right .data-info .de-data ul {width: 100%;/*display: flex;flex-direction: column;*/} +.data.detail .inner .row-top .center .right .data-info .de-data ul li {float:left;width:50%;margin:0px 0px 12px;} +.data.detail .inner .row-top .center .right .data-info .de-data ul.full-width li {width:100%;} +.data.detail .inner .row-top .center .right .data-info .de-data ul li span {font-size:14px;color:#fff;} +.data.detail .inner .row-top .center .right .data-info .de-data ul li span:nth-of-type(1) {font-weight: 400;display:inline-block;margin-right:20px;min-width:70px;} +.data.detail .inner .row-top .center .right .data-info .de-data ul li span:nth-of-type(2) {font-weight: 200;} +.data.detail .inner .row-top .center .right .data-info .b-btn {margin:30px 0px 25px;display:inline-block;width:100%;} +.data.detail .inner .row-top .center .right .data-info .b-btn button {font-size:14px;font-weight: 500;} +.data.detail .inner .row-top .center .right .data-info .keyword {} +.data.detail .inner .row-top .center .right .data-info .keyword span {background: #f4f4f4;color:#333;display:inline-block;padding:1px 10px 2px;border-radius: 50px;font-size:12px;margin-bottom:5px;} +.data.detail .inner .row-top .center .right .data-info .keyword span.first {background: #b68948;color:#fff;margin-right:10px;padding:1px 16px 2px;} .data.detail .inner .row-bottom .con-1 {display:inline-block;width:100%;border:1px solid #ddd;margin:50px 0px 100px;} .data.detail .inner .row-bottom .con-1 .list-box {display:inline-block;width:100%;padding:25px 0px;} .data.detail .inner .row-bottom .con-1 .list-box .list {float:left;width:24.9%;border-right:1px solid #ddd;text-align: center;} diff --git a/src/main/webapp/css/media.css b/src/main/webapp/css/media.css index 1618ce4f..2a8e7664 100644 --- a/src/main/webapp/css/media.css +++ b/src/main/webapp/css/media.css @@ -158,7 +158,7 @@ footer .family_site {right:10px;} .article-side {width:22%;margin-right:2%;} .culture-box {width:74%;} .data.detail .inner .row-top .center .left {width:40%;} -.data.detail .inner .row-top .center .left .img img {} +.data.detail .inner .row-top .center .left .img img {width:100%;max-height: 430px;max-width: 300px;} .data.detail .inner .row-top .center .right {width:54%;} .greeting .inner .row-bottom .greeting-box .gree {width:90%;padding:70px 5%;} .guide .inner .row-bottom { padding: 0px 0px 80px; box-sizing: border-box; } @@ -250,6 +250,7 @@ footer .family_site {right:10px;} .interested-data .inner .data-box .list-data-wrap .list-data div.list > div.t-cultural {width:20%;} .wrap .nav-wrap #primary-nav {display:none !important;opacity:0 !important;} + .data.detail .inner .row-top .center .title-box .tit-info {width:70%;} } /* 모바일 가로, 테블릿 세로 (해상도 ~ 768px)*/ @@ -719,6 +720,20 @@ footer .family_site {right:10px;} /* 소장 자료 상세 */ .data.detail .inner .row-top .center { width: 100%; display: flex; flex-direction: column; padding: 0 16px; box-sizing: border-box; } + + .data.detail .inner .row-top .center .title-box .cla-info { position: relative; } + .data.detail .inner .row-top .center .title-box .cla-info .con-1 { width: 100%; display: block; } + .data.detail .inner .row-top .center .title-box .cla-info .con-2 { position: relative; top: 5px; padding: 0; } + .data.detail .inner .row-top .center .title-box .tit-info { font-size: 22px; margin-bottom: 30px;overflow:hidden;width:100%; } + + .data.detail .inner .row-top .center .title-box .btn-info {position:relative;} + .data.detail .inner .row-top .center .title-box .btn-info { display: flex; height: auto; border: none; } + .data.detail .inner .row-top .center .title-box .btn-info button { margin-bottom:10px;width: 36px; height: 36px; } + .data.detail .inner .row-top .center .title-box .btn-info button.view { flex: 1; } + .data.detail .inner .row-top .center .title-box .btn-info button.ris { display: none; } + .data.detail .inner .row-top .center .title-box .btn-info button.favorit { margin: 0px 10px; } + .data.detail .inner .row-top .center .title-box .btn-info button.original {width:200px;display:inline-block;} + .data.detail .inner .row-top .center .left, .data.detail .inner .row-top .center .right, .data.detail .inner .row-bottom .con-4 .top h3, @@ -726,22 +741,12 @@ footer .family_site {right:10px;} .data.detail .inner .row-top .center .left .img img { width: 100%; } .data.detail .inner .row-top .center .left .img {background:#fff;text-align:center;width:80%;padding:5% 10%;} .data.detail .inner .row-bottom { padding: 0; } - .data.detail .inner .row-top .center .left .cla { position: relative; } - .data.detail .inner .row-top .center .left .cla .con-1 { width: 100%; display: block; } - .data.detail .inner .row-top .center .left .cla .con-2 { position: relative; top: 5px; padding: 0; } - .data.detail .inner .row-top .center .left .tit { font-size: 22px; margin-bottom: 30px;overflow:hidden; } - .data.detail .inner .row-top .center .right .con-1 { display: flex; height: auto; border: none; } - .data.detail .inner .row-top .center .right .con-1 button { margin-top: 14px; width: 36px; height: 36px; } - .data.detail .inner .row-top .center .right .con-1 button.view { flex: 1; } - .data.detail .inner .row-top .center .right .con-1 button.ris { display: none; } - .data.detail .inner .row-top .center .right .con-1 button.favorit { margin: 14px 10px 0; } - .data.detail .inner .row-top .center .right .con-1 button.original {width:200px;display:inline-block;} - .data.detail .inner .row-top .center .right .con-2 .de-data { flex-direction: column; } - .data.detail .inner .row-top .center .right .con-2 .de-data ul { width: 100%; display: flex; flex-direction: column; } - .data.detail .inner .row-top .center .right .con-2 .de-data ul li { width: 100%; } - .data.detail .inner .row-top .center .right .con-2 .b-btn button { width: 100%; margin-bottom: 6px; } - .data.detail .inner .row-top .center .right .con-2 .keyword span.first, - .data.detail .inner .row-top .center .right .con-2 .keyword span { padding: 5px 14px 5px; border-radius: 30px; } + .data.detail .inner .row-top .center .right .data-info .de-data { flex-direction: column;margin-top:20px;} + .data.detail .inner .row-top .center .right .data-info .de-data ul { width: 100%; display: flex; flex-direction: column; } + .data.detail .inner .row-top .center .right .data-info .de-data ul li { width: 100%; } + .data.detail .inner .row-top .center .right .data-info .b-btn button { width: 100%; margin-bottom: 6px; } + .data.detail .inner .row-top .center .right .data-info .keyword span.first, + .data.detail .inner .row-top .center .right .data-info .keyword span { padding: 5px 14px 5px; border-radius: 30px; } .data.detail .inner .row-top .center .left .img img {width:100%;max-height: 430px;max-width: 300px;} .data.detail .inner .row-bottom.contents { padding: 0 16px; } .data.detail .inner .row-bottom .con-1 { margin-bottom: 30px; } diff --git a/src/main/webapp/js/fileupload/dropzone.js b/src/main/webapp/js/fileupload/dropzone.js index 1654a4b2..034bea91 100644 --- a/src/main/webapp/js/fileupload/dropzone.js +++ b/src/main/webapp/js/fileupload/dropzone.js @@ -112,15 +112,20 @@ dropzone.on("dragEnter", function() { }); */ - Dropzone.prototype.events = ["drop", "dragstart", "dragend", "dragenter", "dragover", "dragleave", "addedfile", "addedfiles", "removedfile", "thumbnail", "error", "errormultiple", "processing", "processingmultiple", "uploadprogress", "totaluploadprogress", "sending", "sendingmultiple", "success", "successmultiple", "canceled", "canceledmultiple", "complete", "completemultiple", "reset", "maxfilesexceeded", "maxfilesreached", "queuecomplete"]; + Dropzone.prototype.events = ["drop", "dragstart", "dragend", "dragenter", "dragover", "dragleave" + , "addedfile", "addedfiles", "removedfile", "thumbnail", "error", "errormultiple" + , "processing", "processingmultiple", "uploadprogress", "totaluploadprogress" + , "sending", "sendingmultiple", "success", "successmultiple", "canceled", "canceledmultiple" + , "complete", "completemultiple", "reset", "maxfilesexceeded", "maxfilesreached", "queuecomplete"]; Dropzone.prototype.defaultOptions = { url: null, method: "post", withCredentials: false, - parallelUploads: 5, + parallelUploads: 3, uploadMultiple: false, - maxFilesize: 256, + // maxFilesize: 256, // NLIB + maxFilesize: 10, // NLIB : 10MB paramName: "file", createImageThumbnails: true, maxThumbnailFilesize: 10, @@ -129,7 +134,7 @@ thumbnailHeight: 60, // NLIB filesizeBase: 1000, //maxFiles: null, - maxFiles: 3, // NLIB : 최대 업로드 가능한 파일수 + maxFiles: 5, // NLIB : 최대 업로드 가능한 파일수 params: {}, clickable: true, ignoreHiddenFiles: true, @@ -147,7 +152,7 @@ //dictFallbackMessage: "Your browser does not support drag'n'drop file uploads.", dictFallbackMessage: "파일 드래그앤드랍을 지원하지 않는 브라우저입니다.", // NLIB dictFallbackText: "Please use the fallback form below to upload your files like in the olden days.", - dictFileTooBig: "파일이 너무 큽니다({{filesize}}MiB). 최대 크기 {{maxFilesize}}MiB를 넘을 수 없습니다.", // "File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.", + dictFileTooBig: "파일이 너무 큽니다({{filesize}}MB). \n최대 크기 {{maxFilesize}}MB를 초과할 수 없습니다.", // "File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.", //dictInvalidFileType: "You can't upload files of this type.", dictInvalidFileType: "허용된 파일 형식만 첨부가능합니다 (이미지,문서 파일) ", // NLIB dictResponseError: "Server responded with {{statusCode}} code.", @@ -157,7 +162,7 @@ dictRemoveFile: "취소", // NLIB dictRemoveFileConfirmation: null, //dictMaxFilesExceeded: "You can not upload any more files.", - dictMaxFilesExceeded: "이파일은, 첨부 가능 최대 개수를 초과하여 업로드되지 않습니다.", // NLIB + dictMaxFilesExceeded: "최대 첨부할 수 있는 파일은 {{maxFiles}}개 입니다.", // NLIB accept: function(file, done) { return done(); }, @@ -284,9 +289,7 @@ node = _ref1[_j]; node.title = '이미 등록된 파일입니다. 클릭하여 다운로드할 수 있습니다.'; $(node).css("cursor", "pointer"); - $(node).on("click", function() { - fn_downloadFile(file.attachFileId, file.fileSn); - }); + $(node).attr("onclick", "fn_downloadFile('" + file.attachFileId + "', " + file.fileSn + ")"); } }