충돌
This commit is contained in:
commit
8627c2b3f0
@ -32,6 +32,15 @@ import nlib.user.service.NlibLoginVO;
|
|||||||
public interface AttachFileService
|
public interface AttachFileService
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 첨부파일 개수를 조회한다.
|
||||||
|
*
|
||||||
|
* @param attachFileId
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public int countAttachFiles(String attachFileId) throws Exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 첨부파일 목록을 조회한다.
|
* 첨부파일 목록을 조회한다.
|
||||||
*
|
*
|
||||||
|
|||||||
@ -40,6 +40,16 @@ import nlib.util.StringUtil;
|
|||||||
@Mapper("attachFileDAO")
|
@Mapper("attachFileDAO")
|
||||||
public interface AttachFileDAO {
|
public interface AttachFileDAO {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 첨부파일 개수를 조회한다.
|
||||||
|
*
|
||||||
|
* @param attachFileId
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public int countAttachFiles(String attachFileId) throws Exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 첨부파일 목록을 조회한다.
|
* 첨부파일 목록을 조회한다.
|
||||||
*
|
*
|
||||||
|
|||||||
@ -47,6 +47,18 @@ public class AttachFileServiceImpl implements AttachFileService
|
|||||||
@Resource(name = "qnaService")
|
@Resource(name = "qnaService")
|
||||||
private QnaService qnaService;
|
private QnaService qnaService;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 첨부파일 개수를 조회한다.
|
||||||
|
*
|
||||||
|
* @param attachFileId
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public int countAttachFiles(String attachFileId) throws Exception {
|
||||||
|
return attachFileDAO.countAttachFiles(attachFileId);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 첨부파일 목록을 조회한다.
|
* 첨부파일 목록을 조회한다.
|
||||||
*
|
*
|
||||||
|
|||||||
@ -12,6 +12,7 @@ import nlib.bbs.service.ArticleVO;
|
|||||||
import nlib.bbs.service.AttachFileService;
|
import nlib.bbs.service.AttachFileService;
|
||||||
import nlib.bbs.service.AttachFileVO;
|
import nlib.bbs.service.AttachFileVO;
|
||||||
import nlib.bbs.service.QnaService;
|
import nlib.bbs.service.QnaService;
|
||||||
|
import nlib.cmm.service.NlibProperty;
|
||||||
import nlib.util.StringUtil;
|
import nlib.util.StringUtil;
|
||||||
import nlib.util.UUID;
|
import nlib.util.UUID;
|
||||||
|
|
||||||
@ -47,12 +48,13 @@ public class QnaServiceImpl extends BoardServiceImpl implements QnaService
|
|||||||
}
|
}
|
||||||
|
|
||||||
articleVO.setResultCode("S001");
|
articleVO.setResultCode("S001");
|
||||||
articleVO.setResultMessage("정상적으로 등록되었습니다.");
|
|
||||||
|
|
||||||
if(articleVO.getAttachFileCnt() > 0) {
|
if(articleVO.getAttachFileCnt() > 0) {
|
||||||
addAttachFiles(articleVO);
|
addAttachFiles(articleVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
articleVO.setResultMessage("정상적으로 등록되었습니다." + (StringUtil.isNotEmpty(articleVO.getResultMessage())? "\\\\n " + articleVO.getResultMessage() : ""));
|
||||||
|
|
||||||
return articleVO;
|
return articleVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -66,13 +68,28 @@ public class QnaServiceImpl extends BoardServiceImpl implements QnaService
|
|||||||
int savedCnt = 0;
|
int savedCnt = 0;
|
||||||
List<AttachFileVO> attachFileList = articleVO.getAttachFiles();
|
List<AttachFileVO> attachFileList = articleVO.getAttachFiles();
|
||||||
|
|
||||||
|
// 최대 개수
|
||||||
|
int maxFileCount = NlibProperty.getInt("fileupload.max.files", 5);
|
||||||
|
|
||||||
// 첨부파일그룹 등록
|
// 첨부파일그룹 등록
|
||||||
int groupCnt = attachFileService.insertAttachFileGroup(attachFileList.get(0));
|
int groupCnt = attachFileService.insertAttachFileGroup(attachFileList.get(0));
|
||||||
|
|
||||||
if(groupCnt > 0) {
|
if(groupCnt > 0) {
|
||||||
|
|
||||||
|
int curFileCount = attachFileService.countAttachFiles(articleVO.getBdAttachFileId());
|
||||||
|
int addingCount = maxFileCount - curFileCount;
|
||||||
|
|
||||||
// 첨부파일 등록
|
// 첨부파일 등록
|
||||||
|
if(addingCount > 0) {
|
||||||
for(int i=0; i<attachFileList.size(); i++) {
|
for(int i=0; i<attachFileList.size(); i++) {
|
||||||
|
|
||||||
|
if(savedCnt >= addingCount) {
|
||||||
|
String message = "최대 허용 개수가 도달하여 등록을 중단합니다.";
|
||||||
|
log.error(message);
|
||||||
|
articleVO.setResultMessage(message);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
AttachFileVO attachFileVO = attachFileList.get(i);
|
AttachFileVO attachFileVO = attachFileList.get(i);
|
||||||
int retAttFile = attachFileService.insertAttachFile(attachFileVO);
|
int retAttFile = attachFileService.insertAttachFile(attachFileVO);
|
||||||
savedCnt += retAttFile;
|
savedCnt += retAttFile;
|
||||||
@ -80,9 +97,10 @@ public class QnaServiceImpl extends BoardServiceImpl implements QnaService
|
|||||||
log.error("insertArticle > 첨부파일 등록에 실패하였습니다 : " + attachFileVO.getOrignlFileNm());
|
log.error("insertArticle > 첨부파일 등록에 실패하였습니다 : " + attachFileVO.getOrignlFileNm());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(savedCnt != articleVO.getAttachFileCnt()) {
|
if(savedCnt != articleVO.getAttachFileCnt()) {
|
||||||
articleVO.setResultMessage(String.format("총 %d개 파일 중 %개 파일만 정상등록되었습니다.", articleVO.getAttachFileCnt(), savedCnt));
|
articleVO.setResultMessage("총 " + articleVO.getAttachFileCnt() + "개 파일 중 " + savedCnt + "개 파일만 정상등록되었습니다.");
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@ -135,21 +153,21 @@ public class QnaServiceImpl extends BoardServiceImpl implements QnaService
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public int updateArticle(ArticleVO articleVO) throws Exception {
|
public int updateArticle(ArticleVO articleVO) throws Exception {
|
||||||
|
|
||||||
int updateRet = qnaDAO.updateArticle(articleVO);
|
int updateRet = qnaDAO.updateArticle(articleVO);
|
||||||
|
|
||||||
|
// 첨부파일 삭제
|
||||||
|
List<AttachFileVO> removedAttachFiles = articleVO.getRemovedAttachFiles();
|
||||||
|
if(removedAttachFiles != null && removedAttachFiles.size() > 0) {
|
||||||
|
removeAttachFiles(articleVO);
|
||||||
|
}
|
||||||
|
|
||||||
// 첨부파일 추가
|
// 첨부파일 추가
|
||||||
List<AttachFileVO> addedFiles = articleVO.getAttachFiles();
|
List<AttachFileVO> addedFiles = articleVO.getAttachFiles();
|
||||||
if(addedFiles != null && addedFiles.size() > 0) {
|
if(addedFiles != null && addedFiles.size() > 0) {
|
||||||
addAttachFiles(articleVO);
|
addAttachFiles(articleVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<AttachFileVO> removedAttachFiles = articleVO.getRemovedAttachFiles();
|
|
||||||
if(removedAttachFiles != null && removedAttachFiles.size() > 0) {
|
|
||||||
removeAttachFiles(articleVO);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 첨부파일 삭제
|
|
||||||
|
|
||||||
return updateRet;
|
return updateRet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,7 +10,6 @@ import java.util.Map;
|
|||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
import org.apache.commons.collections.MapUtils;
|
|
||||||
import org.apache.commons.lang.StringEscapeUtils;
|
import org.apache.commons.lang.StringEscapeUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
@ -38,6 +37,7 @@ import nlib.cmm.service.NlibProperty;
|
|||||||
import nlib.cmm.service.PagingVO;
|
import nlib.cmm.service.PagingVO;
|
||||||
import nlib.user.service.NlibLoginVO;
|
import nlib.user.service.NlibLoginVO;
|
||||||
import nlib.util.StringUtil;
|
import nlib.util.StringUtil;
|
||||||
|
import nlib.util.UUID;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
public class QnaController extends NlibCommonController {
|
public class QnaController extends NlibCommonController {
|
||||||
@ -223,6 +223,11 @@ public class QnaController extends NlibCommonController {
|
|||||||
|
|
||||||
model.addAttribute("searchArticle", searchArticleVO);
|
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";
|
return "nlib/bbs/insertQnaForm";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -245,6 +250,8 @@ public class QnaController extends NlibCommonController {
|
|||||||
, RedirectAttributes redirectAttrs
|
, RedirectAttributes redirectAttrs
|
||||||
, ModelMap model) throws Exception {
|
, ModelMap model) throws Exception {
|
||||||
|
|
||||||
|
log.debug("========================================> insertQna : 진입함");
|
||||||
|
|
||||||
NlibLoginVO loginVO = getNlibLoginVO(authentication);
|
NlibLoginVO loginVO = getNlibLoginVO(authentication);
|
||||||
|
|
||||||
String message = null;
|
String message = null;
|
||||||
@ -301,6 +308,7 @@ public class QnaController extends NlibCommonController {
|
|||||||
String attachFileId = (String)(fileListObj.get(0).get("attachFileId"));
|
String attachFileId = (String)(fileListObj.get(0).get("attachFileId"));
|
||||||
if(StringUtil.isEmpty(attachFileId)) {
|
if(StringUtil.isEmpty(attachFileId)) {
|
||||||
log.error("첨부파일 아이디(attachFileId) 값은 필수 항목입니다. 첨부파일 처리에 실패하였습니다. 그러나, 게시물 등록은 계속 진행됩니다.");
|
log.error("첨부파일 아이디(attachFileId) 값은 필수 항목입니다. 첨부파일 처리에 실패하였습니다. 그러나, 게시물 등록은 계속 진행됩니다.");
|
||||||
|
attachFileId = UUID.getNewAttachFileId();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(StringUtil.isNotEmpty(attachFileId)) {
|
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") + "/";
|
String fileSStreCours = NlibProperty.getProperty("fileupload.base.path") + NlibProperty.getProperty("fileupload.bbs.qna.subpath") + "/";
|
||||||
List<AttachFileVO> attachFiles = new ArrayList<AttachFileVO>();
|
List<AttachFileVO> attachFiles = new ArrayList<AttachFileVO>();
|
||||||
|
|
||||||
for(int i=0; i<fileListObj.size(); i++) {
|
// 최대 개수
|
||||||
|
int maxFileCount = NlibProperty.getInt("fileupload.max.files", 5);
|
||||||
|
|
||||||
|
for(int i=0; i<maxFileCount && i<fileListObj.size(); i++) {
|
||||||
Map finfo = fileListObj.get(i);
|
Map finfo = fileListObj.get(i);
|
||||||
AttachFileVO fVO = new AttachFileVO();
|
AttachFileVO fVO = new AttachFileVO();
|
||||||
|
|
||||||
@ -383,6 +394,8 @@ public class QnaController extends NlibCommonController {
|
|||||||
//---------------------------
|
//---------------------------
|
||||||
// 첨부파일 정보 설정
|
// 첨부파일 정보 설정
|
||||||
//---------------------------
|
//---------------------------
|
||||||
|
|
||||||
|
// 추가 첨부파일
|
||||||
if(StringUtil.isNotEmpty(fileList)) {
|
if(StringUtil.isNotEmpty(fileList)) {
|
||||||
|
|
||||||
String fileListJsonStr = fileList;
|
String fileListJsonStr = fileList;
|
||||||
@ -472,13 +485,11 @@ public class QnaController extends NlibCommonController {
|
|||||||
|
|
||||||
String attachFileId = (String)(removedFileListObj.get(0).get("attachFileId"));
|
String attachFileId = (String)(removedFileListObj.get(0).get("attachFileId"));
|
||||||
if(StringUtil.isEmpty(attachFileId)) {
|
if(StringUtil.isEmpty(attachFileId)) {
|
||||||
log.error("첨부파일 아이디(attachFileId) 값은 필수 항목입니다. 첨부파일 삭제에 실패하였습니다. 그러나, 게시물 등록은 계속 진행됩니다.");
|
log.error("첨부파일 아이디(attachFileId) 값은 필수 항목입니다. 첨부파일 삭제에 실패하였습니다. 그러나, 게시물 변경은 계속 진행됩니다.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(StringUtil.isNotEmpty(attachFileId) && attachFileId.equals(articleVO.getBdAttachFileId())) {
|
if(StringUtil.isNotEmpty(attachFileId) && attachFileId.equals(articleVO.getBdAttachFileId())) {
|
||||||
//articleVO.setBdAttachFileId(attachFileId);
|
|
||||||
|
|
||||||
//String fileSStreCours = NlibProperty.getProperty("fileupload.base.path") + NlibProperty.getProperty("fileupload.bbs.qna.subpath") + "/";
|
|
||||||
List<AttachFileVO> removedAttachFiles = new ArrayList<AttachFileVO>();
|
List<AttachFileVO> removedAttachFiles = new ArrayList<AttachFileVO>();
|
||||||
|
|
||||||
for(int i=0; i<removedFileListObj.size(); i++) {
|
for(int i=0; i<removedFileListObj.size(); i++) {
|
||||||
|
|||||||
@ -8,6 +8,7 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
|
import javax.activation.MimetypesFileTypeMap;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
@ -17,6 +18,7 @@ import org.slf4j.LoggerFactory;
|
|||||||
import org.springframework.http.HttpHeaders;
|
import org.springframework.http.HttpHeaders;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.security.access.annotation.Secured;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
@ -93,12 +95,12 @@ public class FileUploadController extends NlibCommonController {
|
|||||||
* @param response : 파일정보를 담은 JSON String
|
* @param response : 파일정보를 담은 JSON String
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@Secured("ROLE_USER")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@RequestMapping(value="/fileupload/uploadFilesAjax.do", produces="application/json")
|
@RequestMapping(value="/fileupload/uploadFilesAjax.do", produces="application/json")
|
||||||
public ResponseEntity uploadFilesAjax(
|
public ResponseEntity uploadFilesAjax(
|
||||||
final MultipartHttpServletRequest multiRequest
|
final MultipartHttpServletRequest multiRequest
|
||||||
, @RequestParam(name="subPathKey") String subPathKey
|
, @RequestParam(name="subPathKey") String subPathKey
|
||||||
, @RequestParam(name="attachFileId", required=false) String attachFileId
|
|
||||||
, HttpServletResponse response) {
|
, HttpServletResponse response) {
|
||||||
|
|
||||||
String message = null;
|
String message = null;
|
||||||
@ -153,12 +155,26 @@ public class FileUploadController extends NlibCommonController {
|
|||||||
String filePath = "";
|
String filePath = "";
|
||||||
AttachFileVO atvo;
|
AttachFileVO atvo;
|
||||||
|
|
||||||
// 첨브파일그룹ID
|
// 허용 파일 확장자
|
||||||
if(StringUtil.isEmpty(attachFileId)) {
|
String acceptableExtList = StringUtil.getString(NlibProperty.getString("fileupload.acceptable.ext"), null);
|
||||||
attachFileId = UUID.getNewAttachFileId();
|
if(acceptableExtList != null) acceptableExtList = "," + acceptableExtList.trim();
|
||||||
}
|
boolean acceptableExt = false;
|
||||||
|
|
||||||
|
// 최대 파일크기
|
||||||
|
int maxFileSize = NlibProperty.getInt("fileupload.max.mbsize", 10) * 1024 * 1024;
|
||||||
|
|
||||||
|
// 최대 개수
|
||||||
|
int maxFileCount = NlibProperty.getInt("fileupload.max.files", 5);
|
||||||
|
|
||||||
while (itr.hasNext()) {
|
while (itr.hasNext()) {
|
||||||
|
|
||||||
|
if(result.size() >= maxFileCount) {
|
||||||
|
log.error("최대 개수를 초과하여 이후 파일은 처리되지 않습니다.");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
acceptableExt = false;
|
||||||
|
|
||||||
Entry<String, MultipartFile> entry = itr.next();
|
Entry<String, MultipartFile> entry = itr.next();
|
||||||
|
|
||||||
file = entry.getValue();
|
file = entry.getValue();
|
||||||
@ -176,10 +192,25 @@ public class FileUploadController extends NlibCommonController {
|
|||||||
int index = orignlFileNm.lastIndexOf(".");
|
int index = orignlFileNm.lastIndexOf(".");
|
||||||
String fileExt = (index < 1 ? "" : orignlFileNm.substring(index + 1));
|
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();
|
int size = (int)file.getSize();
|
||||||
|
if(size > maxFileSize) {
|
||||||
|
log.error("첨부파일이 허용 크기를 초과합니다. : " + orignlFileNm);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
String streFileNm = UUID.getNewStreFileNm();
|
String streFileNm = UUID.getNewStreFileNm();
|
||||||
|
|
||||||
filePath = FILEUPLOAD_BASE_PATH + subPath + "/" + streFileNm;
|
filePath = FILEUPLOAD_BASE_PATH + subPath + "/" + streFileNm;
|
||||||
@ -189,7 +220,7 @@ public class FileUploadController extends NlibCommonController {
|
|||||||
|
|
||||||
atvo = new AttachFileVO();
|
atvo = new AttachFileVO();
|
||||||
atvo.setSubPathKey(subPathKey);
|
atvo.setSubPathKey(subPathKey);
|
||||||
atvo.setAttachFileId(attachFileId);
|
//atvo.setAttachFileId(attachFileId); // 실제 DB 저장 처리될때 설정함
|
||||||
atvo.setStreFileNm(streFileNm);
|
atvo.setStreFileNm(streFileNm);
|
||||||
atvo.setOrignlFileNm(orignlFileNm);
|
atvo.setOrignlFileNm(orignlFileNm);
|
||||||
atvo.setFileExt(fileExt);
|
atvo.setFileExt(fileExt);
|
||||||
|
|||||||
@ -3,6 +3,16 @@
|
|||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="nlib.bbs.service.impl.AttachFileDAO">
|
<mapper namespace="nlib.bbs.service.impl.AttachFileDAO">
|
||||||
|
|
||||||
|
<select id="countAttachFiles" parameterType="String" resultType="int">
|
||||||
|
SELECT COUNT(B.FILE_SN)
|
||||||
|
FROM BD_FILE A
|
||||||
|
JOIN BD_FILEDETAIL B ON (A.ATTACH_FILE_ID = B.ATTACH_FILE_ID)
|
||||||
|
WHERE A.ATTACH_FILE_ID = #{attachFileId}
|
||||||
|
AND IFNULL(A.USE_AT,'Y') = 'Y'
|
||||||
|
AND IFNULL(B.USE_AT,'Y') = 'Y'
|
||||||
|
ORDER BY B.FILE_SN
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="listAttachFiles" parameterType="String" resultType="AttachFileVO">
|
<select id="listAttachFiles" parameterType="String" resultType="AttachFileVO">
|
||||||
SELECT
|
SELECT
|
||||||
B.ATTACH_FILE_ID
|
B.ATTACH_FILE_ID
|
||||||
|
|||||||
@ -95,6 +95,13 @@ main.banner.img.path = /apps/tomcat/apache-tomcat-8.5.46_nlib/webapps/images/bg/
|
|||||||
#fileupload.base.path = C:/iams/workspace/nlib/data/fileupload
|
#fileupload.base.path = C:/iams/workspace/nlib/data/fileupload
|
||||||
# \uac1c\ubc1c\uc11c\ubc84
|
# \uac1c\ubc1c\uc11c\ubc84
|
||||||
fileupload.base.path = /nfs_nas_dev/uac/nlib/qna
|
fileupload.base.path = /nfs_nas_dev/uac/nlib/qna
|
||||||
|
# \ucd5c\ub300 \ud30c\uc77c \ud06c\uae30 (MB)
|
||||||
|
fileupload.max.mbsize = 10
|
||||||
|
# \ucd5c\ub300 \ud30c\uc77c \uac1c\uc218
|
||||||
|
fileupload.max.files = 5
|
||||||
|
# \ud30c\uc77c \uc5c5\ub85c\ub4dc \uac00\ub2a5 \ud655\uc7a5\uc790 (\uc911\uac04\uc5d0 \uacf5\ubc31\uc774 \uc5c6\uc5b4\uc57c\ud568)
|
||||||
|
fileupload.acceptable.ext = image/*,.hwp,.xls,.xlsx,.ppt,.pptx,.doc,.docx,.txt
|
||||||
|
|
||||||
|
|
||||||
# \uc784\uc2dc \uc800\uc7a5 \uc704\uce58
|
# \uc784\uc2dc \uc800\uc7a5 \uc704\uce58
|
||||||
fileupload.temp.subpath = /temp
|
fileupload.temp.subpath = /temp
|
||||||
|
|||||||
@ -42,11 +42,11 @@
|
|||||||
</c:if>
|
</c:if>
|
||||||
|
|
||||||
<!-- File Upload : 시작-->
|
<!-- File Upload : 시작-->
|
||||||
<script src="${pageContext.request.contextPath}/js/fileupload/dropzone.js"></script>
|
<script src="<c:out value='${pageContext.request.contextPath}' />/js/fileupload/dropzone.js"></script>
|
||||||
<!-- File Upload : 종료 -->
|
<!-- File Upload : 종료 -->
|
||||||
|
|
||||||
<!-- SmartEditor : 시작 -->
|
<!-- SmartEditor : 시작 -->
|
||||||
<script src="${pageContext.request.contextPath}/js/smartEditor/js/service/HuskyEZCreator.js"></script>
|
<script src="<c:out value='${pageContext.request.contextPath}' />/js/smartEditor/js/service/HuskyEZCreator.js"></script>
|
||||||
<!-- SmartEditor : 종료 -->
|
<!-- SmartEditor : 종료 -->
|
||||||
|
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ $(window.document).ready(function() {
|
|||||||
nhn.husky.EZCreator.createInIFrame({
|
nhn.husky.EZCreator.createInIFrame({
|
||||||
oAppRef: oEditors,
|
oAppRef: oEditors,
|
||||||
elPlaceHolder: "content",
|
elPlaceHolder: "content",
|
||||||
sSkinURI: "${pageContext.request.contextPath}/js/smartEditor/SmartEditor2Skin.html",
|
sSkinURI: "<c:out value='${pageContext.request.contextPath}' />/js/smartEditor/SmartEditor2Skin.html",
|
||||||
fCreator: "createSEditor2"
|
fCreator: "createSEditor2"
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -82,7 +82,11 @@ $(window.document).ready(function() {
|
|||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
// 파일업로드 객체 생성
|
// 파일업로드 객체 생성
|
||||||
myDropzone = new Dropzone("form#myDropzone", {
|
myDropzone = new Dropzone("form#myDropzone", {
|
||||||
url: "${pageContext.request.contextPath}/fileupload/uploadFilesAjax.do?subPathKey=fileupload.bbs.qna.subpath&attachFileId=<c:out value='${searchArticle.bdAttachFileId}'/>"
|
url: "<c:out value='${pageContext.request.contextPath}' />/fileupload/uploadFilesAjax.do?subPathKey=fileupload.bbs.qna.subpath&attachFileId=<c:out value='${searchArticle.bdAttachFileId}'/>",
|
||||||
|
maxFilesize: <c:out value="${maxFilesize}" />,
|
||||||
|
maxFiles: <c:out value="${maxFiles}" />,
|
||||||
|
parallelUploads: <c:out value="${maxFiles}" />,
|
||||||
|
acceptedFiles: "<c:out value="${acceptedFiles}" />"
|
||||||
});
|
});
|
||||||
|
|
||||||
// 기존 첨부파일 출력
|
// 기존 첨부파일 출력
|
||||||
@ -90,12 +94,12 @@ $(window.document).ready(function() {
|
|||||||
var re = /(?:\.([^.]+))?$/;
|
var re = /(?:\.([^.]+))?$/;
|
||||||
<c:forEach var="attachFile" items="${searchArticle.attachFiles }" varStatus="status">
|
<c:forEach var="attachFile" items="${searchArticle.attachFiles }" varStatus="status">
|
||||||
myDropzone.addFile({
|
myDropzone.addFile({
|
||||||
name: '<c:out value='${attachFile.orignlFileNm}'/>',
|
name: '<c:out value="${attachFile.orignlFileNm}" />',
|
||||||
size:<c:out value='${attachFile.fileSize}'/>,
|
size: <c:out value="${attachFile.fileSize}" />,
|
||||||
type:re.exec('<c:out value='${attachFile.orignlFileNm}'/>')[1],
|
type:re.exec('<c:out value="${attachFile.orignlFileNm}" />')[1],
|
||||||
attachFileId: '<c:out value='${attachFile.attachFileId}'/>',
|
attachFileId: '<c:out value="${attachFile.attachFileId}" />',
|
||||||
streFileNm: '<c:out value='${attachFile.streFileNm}'/>',
|
streFileNm: '<c:out value="${attachFile.streFileNm}" />',
|
||||||
fileSn: '<c:out value='${attachFile.fileSn}'/>',
|
fileSn: '<c:out value="${attachFile.fileSn}" />',
|
||||||
fileUploadType: 'uploaded'
|
fileUploadType: 'uploaded'
|
||||||
});
|
});
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
@ -104,8 +108,14 @@ $(window.document).ready(function() {
|
|||||||
// 각 파일별 업로드 성공시 호출됨 (1th called)
|
// 각 파일별 업로드 성공시 호출됨 (1th called)
|
||||||
myDropzone.on("success", function(file, responseText) {
|
myDropzone.on("success", function(file, responseText) {
|
||||||
var jobj = JSON.parse(responseText);
|
var jobj = JSON.parse(responseText);
|
||||||
console.log("file upload success : responseText = " + responseText);
|
|
||||||
console.log("fileUpDone count : " + fileList.length);
|
//console.log("file upload success : responseText = " + responseText);
|
||||||
|
//console.log("fileUpDone count : " + fileList.length);
|
||||||
|
|
||||||
|
if(jobj.length < 1) {
|
||||||
|
alert("[" + file.name + "] 첨부파일 업로드 처리가 취소되었습니다. \n\n다음에 해당하는 경우, 업로드가 취소됩니다.\n- 최대 파일수 초과 \n- 파일용량 초과 \n- 첨부가능한 파일 종류가 아닌 경우");
|
||||||
|
return;
|
||||||
|
}
|
||||||
var idx = fileList.length;
|
var idx = fileList.length;
|
||||||
fileList[idx++] = {
|
fileList[idx++] = {
|
||||||
"attachFileId" : jobj[0].attachFileId,
|
"attachFileId" : jobj[0].attachFileId,
|
||||||
@ -118,12 +128,10 @@ $(window.document).ready(function() {
|
|||||||
console.log("success : " + file.name + " -> " + "data > " + jobj[0].streFileNm);
|
console.log("success : " + file.name + " -> " + "data > " + jobj[0].streFileNm);
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
|
||||||
myDropzone.on("error", function(file, message) {
|
myDropzone.on("error", function(file, message) {
|
||||||
myDropzone.removeFile(file);
|
myDropzone.removeFile(file);
|
||||||
alert(message);
|
alert(message);
|
||||||
});
|
});
|
||||||
*/
|
|
||||||
|
|
||||||
myDropzone.on("removedfile", function(file) {
|
myDropzone.on("removedfile", function(file) {
|
||||||
var idx = delFileList.length;
|
var idx = delFileList.length;
|
||||||
@ -138,25 +146,28 @@ $(window.document).ready(function() {
|
|||||||
|
|
||||||
// 각 파일별 업로드 처리 완료 시 호출됨 (2th called)
|
// 각 파일별 업로드 처리 완료 시 호출됨 (2th called)
|
||||||
myDropzone.on("complete", function(file) {
|
myDropzone.on("complete", function(file) {
|
||||||
console.log("개별 파일 처리 완료 > file = " + JSON.stringify(file));
|
//alert("개별 파일 처리 완료 > file = " + JSON.stringify(file));
|
||||||
});
|
});
|
||||||
|
|
||||||
// 모든 업로드 처리 완료 시 호출됨
|
// 모든 업로드 처리 완료 시 호출됨
|
||||||
myDropzone.on("queuecomplete", function() {
|
myDropzone.on("queuecomplete", function() {
|
||||||
var targetCnt = this.getAcceptedFiles().length;
|
var targetCnt = this.getAcceptedFiles().length;
|
||||||
var uploadCnt = fileList.length;
|
var uploadCnt = fileList.length;
|
||||||
var queuedCnt = this.getQueuedFiles();
|
|
||||||
|
console.log(targetCnt + " > " + uploadCnt);
|
||||||
|
|
||||||
if(uploadCnt > 0) {
|
if(uploadCnt > 0) {
|
||||||
$("#fileList").val(JSON.stringify(JSON.stringify(fileList)));
|
$("#fileList").val(JSON.stringify(JSON.stringify(fileList)));
|
||||||
}
|
}
|
||||||
if(IN_PROC) {
|
if(IN_PROC) {
|
||||||
if(queuedCnt > 0 && targetCnt > 0 && targetCnt != uploadCnt) {
|
if(targetCnt > 0 && targetCnt != uploadCnt) {
|
||||||
alert("일부 첨부파일 등록이 실패하였습니다.\n총 " + targetCnt + "건의 첨부파일 중 " + uploadCnt + "건이 정상적으로 업로드 되었습니다.\n글 등록을 계속 진행합니다.");
|
alert("일부 첨부파일 등록이 실패하였습니다.\n총 " + targetCnt + "건의 첨부파일 중 " + uploadCnt + "건이 정상적으로 업로드 되었습니다.\n글 등록을 계속 진행합니다.");
|
||||||
}
|
}
|
||||||
|
|
||||||
fn_saveSubmit();
|
fn_saveSubmit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
@ -180,7 +191,7 @@ function fn_list() {
|
|||||||
|
|
||||||
$('#articleForm').removeAttr('onsubmit');
|
$('#articleForm').removeAttr('onsubmit');
|
||||||
|
|
||||||
$("#articleForm").attr("action", "${pageContext.request.contextPath}/bbs/listQnas.do");
|
$("#articleForm").attr("action", "<c:out value='${pageContext.request.contextPath}' />/bbs/listQnas.do");
|
||||||
$("#articleForm").submit();
|
$("#articleForm").submit();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -253,7 +264,6 @@ function fn_saveSubmit() {
|
|||||||
$("#articleForm").submit();
|
$("#articleForm").submit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//파일 다운로드
|
//파일 다운로드
|
||||||
function fn_downloadFile(attachFileId, fileSn) {
|
function fn_downloadFile(attachFileId, fileSn) {
|
||||||
|
|
||||||
@ -272,6 +282,7 @@ function fn_downloadFile(attachFileId, fileSn) {
|
|||||||
$("#downloadFileForm").submit();
|
$("#downloadFileForm").submit();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
@ -376,9 +387,11 @@ function fn_downloadFile(attachFileId, fileSn) {
|
|||||||
<form name="downloadFileForm" id="downloadFileForm"
|
<form name="downloadFileForm" id="downloadFileForm"
|
||||||
action="${pageContext.request.contextPath}/fileupload/downloadAttachFile.do"
|
action="${pageContext.request.contextPath}/fileupload/downloadAttachFile.do"
|
||||||
method="post">
|
method="post">
|
||||||
<input type="hidden" name="bdType" id="bdType" value="ANCMNT" />
|
<input type="hidden" name="bdType" id="bdType" value="QNA" />
|
||||||
<input type="hidden" name="attachFileId" id="attachFileId" value="" />
|
<input type="hidden" name="attachFileId" id="attachFileId" value="" />
|
||||||
<input type="hidden" name="streFileNm" id="streFileNm" value="" />
|
<input type="hidden" name="streFileNm" id="streFileNm" value="" />
|
||||||
<input type="hidden" name="fileSn" id="fileSn" value="" />
|
<input type="hidden" name="fileSn" id="fileSn" value="" />
|
||||||
<input type="hidden" name="orignlFileNm" id="orignlFileNm" value="" />
|
<input type="hidden" name="orignlFileNm" id="orignlFileNm" value="" />
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
$( document ).ready(function() {
|
$( document ).ready(function() {
|
||||||
|
|
||||||
fn_setPageTitle("Q&A");
|
fn_setPageTitle("<c:out value='${pageTitle}'/>");
|
||||||
|
|
||||||
// 검색 수행 이벤트
|
// 검색 수행 이벤트
|
||||||
$("#btnSearch").on("click", function(e) {
|
$("#btnSearch").on("click", function(e) {
|
||||||
@ -51,10 +51,10 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
// 메시지 표출
|
// 메시지 표출
|
||||||
if(!gfn_isEmpty("<c:out value='${message}'/>")) {
|
if(!gfn_isEmpty("<c:out value='${message}'/>") || !gfn_isEmpty("<c:out value='${searchArticle.resultMessage}'/>")) {
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
alert("<c:out value='${message}'/>");
|
alert("<c:out value='${message}'/>" + " <c:out value='${searchArticle.resultMessage}'/>");
|
||||||
}, 1000); // 화면 표출되도록 딜레이 줌
|
}, 700); // 화면 표출되도록 딜레이 줌
|
||||||
}
|
}
|
||||||
|
|
||||||
//초기 자료 조회
|
//초기 자료 조회
|
||||||
|
|||||||
@ -93,8 +93,9 @@ function goList(){
|
|||||||
<div class="inner">
|
<div class="inner">
|
||||||
<div class="row-top">
|
<div class="row-top">
|
||||||
<div class="center">
|
<div class="center">
|
||||||
<div class="left">
|
|
||||||
<div class="cla">
|
<div class="title-box">
|
||||||
|
<div class="cla-info">
|
||||||
<div class="con-1">
|
<div class="con-1">
|
||||||
<c:if test="${result.ableOnline eq true}">
|
<c:if test="${result.ableOnline eq true}">
|
||||||
<span class="online">온라인열람</span>
|
<span class="online">온라인열람</span>
|
||||||
@ -113,11 +114,8 @@ function goList(){
|
|||||||
<span class="code"><c:out value="${result.mngtNo}"/></span>
|
<span class="code"><c:out value="${result.mngtNo}"/></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tit"><c:out value="${result.title}"/></div>
|
<div class="tit-info"><c:out value="${result.title}"/></div>
|
||||||
<div class="img"><img src="<c:out value="${result.rprsThumbUrlWithDefaultBig}"/>" alt="<c:out value='${result.title}'/>"></div>
|
<div class="btn-info">
|
||||||
</div>
|
|
||||||
<div class="right">
|
|
||||||
<div class="con-1">
|
|
||||||
<c:if test="${result.ableOnline eq true}">
|
<c:if test="${result.ableOnline eq true}">
|
||||||
<button type="button" class="view" title="새 창 열림" onclick="gfn_showDocPdf('<c:out value="${result.interfaceId}"/>','<c:out value="${result.masterId}"/>','<c:out value="${result.typeDivCd}"/>','<c:out value="${result.dtlsTypeDivCd}"/>')";>원문보기</button>
|
<button type="button" class="view" title="새 창 열림" onclick="gfn_showDocPdf('<c:out value="${result.interfaceId}"/>','<c:out value="${result.masterId}"/>','<c:out value="${result.typeDivCd}"/>','<c:out value="${result.dtlsTypeDivCd}"/>')";>원문보기</button>
|
||||||
</c:if>
|
</c:if>
|
||||||
@ -130,7 +128,14 @@ function goList(){
|
|||||||
</c:if>
|
</c:if>
|
||||||
<button type="button" class="share" onclick="gfn_setSnsShare('<c:out value="${result.masterId}"/>');">공유</button>
|
<button type="button" class="share" onclick="gfn_setSnsShare('<c:out value="${result.masterId}"/>');">공유</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="con-2">
|
</div>
|
||||||
|
|
||||||
|
<div class="left">
|
||||||
|
<div class="img"><img src="<c:out value="${result.rprsThumbUrlWithDefaultBig}"/>" alt="<c:out value='${result.title}'/>"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="right">
|
||||||
|
<div class="data-info">
|
||||||
<div class="de-data">
|
<div class="de-data">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
|
|||||||
@ -930,39 +930,42 @@ transform: rotate(45deg);}
|
|||||||
.data.detail .inner {}
|
.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 {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 {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 .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 .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 .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 .data-info {border-top:1px solid #ddd;padding-top:20px;}
|
||||||
.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 .data-info .de-data {}
|
||||||
.data.detail .inner .row-top .center .right .con-1 button.view {width:auto;padding:0px 26px;}
|
.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 .con-1 button.ris {}
|
.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 .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 .data-info .de-data ul.full-width li {width:100%;}
|
||||||
/*.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 .data-info .de-data ul li span {font-size:14px;color:#fff;}
|
||||||
.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 .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 .con-1 button.original {width:200px;display:none;}
|
.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 .con-2 {}
|
.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 .con-2 .de-data {}
|
.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 .con-2 .de-data ul {width: 100%;/*display: flex;flex-direction: column;*/}
|
.data.detail .inner .row-top .center .right .data-info .keyword {}
|
||||||
.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 .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 .con-2 .de-data ul.full-width li {width:100%;}
|
.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-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-bottom .con-1 {display:inline-block;width:100%;border:1px solid #ddd;margin:50px 0px 100px;}
|
.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 {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;}
|
.data.detail .inner .row-bottom .con-1 .list-box .list {float:left;width:24.9%;border-right:1px solid #ddd;text-align: center;}
|
||||||
|
|||||||
@ -158,7 +158,7 @@ footer .family_site {right:10px;}
|
|||||||
.article-side {width:22%;margin-right:2%;}
|
.article-side {width:22%;margin-right:2%;}
|
||||||
.culture-box {width:74%;}
|
.culture-box {width:74%;}
|
||||||
.data.detail .inner .row-top .center .left {width:40%;}
|
.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%;}
|
.data.detail .inner .row-top .center .right {width:54%;}
|
||||||
.greeting .inner .row-bottom .greeting-box .gree {width:90%;padding:70px 5%;}
|
.greeting .inner .row-bottom .greeting-box .gree {width:90%;padding:70px 5%;}
|
||||||
.guide .inner .row-bottom { padding: 0px 0px 80px; box-sizing: border-box; }
|
.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%;}
|
.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;}
|
.wrap .nav-wrap #primary-nav {display:none !important;opacity:0 !important;}
|
||||||
|
.data.detail .inner .row-top .center .title-box .tit-info {width:70%;}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 모바일 가로, 테블릿 세로 (해상도 ~ 768px)*/
|
/* 모바일 가로, 테블릿 세로 (해상도 ~ 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 { 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 .left,
|
||||||
.data.detail .inner .row-top .center .right,
|
.data.detail .inner .row-top .center .right,
|
||||||
.data.detail .inner .row-bottom .con-4 .top h3,
|
.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 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-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-bottom { padding: 0; }
|
||||||
.data.detail .inner .row-top .center .left .cla { position: relative; }
|
.data.detail .inner .row-top .center .right .data-info .de-data { flex-direction: column;margin-top:20px;}
|
||||||
.data.detail .inner .row-top .center .left .cla .con-1 { width: 100%; display: block; }
|
.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 .left .cla .con-2 { position: relative; top: 5px; padding: 0; }
|
.data.detail .inner .row-top .center .right .data-info .de-data ul li { width: 100%; }
|
||||||
.data.detail .inner .row-top .center .left .tit { font-size: 22px; margin-bottom: 30px;overflow:hidden; }
|
.data.detail .inner .row-top .center .right .data-info .b-btn button { width: 100%; margin-bottom: 6px; }
|
||||||
.data.detail .inner .row-top .center .right .con-1 { display: flex; height: auto; border: none; }
|
.data.detail .inner .row-top .center .right .data-info .keyword span.first,
|
||||||
.data.detail .inner .row-top .center .right .con-1 button { margin-top: 14px; width: 36px; height: 36px; }
|
.data.detail .inner .row-top .center .right .data-info .keyword span { padding: 5px 14px 5px; border-radius: 30px; }
|
||||||
.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 .left .img img {width:100%;max-height: 430px;max-width: 300px;}
|
.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.contents { padding: 0 16px; }
|
||||||
.data.detail .inner .row-bottom .con-1 { margin-bottom: 30px; }
|
.data.detail .inner .row-bottom .con-1 { margin-bottom: 30px; }
|
||||||
|
|||||||
@ -112,15 +112,20 @@
|
|||||||
dropzone.on("dragEnter", function() { });
|
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 = {
|
Dropzone.prototype.defaultOptions = {
|
||||||
url: null,
|
url: null,
|
||||||
method: "post",
|
method: "post",
|
||||||
withCredentials: false,
|
withCredentials: false,
|
||||||
parallelUploads: 5,
|
parallelUploads: 3,
|
||||||
uploadMultiple: false,
|
uploadMultiple: false,
|
||||||
maxFilesize: 256,
|
// maxFilesize: 256, // NLIB
|
||||||
|
maxFilesize: 10, // NLIB : 10MB
|
||||||
paramName: "file",
|
paramName: "file",
|
||||||
createImageThumbnails: true,
|
createImageThumbnails: true,
|
||||||
maxThumbnailFilesize: 10,
|
maxThumbnailFilesize: 10,
|
||||||
@ -129,7 +134,7 @@
|
|||||||
thumbnailHeight: 60, // NLIB
|
thumbnailHeight: 60, // NLIB
|
||||||
filesizeBase: 1000,
|
filesizeBase: 1000,
|
||||||
//maxFiles: null,
|
//maxFiles: null,
|
||||||
maxFiles: 3, // NLIB : 최대 업로드 가능한 파일수
|
maxFiles: 5, // NLIB : 최대 업로드 가능한 파일수
|
||||||
params: {},
|
params: {},
|
||||||
clickable: true,
|
clickable: true,
|
||||||
ignoreHiddenFiles: true,
|
ignoreHiddenFiles: true,
|
||||||
@ -147,7 +152,7 @@
|
|||||||
//dictFallbackMessage: "Your browser does not support drag'n'drop file uploads.",
|
//dictFallbackMessage: "Your browser does not support drag'n'drop file uploads.",
|
||||||
dictFallbackMessage: "파일 드래그앤드랍을 지원하지 않는 브라우저입니다.", // NLIB
|
dictFallbackMessage: "파일 드래그앤드랍을 지원하지 않는 브라우저입니다.", // NLIB
|
||||||
dictFallbackText: "Please use the fallback form below to upload your files like in the olden days.",
|
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: "You can't upload files of this type.",
|
||||||
dictInvalidFileType: "허용된 파일 형식만 첨부가능합니다 (이미지,문서 파일) ", // NLIB
|
dictInvalidFileType: "허용된 파일 형식만 첨부가능합니다 (이미지,문서 파일) ", // NLIB
|
||||||
dictResponseError: "Server responded with {{statusCode}} code.",
|
dictResponseError: "Server responded with {{statusCode}} code.",
|
||||||
@ -157,7 +162,7 @@
|
|||||||
dictRemoveFile: "취소", // NLIB
|
dictRemoveFile: "취소", // NLIB
|
||||||
dictRemoveFileConfirmation: null,
|
dictRemoveFileConfirmation: null,
|
||||||
//dictMaxFilesExceeded: "You can not upload any more files.",
|
//dictMaxFilesExceeded: "You can not upload any more files.",
|
||||||
dictMaxFilesExceeded: "이파일은, 첨부 가능 최대 개수를 초과하여 업로드되지 않습니다.", // NLIB
|
dictMaxFilesExceeded: "최대 첨부할 수 있는 파일은 {{maxFiles}}개 입니다.", // NLIB
|
||||||
accept: function(file, done) {
|
accept: function(file, done) {
|
||||||
return done();
|
return done();
|
||||||
},
|
},
|
||||||
@ -284,9 +289,7 @@
|
|||||||
node = _ref1[_j];
|
node = _ref1[_j];
|
||||||
node.title = '이미 등록된 파일입니다. 클릭하여 다운로드할 수 있습니다.';
|
node.title = '이미 등록된 파일입니다. 클릭하여 다운로드할 수 있습니다.';
|
||||||
$(node).css("cursor", "pointer");
|
$(node).css("cursor", "pointer");
|
||||||
$(node).on("click", function() {
|
$(node).attr("onclick", "fn_downloadFile('" + file.attachFileId + "', " + file.fileSn + ")");
|
||||||
fn_downloadFile(file.attachFileId, file.fileSn);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user