From 7ab7de6b16d634429a33e6179214eb6ee737b7fe Mon Sep 17 00:00:00 2001 From: KNKIM Date: Wed, 28 Jul 2021 13:23:05 +0900 Subject: [PATCH] .gitignore --- .classpath | 84 +- .settings/.jsdtscope | 12 - .settings/org.eclipse.core.resources.prefs | 3 - .settings/org.eclipse.jdt.core.prefs | 8 - .settings/org.eclipse.jdt.ui.prefs | 5 - .settings/org.eclipse.wst.common.component | 9 - ...se.wst.common.project.facet.core.prefs.xml | 12 - ....eclipse.wst.common.project.facet.core.xml | 10 - ...rg.eclipse.wst.jsdt.ui.superType.container | 1 - .../org.eclipse.wst.jsdt.ui.superType.name | 1 - .settings/org.eclipse.wst.validation.prefs | 2 - .../uac.service.board.qna.list_GET.xml | 156 +- data/dataxml/uac.service.board.qna_GET.xml | 82 +- data/dataxml/uac.service.board.qna_POST.xml | 14 +- data/dataxml/uac.service.board.qna_PUT.xml | 14 +- .../uac.service.code.list.PAGE_SIZE_GET.xml | 36 +- .../uac.service.inform.greeting_GET.xml | 34 +- .../uac.service.inform.location_GET.xml | 158 +- .../uac.service.inform.operation_GET.xml | 156 +- .../uac.service.inform.privacy_GET.xml | 266 +- data/dataxml/uac.service.inform.terms_GET.xml | 228 +- data/dataxml/user.sec.login_GET.xml | 18 +- doc/CLD/00.Main.cld | 528 +-- doc/CLD/01.User.cld | 528 +-- doc/CLD/02.Login.cld | 528 +-- doc/CLD/03.Board.cld | 528 +-- doc/CLD/04.Collection.cld | 528 +-- doc/CLD/05.Rent.cld | 528 +-- doc/CLD/09.Inform.cld | 528 +-- .../java/nlib/bbs/service/BoardService.java | 110 +- .../java/nlib/bbs/service/impl/BoardDAO.java | 138 +- .../bbs/service/impl/BoardServiceImpl.java | 130 +- .../java/nlib/bbs/web/BoardController.java | 820 ++-- .../java/nlib/cmm/NlibCommonController.java | 356 +- src/main/java/nlib/cmm/crypto/AriaCrypto.java | 262 +- .../nlib/cmm/crypto/NlibPasswordEncoder.java | 136 +- .../cmm/fileupload/FileUploadController.java | 372 +- .../nlib/cmm/fileupload/FileUploadDomain.java | 82 +- .../java/nlib/cmm/service/impl/CodeDAO.java | 54 +- .../java/nlib/cmm/web/CodeController.java | 174 +- .../nlib/restful/service/DataApiReqVO.java | 278 +- .../nlib/restful/service/DataApiResVO.java | 268 +- .../nlib/restful/service/XmlConverter.java | 478 +-- .../restful/service/impl/DataApiRESTful.java | 336 +- .../restful/service/impl/DataApiTempXml.java | 432 +- .../sample/service/SampleDataApiService.java | 64 +- .../sample/service/impl/SampleDataApiDAO.java | 94 +- .../impl/SampleDataApiServiceImpl.java | 88 +- .../nlib/sample/web/BarcodeController.java | 208 +- .../sample/web/SampleDataApiController.java | 170 +- .../sample/web/SampleEncoderController.java | 216 +- .../nlib/user/web/userInfoController.java | 152 +- src/main/java/nlib/util/UUID.java | 96 +- .../egovframework/spring/context-common.xml | 154 +- .../spring/context-validator.xml | 36 +- src/main/resources/log4j2.xml | 52 +- src/main/resources/nlib/nlib.properties | 124 +- .../springmvc/dispatcher-servlet.xml | 168 +- .../WEB-INF/jsp/nlib/board/insertQnA.jsp | 166 +- .../WEB-INF/jsp/nlib/board/insertQnAForm.jsp | 242 +- .../WEB-INF/jsp/nlib/board/listFAQs.jsp | 166 +- .../WEB-INF/jsp/nlib/board/listNotices.jsp | 292 +- .../WEB-INF/jsp/nlib/board/listQnAs.jsp | 366 +- .../WEB-INF/jsp/nlib/board/selectQnA.jsp | 314 +- .../WEB-INF/jsp/nlib/board/updateQnAForm.jsp | 286 +- .../jsp/nlib/cmm/error/accessDenied.jsp | 74 +- .../jsp/nlib/cmm/error/bizException.jsp | 78 +- .../webapp/WEB-INF/jsp/nlib/cmm/validator.jsp | 6 +- .../jsp/nlib/inform/selectGreeting.jsp | 118 +- .../inform/selectNCultureLocationInfo.jsp | 126 +- .../inform/selectNCultureOperationInfo.jsp | 116 +- .../jsp/nlib/inform/selectPrivacyInfo.jsp | 116 +- .../jsp/nlib/inform/selectTermsInfo.jsp | 116 +- .../jsp/nlib/member/initPasswordResult.jsp | 70 +- .../jsp/nlib/member/insertMemberInfoForm.jsp | 786 ++-- .../nlib/member/insertMemberInfoResult.jsp | 72 +- .../WEB-INF/jsp/nlib/member/searchIdForm.jsp | 150 +- .../jsp/nlib/member/searchIdResult.jsp | 72 +- .../nlib/member/selectMemberJoiningInfo.jsp | 100 +- .../WEB-INF/jsp/nlib/member/snsCertForm.jsp | 442 +-- .../WEB-INF/jsp/nlib/popup/jusoPopup.jsp | 150 +- .../jsp/nlib/popup/naverLoginResultPopup.jsp | 100 +- .../jsp/nlib/popup/naverSignResultPopup.jsp | 112 +- .../jsp/nlib/rent/listCancelRentItems.jsp | 362 +- .../WEB-INF/jsp/nlib/rent/listRentItems.jsp | 362 +- .../jsp/nlib/rent/listReservations.jsp | 362 +- .../webapp/WEB-INF/jsp/nlib/user/admin.jsp | 86 +- .../WEB-INF/jsp/nlib/userInfo/getMyInfo.jsp | 78 +- .../WEB-INF/jsp/nlib/userInfo/putMyInfo.jsp | 506 +-- .../jsp/nlib/userInfo/pwCertMyInfo.jsp | 102 +- src/main/webapp/WEB-INF/tiles/inc/menu.jsp | 68 +- .../webapp/WEB-INF/tiles/tiles-layout.jsp | 104 +- .../webapp/WEB-INF/tiles/tiles-layout.xml | 80 +- src/main/webapp/WEB-INF/web.xml | 176 +- src/main/webapp/css/nlib.css | 318 +- src/main/webapp/js/fileupload/dropzone.css | 788 ++-- src/main/webapp/js/fileupload/dropzone.js | 3508 ++++++++--------- .../webapp/js/fileupload/org/dropzone.css | 784 ++-- src/main/webapp/js/fileupload/org/dropzone.js | 3496 ++++++++-------- src/main/webapp/js/fileupload/org/style.css | 1498 +++---- src/main/webapp/js/fileupload/style.css | 1498 +++---- src/main/webapp/mail/mail_template.html | 22 +- .../egovProps/globals.properties | 140 - target/classes/log4j2.xml | 26 - .../web-resources/META-INF/MANIFEST.MF | 5 - 105 files changed, 14912 insertions(+), 15146 deletions(-) delete mode 100644 .settings/.jsdtscope delete mode 100644 .settings/org.eclipse.core.resources.prefs delete mode 100644 .settings/org.eclipse.jdt.core.prefs delete mode 100644 .settings/org.eclipse.jdt.ui.prefs delete mode 100644 .settings/org.eclipse.wst.common.component delete mode 100644 .settings/org.eclipse.wst.common.project.facet.core.prefs.xml delete mode 100644 .settings/org.eclipse.wst.common.project.facet.core.xml delete mode 100644 .settings/org.eclipse.wst.jsdt.ui.superType.container delete mode 100644 .settings/org.eclipse.wst.jsdt.ui.superType.name delete mode 100644 .settings/org.eclipse.wst.validation.prefs delete mode 100644 target/classes/egovframework/egovProps/globals.properties delete mode 100644 target/classes/log4j2.xml delete mode 100644 target/m2e-wtp/web-resources/META-INF/MANIFEST.MF diff --git a/.classpath b/.classpath index 6a8ab7df..e312c300 100644 --- a/.classpath +++ b/.classpath @@ -1,42 +1,42 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.settings/.jsdtscope b/.settings/.jsdtscope deleted file mode 100644 index 81672d47..00000000 --- a/.settings/.jsdtscope +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 5b781ec6..00000000 --- a/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,3 +0,0 @@ -eclipse.preferences.version=1 -encoding//src/main/java=UTF-8 -encoding//src/test/java=UTF-8 diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 6e80039d..00000000 --- a/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,8 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/.settings/org.eclipse.jdt.ui.prefs b/.settings/org.eclipse.jdt.ui.prefs deleted file mode 100644 index 16678429..00000000 --- a/.settings/org.eclipse.jdt.ui.prefs +++ /dev/null @@ -1,5 +0,0 @@ -eclipse.preferences.version=1 -formatter_profile=org.eclipse.jdt.ui.default.eclipse_profile -formatter_settings_version=13 -org.eclipse.jdt.ui.javadoc=false -org.eclipse.jdt.ui.text.custom_code_templates= diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component deleted file mode 100644 index ba0da30b..00000000 --- a/.settings/org.eclipse.wst.common.component +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml b/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml deleted file mode 100644 index 6d59853d..00000000 --- a/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/.settings/org.eclipse.wst.common.project.facet.core.xml b/.settings/org.eclipse.wst.common.project.facet.core.xml deleted file mode 100644 index de08b7f0..00000000 --- a/.settings/org.eclipse.wst.common.project.facet.core.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/.settings/org.eclipse.wst.jsdt.ui.superType.container b/.settings/org.eclipse.wst.jsdt.ui.superType.container deleted file mode 100644 index 3bd5d0a4..00000000 --- a/.settings/org.eclipse.wst.jsdt.ui.superType.container +++ /dev/null @@ -1 +0,0 @@ -org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/.settings/org.eclipse.wst.jsdt.ui.superType.name b/.settings/org.eclipse.wst.jsdt.ui.superType.name deleted file mode 100644 index 05bd71b6..00000000 --- a/.settings/org.eclipse.wst.jsdt.ui.superType.name +++ /dev/null @@ -1 +0,0 @@ -Window \ No newline at end of file diff --git a/.settings/org.eclipse.wst.validation.prefs b/.settings/org.eclipse.wst.validation.prefs deleted file mode 100644 index 04cad8cb..00000000 --- a/.settings/org.eclipse.wst.validation.prefs +++ /dev/null @@ -1,2 +0,0 @@ -disabled=06target -eclipse.preferences.version=1 diff --git a/data/dataxml/uac.service.board.qna.list_GET.xml b/data/dataxml/uac.service.board.qna.list_GET.xml index 58256205..67455e17 100644 --- a/data/dataxml/uac.service.board.qna.list_GET.xml +++ b/data/dataxml/uac.service.board.qna.list_GET.xml @@ -1,78 +1,78 @@ - - - - 1 - 15 - 125 - - 1 - 질문있습니다. - 김길동 - 답변완료 - 2021-07-19 - - - 2 - 질문있습니다. - 김길동 - 답변완료 - 2021-07-19 - - - 3 - 질문있습니다. - 김길동 - 답변완료 - 2021-07-19 - - - 4 - 질문있습니다. - 김길동 - 대기 - 2021-07-19 - - - 5 - 질문있습니다. - 김길동 - 대기 - 2021-07-19 - - - 6 - 질문있습니다. - 김길동 - 답변완료 - 2021-07-19 - - - 7 - 질문있습니다. - 김길동 - 답변완료 - 2021-07-19 - - - 8 - 질문있습니다. - 김길동 - 답변완료 - 2021-07-19 - - - 9 - 질문있습니다. - 김길동 - 답변완료 - 2021-07-19 - - - 10 - 질문있습니다. - 김길동 - 답변완료 - 2021-07-19 - - - + + + + 1 + 15 + 125 + + 1 + 질문있습니다. + 김길동 + 답변완료 + 2021-07-19 + + + 2 + 질문있습니다. + 김길동 + 답변완료 + 2021-07-19 + + + 3 + 질문있습니다. + 김길동 + 답변완료 + 2021-07-19 + + + 4 + 질문있습니다. + 김길동 + 대기 + 2021-07-19 + + + 5 + 질문있습니다. + 김길동 + 대기 + 2021-07-19 + + + 6 + 질문있습니다. + 김길동 + 답변완료 + 2021-07-19 + + + 7 + 질문있습니다. + 김길동 + 답변완료 + 2021-07-19 + + + 8 + 질문있습니다. + 김길동 + 답변완료 + 2021-07-19 + + + 9 + 질문있습니다. + 김길동 + 답변완료 + 2021-07-19 + + + 10 + 질문있습니다. + 김길동 + 답변완료 + 2021-07-19 + + + diff --git a/data/dataxml/uac.service.board.qna_GET.xml b/data/dataxml/uac.service.board.qna_GET.xml index e589c50a..641c52c3 100644 --- a/data/dataxml/uac.service.board.qna_GET.xml +++ b/data/dataxml/uac.service.board.qna_GET.xml @@ -1,41 +1,41 @@ - - - - - 5 - 101 - 공지사항 테스트 - 111 - 15 - 2021-07-19 - 김아무 - 답변완료 - myid@digitalship.co.kr - 질문이 있습니다. - 111111=화면캡쳐.jpg;222222=화면캡쳐2.jpg; - 이렇게 답변 드립니다. - 333333=결과확인.jpg; - - - 1 - 1 - 2 - - 4 - 101 - 이전의 글제목입니다. - 2021-07-19 - 김아무 - 답변완료 - - - 6 - 102 - 다음의 글제목입니다. - 2021-07-20 - 홍아무 - 답변완료 - - - - + + + + + 5 + 101 + 공지사항 테스트 + 111 + 15 + 2021-07-19 + 김아무 + 답변완료 + myid@digitalship.co.kr + 질문이 있습니다. + 111111=화면캡쳐.jpg;222222=화면캡쳐2.jpg; + 이렇게 답변 드립니다. + 333333=결과확인.jpg; + + + 1 + 1 + 2 + + 4 + 101 + 이전의 글제목입니다. + 2021-07-19 + 김아무 + 답변완료 + + + 6 + 102 + 다음의 글제목입니다. + 2021-07-20 + 홍아무 + 답변완료 + + + + diff --git a/data/dataxml/uac.service.board.qna_POST.xml b/data/dataxml/uac.service.board.qna_POST.xml index 74e816f6..99542506 100644 --- a/data/dataxml/uac.service.board.qna_POST.xml +++ b/data/dataxml/uac.service.board.qna_POST.xml @@ -1,7 +1,7 @@ - - - - - 10 - - + + + + + 10 + + diff --git a/data/dataxml/uac.service.board.qna_PUT.xml b/data/dataxml/uac.service.board.qna_PUT.xml index 3ad369cd..0fa64dcf 100644 --- a/data/dataxml/uac.service.board.qna_PUT.xml +++ b/data/dataxml/uac.service.board.qna_PUT.xml @@ -1,7 +1,7 @@ - - - - - 10 - - + + + + + 10 + + diff --git a/data/dataxml/uac.service.code.list.PAGE_SIZE_GET.xml b/data/dataxml/uac.service.code.list.PAGE_SIZE_GET.xml index 72f1b24d..001339c8 100644 --- a/data/dataxml/uac.service.code.list.PAGE_SIZE_GET.xml +++ b/data/dataxml/uac.service.code.list.PAGE_SIZE_GET.xml @@ -1,18 +1,18 @@ - - - - 3 - - 010 - 10개씩 - - - 050 - 50개씩 - - - 100 - 100개씩 - - - + + + + 3 + + 010 + 10개씩 + + + 050 + 50개씩 + + + 100 + 100개씩 + + + diff --git a/data/dataxml/uac.service.inform.greeting_GET.xml b/data/dataxml/uac.service.inform.greeting_GET.xml index a6c842b0..7172e614 100644 --- a/data/dataxml/uac.service.inform.greeting_GET.xml +++ b/data/dataxml/uac.service.inform.greeting_GET.xml @@ -1,17 +1,17 @@ - - - - - 마포문화원 - https://www.mapocc.or.kr/image/common/logo.gif - - - 또한, 구민 누구나 무료로 이용할 수 있는 각종 전문서적과 비디오, 오디오, 인터넷 시스템을 갖춘 상설정보센터를 운영을 하고 있으며, - 지역향토사 관련하여 향토사연구소 운영을 통해 매년 향토사료집 발간을 하고 있다.
- 2006년 마포향토문화해설사 양성교육을 통하여 초, 중, 고등학교에 지역역사문화탐방을 실시하며 어린이 및 청소년들에게 우리지역 향토역사에 대한 교육도 실시하고 있다.
- 또한, 각종문화행사시 향토해설사들의 활동을 통하여 구민들에게 알리는 활동도 활발하게 진행되어지고 있다. - ]]> -
-
- + + + + + 마포문화원 + https://www.mapocc.or.kr/image/common/logo.gif + + + 또한, 구민 누구나 무료로 이용할 수 있는 각종 전문서적과 비디오, 오디오, 인터넷 시스템을 갖춘 상설정보센터를 운영을 하고 있으며, + 지역향토사 관련하여 향토사연구소 운영을 통해 매년 향토사료집 발간을 하고 있다.
+ 2006년 마포향토문화해설사 양성교육을 통하여 초, 중, 고등학교에 지역역사문화탐방을 실시하며 어린이 및 청소년들에게 우리지역 향토역사에 대한 교육도 실시하고 있다.
+ 또한, 각종문화행사시 향토해설사들의 활동을 통하여 구민들에게 알리는 활동도 활발하게 진행되어지고 있다. + ]]> +
+
+ diff --git a/data/dataxml/uac.service.inform.location_GET.xml b/data/dataxml/uac.service.inform.location_GET.xml index 33837f64..da4f1f38 100644 --- a/data/dataxml/uac.service.inform.location_GET.xml +++ b/data/dataxml/uac.service.inform.location_GET.xml @@ -1,79 +1,79 @@ - - - - - 04173 - 서울 마포구 삼개로 16 - 근신빌딩 - 02-1111-2222 - 02-1111-2223 - - - - -
- - - - - - - - - - -

오시는길 상세정보

-
    -
  • 주소 : 서울시 마포구 지역문화원로 60(OO동 54-1) (우)11338
  • -
  • 전화 : 031) 860-3261~2
  • -
  • 팩스 : 031) 860-2568
  • -
-

교통

-

도보로 오실 경우(20~25분 소요)

-
    -
  • 마포역 1번 출구에서 나와 OO방향으로 직진, 마포교 다리를 건너 주공아파트쪽으로 직진해서 걸어오시면 오른쪽에 위치한 건물이 마포구립도서관입니다.
  • -
-

대중교통 이용 시

-

OO운수 17번

-
    -
  • OOO주유소 – OOO
  • -
-
- - - - - - - - - - - - - - - - - - - - -
17번 버스 배차시간 및 소요간격 안내표
출발지출발시간소요시간
시립도서관09:20 / 11:40 / 14:50 / 17:10 / 20:00약 15분
마포역역07:25 / 08:50 / 11:15 / 14:25 / 16:45 / 19:35
-

운행상황에 따라 시간오차가 있을 수 있음

-
- ]]> -
-
- + + + + + 04173 + 서울 마포구 삼개로 16 + 근신빌딩 + 02-1111-2222 + 02-1111-2223 + + + + +
+ + + + + + + + + + +

오시는길 상세정보

+
    +
  • 주소 : 서울시 마포구 지역문화원로 60(OO동 54-1) (우)11338
  • +
  • 전화 : 031) 860-3261~2
  • +
  • 팩스 : 031) 860-2568
  • +
+

교통

+

도보로 오실 경우(20~25분 소요)

+
    +
  • 마포역 1번 출구에서 나와 OO방향으로 직진, 마포교 다리를 건너 주공아파트쪽으로 직진해서 걸어오시면 오른쪽에 위치한 건물이 마포구립도서관입니다.
  • +
+

대중교통 이용 시

+

OO운수 17번

+
    +
  • OOO주유소 – OOO
  • +
+
+ + + + + + + + + + + + + + + + + + + + +
17번 버스 배차시간 및 소요간격 안내표
출발지출발시간소요시간
시립도서관09:20 / 11:40 / 14:50 / 17:10 / 20:00약 15분
마포역역07:25 / 08:50 / 11:15 / 14:25 / 16:45 / 19:35
+

운행상황에 따라 시간오차가 있을 수 있음

+
+ ]]> +
+
+ diff --git a/data/dataxml/uac.service.inform.operation_GET.xml b/data/dataxml/uac.service.inform.operation_GET.xml index 559e72c8..06b30da0 100644 --- a/data/dataxml/uac.service.inform.operation_GET.xml +++ b/data/dataxml/uac.service.inform.operation_GET.xml @@ -1,78 +1,78 @@ - - - - - - 정기휴관일 -
    -
  • 어린이누리실, 책누리실 : 1월1일, 설날연휴, 추석연휴, 법정 공휴일, 매주 월요일
  • -
  • 커뮤니티실 및 학습실 : 1월1일, 설날연휴, 추석연휴
  • -
-

이용시간

- - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- 이용시간 -
구분월, 법정공휴일(평일,주말)화요일~금요일토요일~일요일비고
어린이누리실(1층)
- 책누리실(2층)
- (정보원문검색코너)
휴실09:00 ~ 18:0009:00 ~ 18:00
커뮤니티실(3층)08:00 ~ 18:0008:00 ~ 22:0008:00 ~ 18:00
학습실(3층)08:00 ~ 18:0008:00 ~ 22:0008:00 ~ 22:00
-
  • ※ 현재 코로나19와 관련하여 11.25. ~ 상황변동시까지 단축 운영중입니다.
    ※ 자세한 운영시간은 메인화면 [도서관 이용시간 안내]를 확인하시기 바랍니다.
  • - -

    도서대출/반납

    -
      -
    • 대출권수 : 1인 1회 10권
    • -
    • 대출기간 : 14일(7일 연장 가능-전화)
    • -
    • 책이음 가입 도서관 전체 최대 20권, 스마트도서관 3권
    • -
    • 도서연장 : 홈페이지 로그인 후 신청하거나 모바일 도서관인 리브로피아에서 1회(7일) 연장 가능
    • -
    • 책이음 서비스운영 : 1개의 회원증으로 8개 도서관 (OO시립, 꿈나무정보, 어수정 작은도서관, 종합운동장 지혜의 등대, 소요초등학교 지혜의 등대, 사동초등학교 지혜의 집, 남산모루 작은도서관, 스마트도서관) 대출 가능
    • -
    • 대출정지 : 대출도서의 반납기한이 초과되었을 경우 연체된 일수 만큼 대출이 정지
      - ※ 연체될 경우 5개 도서관(시립,정보,어수정 작은도서관,종합운동장 지혜의 등대,남산모루 작은도서관) 모두 동일하게 연체일수 적용됨
    • -
    • 도서변상 : 대출도서의 분실 또는 훼손시에는 동일도서로 변상
    • -
    • OO시 도서관 이용시 반드시 본인 명의의 카드를 지참하셔야 대출이 가능합니다.
      (가족카드이용시에도 지참해야 함)
    • -
    - ]]> -
    -
    - + + + + + + 정기휴관일 +
      +
    • 어린이누리실, 책누리실 : 1월1일, 설날연휴, 추석연휴, 법정 공휴일, 매주 월요일
    • +
    • 커뮤니티실 및 학습실 : 1월1일, 설날연휴, 추석연휴
    • +
    +

    이용시간

    + + + + + + ++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + 이용시간 +
    구분월, 법정공휴일(평일,주말)화요일~금요일토요일~일요일비고
    어린이누리실(1층)
    + 책누리실(2층)
    + (정보원문검색코너)
    휴실09:00 ~ 18:0009:00 ~ 18:00
    커뮤니티실(3층)08:00 ~ 18:0008:00 ~ 22:0008:00 ~ 18:00
    학습실(3층)08:00 ~ 18:0008:00 ~ 22:0008:00 ~ 22:00
    +
  • ※ 현재 코로나19와 관련하여 11.25. ~ 상황변동시까지 단축 운영중입니다.
    ※ 자세한 운영시간은 메인화면 [도서관 이용시간 안내]를 확인하시기 바랍니다.
  • + +

    도서대출/반납

    +
      +
    • 대출권수 : 1인 1회 10권
    • +
    • 대출기간 : 14일(7일 연장 가능-전화)
    • +
    • 책이음 가입 도서관 전체 최대 20권, 스마트도서관 3권
    • +
    • 도서연장 : 홈페이지 로그인 후 신청하거나 모바일 도서관인 리브로피아에서 1회(7일) 연장 가능
    • +
    • 책이음 서비스운영 : 1개의 회원증으로 8개 도서관 (OO시립, 꿈나무정보, 어수정 작은도서관, 종합운동장 지혜의 등대, 소요초등학교 지혜의 등대, 사동초등학교 지혜의 집, 남산모루 작은도서관, 스마트도서관) 대출 가능
    • +
    • 대출정지 : 대출도서의 반납기한이 초과되었을 경우 연체된 일수 만큼 대출이 정지
      + ※ 연체될 경우 5개 도서관(시립,정보,어수정 작은도서관,종합운동장 지혜의 등대,남산모루 작은도서관) 모두 동일하게 연체일수 적용됨
    • +
    • 도서변상 : 대출도서의 분실 또는 훼손시에는 동일도서로 변상
    • +
    • OO시 도서관 이용시 반드시 본인 명의의 카드를 지참하셔야 대출이 가능합니다.
      (가족카드이용시에도 지참해야 함)
    • +
    + ]]> +
    +
    + diff --git a/data/dataxml/uac.service.inform.privacy_GET.xml b/data/dataxml/uac.service.inform.privacy_GET.xml index c4030bf6..ba2a7f64 100644 --- a/data/dataxml/uac.service.inform.privacy_GET.xml +++ b/data/dataxml/uac.service.inform.privacy_GET.xml @@ -1,133 +1,133 @@ - - - - - - OO시 도서관 홈페이지에서는 기본적인 회원 서비스 제공을 위한 필수정보와 정보주체 각각의 기호와 필요에 맞는 서비스를 제공하기 위한 선택정보로 구분하여 다음의 정보를 수집하고 있습니다. - 선택정보를 입력하지 않은 경우에도 서비스 이용에는 제한이 없습니다.

    - -

    1. 개인정보의 수집항목 및 수집방법

    -
    가. 수집하는 개인정보의 항목
    -
    컴퓨터에 의해 자동으로 수집되는 정보
    -

    홈페이지를 이용할 경우 다음의 정보는 로그인 기록을 통하여 자동적으로 수집ㆍ저장됩니다.

    -
      -
    • 필수항목 : 사용자ID, 비밀번호, 이름
    • -
    • 선택항목 : 이메일, 주소, 전화번호, 휴대폰
    • -
    - - - - - - - - - - - - - - - - - - -
    개인정보의 수집ㆍ이용목적 및 보유ㆍ이용기간
    필수항목선택항목
    이름, 아이디, 비밀번호이메일, 주소, 전화번호, 휴대폰
    - -
    나. 개인정보 수집방법
    - -
    홈페이지 회원가입을 통한 수집
    -

    2. 개인정보의 수집ㆍ이용목적 및 보유ㆍ이용기간

    - - -

    OO시 도서관 홈페이지에서는 정보주체의 회원 가입일로부터 서비스를 제공하는 기간 동안에 한하여 OO시 도서관 홈페이지 서비스를 이용하기 위한 최소한의 개인정보를 보유 및 이용 하게 됩니다. 회원가입 등을 통해 개인정보의 수집ㆍ이용, 제공 등에 대해 동의하신 내용은 언제든지 철회하실 수 있습니다. 회원 탈퇴를 요청하거나 수집/이용목적을 달성하거나 보유/ 이용기간이 종료한 경우, 사업 폐지 등의 사유발생시 당해 개인정보를 지체없이 파기합니다.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    수집하는 개인정보의 항목
    수집하는 개인정보의 항목개인정보의 수집ㆍ이용 목적개인정보의 보유 및 이용기간
    이름홈페이지 이용에 따른 본인 식별회원 탈퇴시까지
    아이디, 비밀번호, 가입인증정보 이름(가입자명), 생년월일, 연락처, 이메일주소홈페이지 서비스 이용 및 회원관리, 불량회원의 부정 이용 방지, 비인가 사용방지, 민원 신청 및 처리, 고지사항 전달, 게시물 등록, 자료 다운로드, 시설물 예약 및 문화강좌 신청결과의 안내, 전자민원, 본인 의사 확인, 원활한 의사소통 경로의 확보, 정기간행물 발송, 도서대출, 공공행사 및 공공서비스 이용 안내, 설문 등의 목적으로 OO시 도서관 패밀리 사이트에서 공동 이용
    -

    정보주체는 개인정보의 수집ㆍ이용목적에 대한 동의를 거부할 수 있으며, 동의 거부시 OO시 도서관 홈페이지에 회원가입이 되지 않으며, OO시 도서관 홈페이지 홈페이지에서 제공하는 서비스를 이용할 수 없습니다.

    - -
    -

    OO시 도서관 홈페이지에서는 아래의 경우 제3자 제공을 하고 있으며, 개인정보의 취급 위탁은 하지 않습니다. 실명확인 및 공공 I-PIN 인증시에 제공하는 개인정보는 개인정보보호법 제22조 제2항에 따라 정보주체와의 계약체결 등을 위하여 정보주체의 동의 없이 처리할 수 있는 개인정보로 지정 합니다.

    -

    OO시 도서관 홈페이지 회원 서비스 제공을 위해 개인정보를 제공하는 기관 아래에 해당하는 개인정보는 회원가입시 실명인증 및 공공 I-PIN 인증시에만 제3자 제공을 하고 있으며 정보주체의 동의 없이는 제공되지 않습니다.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    개인정보 제3자 제공
    제공받는 자제공받는 자의 개인정보 이용 목적제공하는 개인정보의 항목제공받는 자의 개인정보 보유 및 이용 기간
    행정안전부공공 I-PIN 인증I-PIN(개인식별번호), 법정대리인(I-PIN(개인식별번호))행정안전부에서는 이미 보유하고 있는 개인정보이기 때문에 별도로 저장하지 않음
    한국모바일인증(주)실명인증성명, 휴대폰번호, 생년월일, 성별신용평가 기관에서 이미 보유하고 있는 개인정보이기 때문에 별도로 저장하지 않음
    LG U+전자결제성명, 이메일전자결제 서비스 계약해지시
    -

    단, 다음에 해당하는 경우에는 예외로 제공 할 수 있습니다. [관련근거: 개인정보보호법 제18조 제2항]

    -
      -
    • 1. 정보주체로부터 별도의 동의를 받은 경우
    • -
    • 2. 다른 법률에 특별한 규정이 있는 경우
    • -
    • 3. 정보주체 또는 그 법정대리인이 의사표시를 할 수 없는 상태에 있거나 주소불명 등으로 사전 동의를 받을 수 없는 경우로서 명백히 정보주체 또는 제3자의 급박한 생명, 신체, 재산의 이익을 위하여 필요하다고 인정되는 경우
    • -
    • 4. 통계작성 및 학술연구 등의 목적을 위하여 필요한 경우로서 특정 개인을 알아볼 수 없는 형태로 개인정보를 제공하는 경우
    • -
    • 5. 개인정보를 목적 외의 용도로 이용하거나 이를 제3자에게 제공하지 아니하면 다른 법률에서 정하는 소관업무를 수행할 수 없는 경우로서 보호위원회의 심의ㆍ의결을 거친 경우
    • -
    • 6. 조약, 그 밖의 국제협정의 이행을 위하여 외국정부 또는 국제기구에 제공하기 위하여 필요한 경우
    • -
    • 7. 범죄의 수사와 공소의 제기 및 유지를 위하여 필요한 경우
    • -
    • 8. 법원의 재판업무 수행을 위하여 필요한 경우
    • -
    • 9. 형(刑) 및 감호, 보호처분의 집행을 위하여 필요한 경우
    • -
    - -

    정보주체는 개인정보의 제3자 제공에 대한 동의를 거부할 수 있으며, 동의 거부시 OO시 도서관 홈페이지에 회원가입이 되지 않으며, OO시 도서관 홈페이지에서 제공하는 서비스를 이용할 수 없습니다.

    - - ]]> -
    -
    - + + + + + + OO시 도서관 홈페이지에서는 기본적인 회원 서비스 제공을 위한 필수정보와 정보주체 각각의 기호와 필요에 맞는 서비스를 제공하기 위한 선택정보로 구분하여 다음의 정보를 수집하고 있습니다. + 선택정보를 입력하지 않은 경우에도 서비스 이용에는 제한이 없습니다.

    + +

    1. 개인정보의 수집항목 및 수집방법

    +
    가. 수집하는 개인정보의 항목
    +
    컴퓨터에 의해 자동으로 수집되는 정보
    +

    홈페이지를 이용할 경우 다음의 정보는 로그인 기록을 통하여 자동적으로 수집ㆍ저장됩니다.

    +
      +
    • 필수항목 : 사용자ID, 비밀번호, 이름
    • +
    • 선택항목 : 이메일, 주소, 전화번호, 휴대폰
    • +
    + + + + + + + + + + + + + + + + + + +
    개인정보의 수집ㆍ이용목적 및 보유ㆍ이용기간
    필수항목선택항목
    이름, 아이디, 비밀번호이메일, 주소, 전화번호, 휴대폰
    + +
    나. 개인정보 수집방법
    + +
    홈페이지 회원가입을 통한 수집
    +

    2. 개인정보의 수집ㆍ이용목적 및 보유ㆍ이용기간

    + + +

    OO시 도서관 홈페이지에서는 정보주체의 회원 가입일로부터 서비스를 제공하는 기간 동안에 한하여 OO시 도서관 홈페이지 서비스를 이용하기 위한 최소한의 개인정보를 보유 및 이용 하게 됩니다. 회원가입 등을 통해 개인정보의 수집ㆍ이용, 제공 등에 대해 동의하신 내용은 언제든지 철회하실 수 있습니다. 회원 탈퇴를 요청하거나 수집/이용목적을 달성하거나 보유/ 이용기간이 종료한 경우, 사업 폐지 등의 사유발생시 당해 개인정보를 지체없이 파기합니다.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    수집하는 개인정보의 항목
    수집하는 개인정보의 항목개인정보의 수집ㆍ이용 목적개인정보의 보유 및 이용기간
    이름홈페이지 이용에 따른 본인 식별회원 탈퇴시까지
    아이디, 비밀번호, 가입인증정보 이름(가입자명), 생년월일, 연락처, 이메일주소홈페이지 서비스 이용 및 회원관리, 불량회원의 부정 이용 방지, 비인가 사용방지, 민원 신청 및 처리, 고지사항 전달, 게시물 등록, 자료 다운로드, 시설물 예약 및 문화강좌 신청결과의 안내, 전자민원, 본인 의사 확인, 원활한 의사소통 경로의 확보, 정기간행물 발송, 도서대출, 공공행사 및 공공서비스 이용 안내, 설문 등의 목적으로 OO시 도서관 패밀리 사이트에서 공동 이용
    +

    정보주체는 개인정보의 수집ㆍ이용목적에 대한 동의를 거부할 수 있으며, 동의 거부시 OO시 도서관 홈페이지에 회원가입이 되지 않으며, OO시 도서관 홈페이지 홈페이지에서 제공하는 서비스를 이용할 수 없습니다.

    + +
    +

    OO시 도서관 홈페이지에서는 아래의 경우 제3자 제공을 하고 있으며, 개인정보의 취급 위탁은 하지 않습니다. 실명확인 및 공공 I-PIN 인증시에 제공하는 개인정보는 개인정보보호법 제22조 제2항에 따라 정보주체와의 계약체결 등을 위하여 정보주체의 동의 없이 처리할 수 있는 개인정보로 지정 합니다.

    +

    OO시 도서관 홈페이지 회원 서비스 제공을 위해 개인정보를 제공하는 기관 아래에 해당하는 개인정보는 회원가입시 실명인증 및 공공 I-PIN 인증시에만 제3자 제공을 하고 있으며 정보주체의 동의 없이는 제공되지 않습니다.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    개인정보 제3자 제공
    제공받는 자제공받는 자의 개인정보 이용 목적제공하는 개인정보의 항목제공받는 자의 개인정보 보유 및 이용 기간
    행정안전부공공 I-PIN 인증I-PIN(개인식별번호), 법정대리인(I-PIN(개인식별번호))행정안전부에서는 이미 보유하고 있는 개인정보이기 때문에 별도로 저장하지 않음
    한국모바일인증(주)실명인증성명, 휴대폰번호, 생년월일, 성별신용평가 기관에서 이미 보유하고 있는 개인정보이기 때문에 별도로 저장하지 않음
    LG U+전자결제성명, 이메일전자결제 서비스 계약해지시
    +

    단, 다음에 해당하는 경우에는 예외로 제공 할 수 있습니다. [관련근거: 개인정보보호법 제18조 제2항]

    +
      +
    • 1. 정보주체로부터 별도의 동의를 받은 경우
    • +
    • 2. 다른 법률에 특별한 규정이 있는 경우
    • +
    • 3. 정보주체 또는 그 법정대리인이 의사표시를 할 수 없는 상태에 있거나 주소불명 등으로 사전 동의를 받을 수 없는 경우로서 명백히 정보주체 또는 제3자의 급박한 생명, 신체, 재산의 이익을 위하여 필요하다고 인정되는 경우
    • +
    • 4. 통계작성 및 학술연구 등의 목적을 위하여 필요한 경우로서 특정 개인을 알아볼 수 없는 형태로 개인정보를 제공하는 경우
    • +
    • 5. 개인정보를 목적 외의 용도로 이용하거나 이를 제3자에게 제공하지 아니하면 다른 법률에서 정하는 소관업무를 수행할 수 없는 경우로서 보호위원회의 심의ㆍ의결을 거친 경우
    • +
    • 6. 조약, 그 밖의 국제협정의 이행을 위하여 외국정부 또는 국제기구에 제공하기 위하여 필요한 경우
    • +
    • 7. 범죄의 수사와 공소의 제기 및 유지를 위하여 필요한 경우
    • +
    • 8. 법원의 재판업무 수행을 위하여 필요한 경우
    • +
    • 9. 형(刑) 및 감호, 보호처분의 집행을 위하여 필요한 경우
    • +
    + +

    정보주체는 개인정보의 제3자 제공에 대한 동의를 거부할 수 있으며, 동의 거부시 OO시 도서관 홈페이지에 회원가입이 되지 않으며, OO시 도서관 홈페이지에서 제공하는 서비스를 이용할 수 없습니다.

    + + ]]> +
    +
    + diff --git a/data/dataxml/uac.service.inform.terms_GET.xml b/data/dataxml/uac.service.inform.terms_GET.xml index c928e133..ad559374 100644 --- a/data/dataxml/uac.service.inform.terms_GET.xml +++ b/data/dataxml/uac.service.inform.terms_GET.xml @@ -1,114 +1,114 @@ - - - - - - 제 1 장 총칙 -
    제 1 조 (목적)
    -

    본 약관은 OO시 도서관 홈페이지가 제공하는 모든 서비스(이하 "서비스")의 이용조건 및 절차, 이용자와 OO시 도서관 홈페이지의 권리, 의무, 책임사항과 기타 필요한 사항을 규정함을 목적으로 합니다.

    - - - -
    제 2 조 (약관의 효력과 변경)
    -
      -
    • 1. OO시 도서관 홈페이지는 귀하가 본 약관 내용에 동의하는 경우, OO시 도서관 홈페이지의 서비스 제공 행위 및 귀하의 서비스 사용 행위에 본 약관이 우선적으로 적용됩니다.
    • -
    • 2. OO시 도서관 홈페이지는 본 약관을 사전 고지 없이 변경할 수 있고, 변경된 약관은 OO시 도서관 홈페이지 내에 공지하거나 e-mail을 통해 회원에게 공지하며, 공지와 동시에 그 효력이 발생됩니다. 이용자가 변경된 약관에 동의하지 않는 경우, 이용자는 본인의 회원등록을 취소(회원탈퇴)할 수 있으며 계속 사용의 경우는 약관 변경에 대한 동의로 간주됩니다.
    • -
    -
    제 3 조 (약관 외 준칙)
    -
      -
    • 1. 본 약관에 명시되지 않은 사항은 전기통신기본법, 전기통신사업법, 정보통신윤리위원회 심의규정, 정보통신 윤리강령, 프로그램보호법 및 기타 관련 법령의 규정에 의합니다.
    • -
    -
    제 4 조 (용어의 정의)
    -

    본 약관에서 사용하는 용어의 정의는 다음과 같습니다.

    -
      -
    • 1. 이용자 : 본 약관에 따라 OO시 도서관 홈페이지가 제공하는 서비스를 받는 자.
    • -
    • 2. 가입 : OO시 도서관 홈페이지가 제공하는 신청서 양식에 해당 정보를 기입하고, 본 약관에 동의하여 서비스 이용계약을 완료시키는 행위.
    • -
    • 3. 회원 : OO시 도서관 홈페이지에 개인 정보를 제공하여 회원 등록을 한 자로서 OO시 도서관 홈페이지가 제공하는 서비스를 이용할 수 있는 자.
    • -
    • 4. 비밀번호 : 이용자와 회원ID가 일치하는지를 확인하고 통신상의 자신의 비밀보호를 위하여 이용자 자신이 선정한 문자와 숫자의 조합.
    • -
    • 5. 탈퇴 : 회원이 이용계약을 종료시키는 행위.
    • -
    -

    제 2 장 서비스 제공 및 이용

    -
    제 5 조 (이용계약의 성립)
    -
      -
    • 1. 이용계약은 신청자가 온라인으로 OO시 도서관 홈페이지에서 제공하는 소정의 가입신청 양식에서 요구하는 사항을 기록하여 가입을 완료하는 것으로 성립됩니다.
    • -
    • 2. OO시 도서관 홈페이지는 다음 각 호에 해당하는 이용계약에 대하여는 가입을 취소할 수 있습니다. -
        -
      • 1) 다른 사람의 명의를 사용하여 신청하였을 때
      • -
      • 2) 이용계약 신청서의 내용을 허위로 기재하였거나 신청하였을 때
      • -
      • 3) 다른 사람의 OO시 도서관 홈페이지 서비스 이용을 방해하거나 그 정보를 도용하는 등의 행위를 하였을 때
      • -
      • 4) OO시 도서관 홈페이지를 이용하여 법령과 본 약관이 금지하는 행위를 하는 경우
      • -
      • 5) 기타 OO시 도서관 홈페이지가 정한 이용신청요건이 미비 되었을 때
      • -
      -
    • -
    -
    제 6 조 (회원정보 사용에 대한 동의)
    -
      -
    • 1. 회원의 개인정보는 개인정보보호법에 의해 보호됩니다.
    • -
    • 2. OO시 도서관 홈페이지의 회원 정보는 다음과 같이 사용, 관리, 보호됩니다. -
        -
      • 1) 개인정보의 사용 : OO시 도서관 홈페이지는 서비스 제공과 관련해서 수집된 회원의 신상 정보를 본인의 승낙 없이 제3자에게 누설, 배포하지 않습니다.
        - 단, 개인정보보호법 등 법률의 규정에 의해 국가기관의 요구가 있는 경우, 범죄에 대한 수사 상의 목적이 있거나 정보통신윤리 위원회의 요청이 있는 경우 또는 기타 관계법령에서 정한 절차에 따른 요청이 있는 경우, 귀하가 OO시 도서관 홈페이지에 제공한 개인정보를 스스로 공개한 경우에는 그러하지 않습니다.
      • -
      • 2) 개인정보의 관리 : 귀하는 개인정보의 보호 및 관리를 위하여 서비스의 개인정보관리에서 수시로 귀하의 개인정보를 수정/삭제할 수 있습니다.
        - 단, 자료대출회원가입과 홈페이지 회원가입 조건을 동시에 충족한 정회원인 경우, 홈페이지 관리자에게 수정 및 탈퇴를 요청하시면 처리해드립니다.
      • -
      • 3) 개인정보의 보호 : 귀하의 개인정보는 오직 귀하만이 열람/수정/삭제 할 수 있으며, 이는 전적으로 귀하의 ID와 비밀번호에 의해 관리되고 있습니다. 따라서 타인에게 본인의 ID와 비밀번호를 알려주어서는 안되며, 작업 종료시에는 반드시 로그아웃 해주시기 바랍니다.
      • -
      -
    • -
    • 3. 회원이 본 약관에 따라 이용신청을 하는 것은, OO시 도서관 사이트가 신청서에 기재된 회원 정보를 수집, 이용하는 것에 동의하는 것으로 간주됩니다.
    • -
    -
    제 7 조 (사용자의 정보 보안)
    -
      -
    • 1. 가입 신청자가 OO시 도서관 홈페이지 서비스 가입 절차를 완료하는 순간부터 귀하는 입력한 정보의 비밀을 유지할 책임이 있으며, 회원의 ID와 비밀번호를 사용하여 발생하는 모든 결과에 대한 책임은 회원 본인에게 있습니다.
    • -
    • 2. ID와 비밀번호에 관한 모든 관리의 책임은 회원에게 있으며, 회원의 ID나 비밀번호가 부정하게 사용되었다는 사실을 발견한 경우에는 즉시 OO시 도서관 홈페이지에 신고하여야 합니다. 신고를 하지 않음으로 인한 모든 책임은 회원 본인에게 있습니다.
    • -
    • 3. 이용자는 OO시 도서관 홈페이지 서비스의 사용 종료시 마다 정확히 접속을 종료해야 하며, 정확히 종료하지 아니함으로써 제3자가 귀하에 관한 정보를 이용하게 되는 등의 결과로 인해 발생하는 손해 및 손실에 대하여 OO시 도서관 홈페이지는 책임을 부담하지 아니합니다.
    • -
    -
    제 8 조 (서비스의 중지)
    -
      -
    • 1. OO시 도서관 홈페이지는 이용자가 본 약관의 내용에 위배되는 행동을 한 경우, 임의로 서비스 사용을 제한 및 중지할 수 있습니다.
    • -
    -
    제 9 조 (서비스의 변경 및 해지)
    -
      -
    • 1. OO시 도서관 홈페이지는 귀하가 서비스를 이용하여 기대하는 손익이나 서비스를 통하여 얻은 자료로 인한 손해에 관하여 책임을 지지 않으며, 회원이 본 서비스에 게재한 정보, 자료, 사실의 신뢰도, 정확성 등 내용에 관하여는 책임을 지지 않습니다.
    • -
    • 2. OO시 도서관 홈페이지는 서비스 이용과 관련하여 가입자에게 발생한 손해 중 가입자의 고의, 과실에 의한 손해에 대하여 책임을 부담하지 아니합니다.
    • -
    -
    제 10 조 (게시물의 저작권)
    -
      -
    • 1. 귀하가 게시한 게시물의 내용에 대한 권리는 귀하에게 있습니다.
    • -
    • 2. OO시 도서관 홈페이지는 게시된 내용을 사전 통지 없이 편집, 이동할 수 있는 권리를 보유하며, 게시판운영원칙에 따라 사전 통지 없이 삭제할 수 있습니다.
    • -
    • 3. 귀하의 게시물이 타인의 저작권을 침해함으로써 발생하는 민, 형사상의 책임은 전적으로 귀하가 부담하여야 합니다.
    • -
    -

    제 3 장 의무 및 책임

    -
    제 11 조 (OO시 도서관 홈페이지의 의무)
    -
      -
    • 1. OO시 도서관 홈페이지는 회원의 개인 신상 정보를 본인의 승낙없이 타인에게 누설, 배포하지 않습니다. 다만, 전기통신관련법령 등 관계법령에 의하여 관계 국가기관 등의 요구가 있는 경우에는 그러하지 아니합니다.
    • -
    -
    제 12 조 (회원의 의무)
    -
      -
    • 1. 회원 가입시에 요구되는 정보는 정확하게 기입하여야 합니다. 또한 이미 제공된 귀하에 대한 정보가 정확한 정보가 되도록 유지, 갱신하여야 하며, 회원은 자신의 ID 및 비밀번호를 제3자에게 이용하게 해서는 안됩니다.
    • -
    • 2. 회원은 OO시 도서관 홈페이지의 사전 승낙 없이 서비스를 이용하여 어떠한 영리행위도 할 수 없습니다.
    • -
    -

    제 4 장 기타

    -
    제 13 조 (양도금지)
    -
      -
    • 1. 회원이 서비스의 이용권한, 기타 이용계약 상 지위를 타인에게 양도, 증여할 수 없습니다.
    • -
    - -
    제 14 조 (손해배상)
    -
      -
    • 1. OO시 도서관 홈페이지는 무료로 제공되는 서비스와 관련하여 회원에게 어떠한 손해가 발생하더라도 OO시 도서관 홈페이지가 고의로 행한 범죄행위를 제외하고 이에 대하여 책임을 부담하지 아니합니다.
    • -
    - -
    제 15 조 (면책조항)
    -
      -
    • 1. OO시 도서관 홈페이지는 회원이나 제3자에 의해 표출된 의견을 승인하거나 반대하거나 수정하지 않습니다. OO시 도서관 홈페이지는 어떠한 경우라도 회원이 서비스에 담긴 정보에 의존해 얻은 이득이나 입은 손해에 대해 책임이 없습니다.
    • -
    • 2. OO시 도서관 홈페이지는 회원간 또는 회원과 제3자간에 서비스를 매개로 하여 물품거래 혹은 금전적 거래 등과 관련하여 어떠한 책임도 부담하지 아니하고, 회원이 서비스의 이용과 관련하여 기대하는 이익에 관하여 책임을 부담하지 않습니다.
    • -
    - -
    제 16 조 (재판관할)
    -
      -
    • 1. OO시 도서관 홈페이지와 이용자간에 발생한 서비스 이용에 관한 분쟁에 대하여는 대한민국 법을 적용하며, 본 분쟁으로 인한 소는 대한민국의 법원에 제기합니다.
    • -
    - ]]> -
    -
    - + + + + + + 제 1 장 총칙 +
    제 1 조 (목적)
    +

    본 약관은 OO시 도서관 홈페이지가 제공하는 모든 서비스(이하 "서비스")의 이용조건 및 절차, 이용자와 OO시 도서관 홈페이지의 권리, 의무, 책임사항과 기타 필요한 사항을 규정함을 목적으로 합니다.

    + + + +
    제 2 조 (약관의 효력과 변경)
    +
      +
    • 1. OO시 도서관 홈페이지는 귀하가 본 약관 내용에 동의하는 경우, OO시 도서관 홈페이지의 서비스 제공 행위 및 귀하의 서비스 사용 행위에 본 약관이 우선적으로 적용됩니다.
    • +
    • 2. OO시 도서관 홈페이지는 본 약관을 사전 고지 없이 변경할 수 있고, 변경된 약관은 OO시 도서관 홈페이지 내에 공지하거나 e-mail을 통해 회원에게 공지하며, 공지와 동시에 그 효력이 발생됩니다. 이용자가 변경된 약관에 동의하지 않는 경우, 이용자는 본인의 회원등록을 취소(회원탈퇴)할 수 있으며 계속 사용의 경우는 약관 변경에 대한 동의로 간주됩니다.
    • +
    +
    제 3 조 (약관 외 준칙)
    +
      +
    • 1. 본 약관에 명시되지 않은 사항은 전기통신기본법, 전기통신사업법, 정보통신윤리위원회 심의규정, 정보통신 윤리강령, 프로그램보호법 및 기타 관련 법령의 규정에 의합니다.
    • +
    +
    제 4 조 (용어의 정의)
    +

    본 약관에서 사용하는 용어의 정의는 다음과 같습니다.

    +
      +
    • 1. 이용자 : 본 약관에 따라 OO시 도서관 홈페이지가 제공하는 서비스를 받는 자.
    • +
    • 2. 가입 : OO시 도서관 홈페이지가 제공하는 신청서 양식에 해당 정보를 기입하고, 본 약관에 동의하여 서비스 이용계약을 완료시키는 행위.
    • +
    • 3. 회원 : OO시 도서관 홈페이지에 개인 정보를 제공하여 회원 등록을 한 자로서 OO시 도서관 홈페이지가 제공하는 서비스를 이용할 수 있는 자.
    • +
    • 4. 비밀번호 : 이용자와 회원ID가 일치하는지를 확인하고 통신상의 자신의 비밀보호를 위하여 이용자 자신이 선정한 문자와 숫자의 조합.
    • +
    • 5. 탈퇴 : 회원이 이용계약을 종료시키는 행위.
    • +
    +

    제 2 장 서비스 제공 및 이용

    +
    제 5 조 (이용계약의 성립)
    +
      +
    • 1. 이용계약은 신청자가 온라인으로 OO시 도서관 홈페이지에서 제공하는 소정의 가입신청 양식에서 요구하는 사항을 기록하여 가입을 완료하는 것으로 성립됩니다.
    • +
    • 2. OO시 도서관 홈페이지는 다음 각 호에 해당하는 이용계약에 대하여는 가입을 취소할 수 있습니다. +
        +
      • 1) 다른 사람의 명의를 사용하여 신청하였을 때
      • +
      • 2) 이용계약 신청서의 내용을 허위로 기재하였거나 신청하였을 때
      • +
      • 3) 다른 사람의 OO시 도서관 홈페이지 서비스 이용을 방해하거나 그 정보를 도용하는 등의 행위를 하였을 때
      • +
      • 4) OO시 도서관 홈페이지를 이용하여 법령과 본 약관이 금지하는 행위를 하는 경우
      • +
      • 5) 기타 OO시 도서관 홈페이지가 정한 이용신청요건이 미비 되었을 때
      • +
      +
    • +
    +
    제 6 조 (회원정보 사용에 대한 동의)
    +
      +
    • 1. 회원의 개인정보는 개인정보보호법에 의해 보호됩니다.
    • +
    • 2. OO시 도서관 홈페이지의 회원 정보는 다음과 같이 사용, 관리, 보호됩니다. +
        +
      • 1) 개인정보의 사용 : OO시 도서관 홈페이지는 서비스 제공과 관련해서 수집된 회원의 신상 정보를 본인의 승낙 없이 제3자에게 누설, 배포하지 않습니다.
        + 단, 개인정보보호법 등 법률의 규정에 의해 국가기관의 요구가 있는 경우, 범죄에 대한 수사 상의 목적이 있거나 정보통신윤리 위원회의 요청이 있는 경우 또는 기타 관계법령에서 정한 절차에 따른 요청이 있는 경우, 귀하가 OO시 도서관 홈페이지에 제공한 개인정보를 스스로 공개한 경우에는 그러하지 않습니다.
      • +
      • 2) 개인정보의 관리 : 귀하는 개인정보의 보호 및 관리를 위하여 서비스의 개인정보관리에서 수시로 귀하의 개인정보를 수정/삭제할 수 있습니다.
        + 단, 자료대출회원가입과 홈페이지 회원가입 조건을 동시에 충족한 정회원인 경우, 홈페이지 관리자에게 수정 및 탈퇴를 요청하시면 처리해드립니다.
      • +
      • 3) 개인정보의 보호 : 귀하의 개인정보는 오직 귀하만이 열람/수정/삭제 할 수 있으며, 이는 전적으로 귀하의 ID와 비밀번호에 의해 관리되고 있습니다. 따라서 타인에게 본인의 ID와 비밀번호를 알려주어서는 안되며, 작업 종료시에는 반드시 로그아웃 해주시기 바랍니다.
      • +
      +
    • +
    • 3. 회원이 본 약관에 따라 이용신청을 하는 것은, OO시 도서관 사이트가 신청서에 기재된 회원 정보를 수집, 이용하는 것에 동의하는 것으로 간주됩니다.
    • +
    +
    제 7 조 (사용자의 정보 보안)
    +
      +
    • 1. 가입 신청자가 OO시 도서관 홈페이지 서비스 가입 절차를 완료하는 순간부터 귀하는 입력한 정보의 비밀을 유지할 책임이 있으며, 회원의 ID와 비밀번호를 사용하여 발생하는 모든 결과에 대한 책임은 회원 본인에게 있습니다.
    • +
    • 2. ID와 비밀번호에 관한 모든 관리의 책임은 회원에게 있으며, 회원의 ID나 비밀번호가 부정하게 사용되었다는 사실을 발견한 경우에는 즉시 OO시 도서관 홈페이지에 신고하여야 합니다. 신고를 하지 않음으로 인한 모든 책임은 회원 본인에게 있습니다.
    • +
    • 3. 이용자는 OO시 도서관 홈페이지 서비스의 사용 종료시 마다 정확히 접속을 종료해야 하며, 정확히 종료하지 아니함으로써 제3자가 귀하에 관한 정보를 이용하게 되는 등의 결과로 인해 발생하는 손해 및 손실에 대하여 OO시 도서관 홈페이지는 책임을 부담하지 아니합니다.
    • +
    +
    제 8 조 (서비스의 중지)
    +
      +
    • 1. OO시 도서관 홈페이지는 이용자가 본 약관의 내용에 위배되는 행동을 한 경우, 임의로 서비스 사용을 제한 및 중지할 수 있습니다.
    • +
    +
    제 9 조 (서비스의 변경 및 해지)
    +
      +
    • 1. OO시 도서관 홈페이지는 귀하가 서비스를 이용하여 기대하는 손익이나 서비스를 통하여 얻은 자료로 인한 손해에 관하여 책임을 지지 않으며, 회원이 본 서비스에 게재한 정보, 자료, 사실의 신뢰도, 정확성 등 내용에 관하여는 책임을 지지 않습니다.
    • +
    • 2. OO시 도서관 홈페이지는 서비스 이용과 관련하여 가입자에게 발생한 손해 중 가입자의 고의, 과실에 의한 손해에 대하여 책임을 부담하지 아니합니다.
    • +
    +
    제 10 조 (게시물의 저작권)
    +
      +
    • 1. 귀하가 게시한 게시물의 내용에 대한 권리는 귀하에게 있습니다.
    • +
    • 2. OO시 도서관 홈페이지는 게시된 내용을 사전 통지 없이 편집, 이동할 수 있는 권리를 보유하며, 게시판운영원칙에 따라 사전 통지 없이 삭제할 수 있습니다.
    • +
    • 3. 귀하의 게시물이 타인의 저작권을 침해함으로써 발생하는 민, 형사상의 책임은 전적으로 귀하가 부담하여야 합니다.
    • +
    +

    제 3 장 의무 및 책임

    +
    제 11 조 (OO시 도서관 홈페이지의 의무)
    +
      +
    • 1. OO시 도서관 홈페이지는 회원의 개인 신상 정보를 본인의 승낙없이 타인에게 누설, 배포하지 않습니다. 다만, 전기통신관련법령 등 관계법령에 의하여 관계 국가기관 등의 요구가 있는 경우에는 그러하지 아니합니다.
    • +
    +
    제 12 조 (회원의 의무)
    +
      +
    • 1. 회원 가입시에 요구되는 정보는 정확하게 기입하여야 합니다. 또한 이미 제공된 귀하에 대한 정보가 정확한 정보가 되도록 유지, 갱신하여야 하며, 회원은 자신의 ID 및 비밀번호를 제3자에게 이용하게 해서는 안됩니다.
    • +
    • 2. 회원은 OO시 도서관 홈페이지의 사전 승낙 없이 서비스를 이용하여 어떠한 영리행위도 할 수 없습니다.
    • +
    +

    제 4 장 기타

    +
    제 13 조 (양도금지)
    +
      +
    • 1. 회원이 서비스의 이용권한, 기타 이용계약 상 지위를 타인에게 양도, 증여할 수 없습니다.
    • +
    + +
    제 14 조 (손해배상)
    +
      +
    • 1. OO시 도서관 홈페이지는 무료로 제공되는 서비스와 관련하여 회원에게 어떠한 손해가 발생하더라도 OO시 도서관 홈페이지가 고의로 행한 범죄행위를 제외하고 이에 대하여 책임을 부담하지 아니합니다.
    • +
    + +
    제 15 조 (면책조항)
    +
      +
    • 1. OO시 도서관 홈페이지는 회원이나 제3자에 의해 표출된 의견을 승인하거나 반대하거나 수정하지 않습니다. OO시 도서관 홈페이지는 어떠한 경우라도 회원이 서비스에 담긴 정보에 의존해 얻은 이득이나 입은 손해에 대해 책임이 없습니다.
    • +
    • 2. OO시 도서관 홈페이지는 회원간 또는 회원과 제3자간에 서비스를 매개로 하여 물품거래 혹은 금전적 거래 등과 관련하여 어떠한 책임도 부담하지 아니하고, 회원이 서비스의 이용과 관련하여 기대하는 이익에 관하여 책임을 부담하지 않습니다.
    • +
    + +
    제 16 조 (재판관할)
    +
      +
    • 1. OO시 도서관 홈페이지와 이용자간에 발생한 서비스 이용에 관한 분쟁에 대하여는 대한민국 법을 적용하며, 본 분쟁으로 인한 소는 대한민국의 법원에 제기합니다.
    • +
    + ]]> +
    +
    + diff --git a/data/dataxml/user.sec.login_GET.xml b/data/dataxml/user.sec.login_GET.xml index f2a97c6b..7b4bdfcf 100644 --- a/data/dataxml/user.sec.login_GET.xml +++ b/data/dataxml/user.sec.login_GET.xml @@ -1,9 +1,9 @@ - - - - admin@digitalship.coom - 홍길동 - XohImNooBHFR0OVvjcYpJ3NgPQ1qq73WKhHvch0VQtg= - 100000001 - ROLE_USER,ROLE_ADMIN - + + + + admin@digitalship.coom + 홍길동 + XohImNooBHFR0OVvjcYpJ3NgPQ1qq73WKhHvch0VQtg= + 100000001 + ROLE_USER,ROLE_ADMIN + diff --git a/doc/CLD/00.Main.cld b/doc/CLD/00.Main.cld index 86cdc0b4..4a17882e 100644 --- a/doc/CLD/00.Main.cld +++ b/doc/CLD/00.Main.cld @@ -1,265 +1,265 @@ - - - - 255 - 255 - 206 - - - 0 - 0 - 0 - - true - - - - - 2 - - - - - - - - - - - true - - - - - - 2 - - - - - - -1 - -1 - 142 - 106 - - - - - true - - - - - 2 - - - - - - - - true - - - - - - 2 - - - - - - -1 - -1 - 144 - 221 - - - - - - - true - - - - - 2 - - - - - - - - true - - - - - - 2 - - - - - - -1 - -1 - 384 - 213 - - - - - - - - - - _stereo_type - Stereo Type - false - - - _simpleEntityName - Simple Name - false - - - _entityName - Name - false - - - _background - Background Color - false - - - _attrs - Attributes... - false - - - _operations - Operations... - false - - - _abstract - abstract - false - - - - Class17 - false - - - - - - - - - - - - - _stereo_type - Stereo Type - false - - - _simpleEntityName - Simple Name - false - - - _entityName - Name - false - - - _background - Background Color - false - - - _attrs - Attributes... - false - - - _operations - Operations... - false - - - _abstract - abstract - false - - - - Class16 - false - - - - - - - - - - - - - _stereo_type - Stereo Type - false - - - _simpleEntityName - Simple Name - false - - - _entityName - Name - false - - - _background - Background Color - false - - - _attrs - Attributes... - false - - - _operations - Operations... - false - - - _abstract - abstract - false - - - - Class15 - false - - - - - + + + + 255 + 255 + 206 + + + 0 + 0 + 0 + + true + + + + + 2 + + + + + + + + + + + true + + + + + + 2 + + + + + + -1 + -1 + 142 + 106 + + + + + true + + + + + 2 + + + + + + + + true + + + + + + 2 + + + + + + -1 + -1 + 144 + 221 + + + + + + + true + + + + + 2 + + + + + + + + true + + + + + + 2 + + + + + + -1 + -1 + 384 + 213 + + + + + + + + + + _stereo_type + Stereo Type + false + + + _simpleEntityName + Simple Name + false + + + _entityName + Name + false + + + _background + Background Color + false + + + _attrs + Attributes... + false + + + _operations + Operations... + false + + + _abstract + abstract + false + + + + Class17 + false + + + + + + + + + + + + + _stereo_type + Stereo Type + false + + + _simpleEntityName + Simple Name + false + + + _entityName + Name + false + + + _background + Background Color + false + + + _attrs + Attributes... + false + + + _operations + Operations... + false + + + _abstract + abstract + false + + + + Class16 + false + + + + + + + + + + + + + _stereo_type + Stereo Type + false + + + _simpleEntityName + Simple Name + false + + + _entityName + Name + false + + + _background + Background Color + false + + + _attrs + Attributes... + false + + + _operations + Operations... + false + + + _abstract + abstract + false + + + + Class15 + false + + + + + \ No newline at end of file diff --git a/doc/CLD/01.User.cld b/doc/CLD/01.User.cld index 86cdc0b4..4a17882e 100644 --- a/doc/CLD/01.User.cld +++ b/doc/CLD/01.User.cld @@ -1,265 +1,265 @@ - - - - 255 - 255 - 206 - - - 0 - 0 - 0 - - true - - - - - 2 - - - - - - - - - - - true - - - - - - 2 - - - - - - -1 - -1 - 142 - 106 - - - - - true - - - - - 2 - - - - - - - - true - - - - - - 2 - - - - - - -1 - -1 - 144 - 221 - - - - - - - true - - - - - 2 - - - - - - - - true - - - - - - 2 - - - - - - -1 - -1 - 384 - 213 - - - - - - - - - - _stereo_type - Stereo Type - false - - - _simpleEntityName - Simple Name - false - - - _entityName - Name - false - - - _background - Background Color - false - - - _attrs - Attributes... - false - - - _operations - Operations... - false - - - _abstract - abstract - false - - - - Class17 - false - - - - - - - - - - - - - _stereo_type - Stereo Type - false - - - _simpleEntityName - Simple Name - false - - - _entityName - Name - false - - - _background - Background Color - false - - - _attrs - Attributes... - false - - - _operations - Operations... - false - - - _abstract - abstract - false - - - - Class16 - false - - - - - - - - - - - - - _stereo_type - Stereo Type - false - - - _simpleEntityName - Simple Name - false - - - _entityName - Name - false - - - _background - Background Color - false - - - _attrs - Attributes... - false - - - _operations - Operations... - false - - - _abstract - abstract - false - - - - Class15 - false - - - - - + + + + 255 + 255 + 206 + + + 0 + 0 + 0 + + true + + + + + 2 + + + + + + + + + + + true + + + + + + 2 + + + + + + -1 + -1 + 142 + 106 + + + + + true + + + + + 2 + + + + + + + + true + + + + + + 2 + + + + + + -1 + -1 + 144 + 221 + + + + + + + true + + + + + 2 + + + + + + + + true + + + + + + 2 + + + + + + -1 + -1 + 384 + 213 + + + + + + + + + + _stereo_type + Stereo Type + false + + + _simpleEntityName + Simple Name + false + + + _entityName + Name + false + + + _background + Background Color + false + + + _attrs + Attributes... + false + + + _operations + Operations... + false + + + _abstract + abstract + false + + + + Class17 + false + + + + + + + + + + + + + _stereo_type + Stereo Type + false + + + _simpleEntityName + Simple Name + false + + + _entityName + Name + false + + + _background + Background Color + false + + + _attrs + Attributes... + false + + + _operations + Operations... + false + + + _abstract + abstract + false + + + + Class16 + false + + + + + + + + + + + + + _stereo_type + Stereo Type + false + + + _simpleEntityName + Simple Name + false + + + _entityName + Name + false + + + _background + Background Color + false + + + _attrs + Attributes... + false + + + _operations + Operations... + false + + + _abstract + abstract + false + + + + Class15 + false + + + + + \ No newline at end of file diff --git a/doc/CLD/02.Login.cld b/doc/CLD/02.Login.cld index 86cdc0b4..4a17882e 100644 --- a/doc/CLD/02.Login.cld +++ b/doc/CLD/02.Login.cld @@ -1,265 +1,265 @@ - - - - 255 - 255 - 206 - - - 0 - 0 - 0 - - true - - - - - 2 - - - - - - - - - - - true - - - - - - 2 - - - - - - -1 - -1 - 142 - 106 - - - - - true - - - - - 2 - - - - - - - - true - - - - - - 2 - - - - - - -1 - -1 - 144 - 221 - - - - - - - true - - - - - 2 - - - - - - - - true - - - - - - 2 - - - - - - -1 - -1 - 384 - 213 - - - - - - - - - - _stereo_type - Stereo Type - false - - - _simpleEntityName - Simple Name - false - - - _entityName - Name - false - - - _background - Background Color - false - - - _attrs - Attributes... - false - - - _operations - Operations... - false - - - _abstract - abstract - false - - - - Class17 - false - - - - - - - - - - - - - _stereo_type - Stereo Type - false - - - _simpleEntityName - Simple Name - false - - - _entityName - Name - false - - - _background - Background Color - false - - - _attrs - Attributes... - false - - - _operations - Operations... - false - - - _abstract - abstract - false - - - - Class16 - false - - - - - - - - - - - - - _stereo_type - Stereo Type - false - - - _simpleEntityName - Simple Name - false - - - _entityName - Name - false - - - _background - Background Color - false - - - _attrs - Attributes... - false - - - _operations - Operations... - false - - - _abstract - abstract - false - - - - Class15 - false - - - - - + + + + 255 + 255 + 206 + + + 0 + 0 + 0 + + true + + + + + 2 + + + + + + + + + + + true + + + + + + 2 + + + + + + -1 + -1 + 142 + 106 + + + + + true + + + + + 2 + + + + + + + + true + + + + + + 2 + + + + + + -1 + -1 + 144 + 221 + + + + + + + true + + + + + 2 + + + + + + + + true + + + + + + 2 + + + + + + -1 + -1 + 384 + 213 + + + + + + + + + + _stereo_type + Stereo Type + false + + + _simpleEntityName + Simple Name + false + + + _entityName + Name + false + + + _background + Background Color + false + + + _attrs + Attributes... + false + + + _operations + Operations... + false + + + _abstract + abstract + false + + + + Class17 + false + + + + + + + + + + + + + _stereo_type + Stereo Type + false + + + _simpleEntityName + Simple Name + false + + + _entityName + Name + false + + + _background + Background Color + false + + + _attrs + Attributes... + false + + + _operations + Operations... + false + + + _abstract + abstract + false + + + + Class16 + false + + + + + + + + + + + + + _stereo_type + Stereo Type + false + + + _simpleEntityName + Simple Name + false + + + _entityName + Name + false + + + _background + Background Color + false + + + _attrs + Attributes... + false + + + _operations + Operations... + false + + + _abstract + abstract + false + + + + Class15 + false + + + + + \ No newline at end of file diff --git a/doc/CLD/03.Board.cld b/doc/CLD/03.Board.cld index 86cdc0b4..4a17882e 100644 --- a/doc/CLD/03.Board.cld +++ b/doc/CLD/03.Board.cld @@ -1,265 +1,265 @@ - - - - 255 - 255 - 206 - - - 0 - 0 - 0 - - true - - - - - 2 - - - - - - - - - - - true - - - - - - 2 - - - - - - -1 - -1 - 142 - 106 - - - - - true - - - - - 2 - - - - - - - - true - - - - - - 2 - - - - - - -1 - -1 - 144 - 221 - - - - - - - true - - - - - 2 - - - - - - - - true - - - - - - 2 - - - - - - -1 - -1 - 384 - 213 - - - - - - - - - - _stereo_type - Stereo Type - false - - - _simpleEntityName - Simple Name - false - - - _entityName - Name - false - - - _background - Background Color - false - - - _attrs - Attributes... - false - - - _operations - Operations... - false - - - _abstract - abstract - false - - - - Class17 - false - - - - - - - - - - - - - _stereo_type - Stereo Type - false - - - _simpleEntityName - Simple Name - false - - - _entityName - Name - false - - - _background - Background Color - false - - - _attrs - Attributes... - false - - - _operations - Operations... - false - - - _abstract - abstract - false - - - - Class16 - false - - - - - - - - - - - - - _stereo_type - Stereo Type - false - - - _simpleEntityName - Simple Name - false - - - _entityName - Name - false - - - _background - Background Color - false - - - _attrs - Attributes... - false - - - _operations - Operations... - false - - - _abstract - abstract - false - - - - Class15 - false - - - - - + + + + 255 + 255 + 206 + + + 0 + 0 + 0 + + true + + + + + 2 + + + + + + + + + + + true + + + + + + 2 + + + + + + -1 + -1 + 142 + 106 + + + + + true + + + + + 2 + + + + + + + + true + + + + + + 2 + + + + + + -1 + -1 + 144 + 221 + + + + + + + true + + + + + 2 + + + + + + + + true + + + + + + 2 + + + + + + -1 + -1 + 384 + 213 + + + + + + + + + + _stereo_type + Stereo Type + false + + + _simpleEntityName + Simple Name + false + + + _entityName + Name + false + + + _background + Background Color + false + + + _attrs + Attributes... + false + + + _operations + Operations... + false + + + _abstract + abstract + false + + + + Class17 + false + + + + + + + + + + + + + _stereo_type + Stereo Type + false + + + _simpleEntityName + Simple Name + false + + + _entityName + Name + false + + + _background + Background Color + false + + + _attrs + Attributes... + false + + + _operations + Operations... + false + + + _abstract + abstract + false + + + + Class16 + false + + + + + + + + + + + + + _stereo_type + Stereo Type + false + + + _simpleEntityName + Simple Name + false + + + _entityName + Name + false + + + _background + Background Color + false + + + _attrs + Attributes... + false + + + _operations + Operations... + false + + + _abstract + abstract + false + + + + Class15 + false + + + + + \ No newline at end of file diff --git a/doc/CLD/04.Collection.cld b/doc/CLD/04.Collection.cld index 86cdc0b4..4a17882e 100644 --- a/doc/CLD/04.Collection.cld +++ b/doc/CLD/04.Collection.cld @@ -1,265 +1,265 @@ - - - - 255 - 255 - 206 - - - 0 - 0 - 0 - - true - - - - - 2 - - - - - - - - - - - true - - - - - - 2 - - - - - - -1 - -1 - 142 - 106 - - - - - true - - - - - 2 - - - - - - - - true - - - - - - 2 - - - - - - -1 - -1 - 144 - 221 - - - - - - - true - - - - - 2 - - - - - - - - true - - - - - - 2 - - - - - - -1 - -1 - 384 - 213 - - - - - - - - - - _stereo_type - Stereo Type - false - - - _simpleEntityName - Simple Name - false - - - _entityName - Name - false - - - _background - Background Color - false - - - _attrs - Attributes... - false - - - _operations - Operations... - false - - - _abstract - abstract - false - - - - Class17 - false - - - - - - - - - - - - - _stereo_type - Stereo Type - false - - - _simpleEntityName - Simple Name - false - - - _entityName - Name - false - - - _background - Background Color - false - - - _attrs - Attributes... - false - - - _operations - Operations... - false - - - _abstract - abstract - false - - - - Class16 - false - - - - - - - - - - - - - _stereo_type - Stereo Type - false - - - _simpleEntityName - Simple Name - false - - - _entityName - Name - false - - - _background - Background Color - false - - - _attrs - Attributes... - false - - - _operations - Operations... - false - - - _abstract - abstract - false - - - - Class15 - false - - - - - + + + + 255 + 255 + 206 + + + 0 + 0 + 0 + + true + + + + + 2 + + + + + + + + + + + true + + + + + + 2 + + + + + + -1 + -1 + 142 + 106 + + + + + true + + + + + 2 + + + + + + + + true + + + + + + 2 + + + + + + -1 + -1 + 144 + 221 + + + + + + + true + + + + + 2 + + + + + + + + true + + + + + + 2 + + + + + + -1 + -1 + 384 + 213 + + + + + + + + + + _stereo_type + Stereo Type + false + + + _simpleEntityName + Simple Name + false + + + _entityName + Name + false + + + _background + Background Color + false + + + _attrs + Attributes... + false + + + _operations + Operations... + false + + + _abstract + abstract + false + + + + Class17 + false + + + + + + + + + + + + + _stereo_type + Stereo Type + false + + + _simpleEntityName + Simple Name + false + + + _entityName + Name + false + + + _background + Background Color + false + + + _attrs + Attributes... + false + + + _operations + Operations... + false + + + _abstract + abstract + false + + + + Class16 + false + + + + + + + + + + + + + _stereo_type + Stereo Type + false + + + _simpleEntityName + Simple Name + false + + + _entityName + Name + false + + + _background + Background Color + false + + + _attrs + Attributes... + false + + + _operations + Operations... + false + + + _abstract + abstract + false + + + + Class15 + false + + + + + \ No newline at end of file diff --git a/doc/CLD/05.Rent.cld b/doc/CLD/05.Rent.cld index 86cdc0b4..4a17882e 100644 --- a/doc/CLD/05.Rent.cld +++ b/doc/CLD/05.Rent.cld @@ -1,265 +1,265 @@ - - - - 255 - 255 - 206 - - - 0 - 0 - 0 - - true - - - - - 2 - - - - - - - - - - - true - - - - - - 2 - - - - - - -1 - -1 - 142 - 106 - - - - - true - - - - - 2 - - - - - - - - true - - - - - - 2 - - - - - - -1 - -1 - 144 - 221 - - - - - - - true - - - - - 2 - - - - - - - - true - - - - - - 2 - - - - - - -1 - -1 - 384 - 213 - - - - - - - - - - _stereo_type - Stereo Type - false - - - _simpleEntityName - Simple Name - false - - - _entityName - Name - false - - - _background - Background Color - false - - - _attrs - Attributes... - false - - - _operations - Operations... - false - - - _abstract - abstract - false - - - - Class17 - false - - - - - - - - - - - - - _stereo_type - Stereo Type - false - - - _simpleEntityName - Simple Name - false - - - _entityName - Name - false - - - _background - Background Color - false - - - _attrs - Attributes... - false - - - _operations - Operations... - false - - - _abstract - abstract - false - - - - Class16 - false - - - - - - - - - - - - - _stereo_type - Stereo Type - false - - - _simpleEntityName - Simple Name - false - - - _entityName - Name - false - - - _background - Background Color - false - - - _attrs - Attributes... - false - - - _operations - Operations... - false - - - _abstract - abstract - false - - - - Class15 - false - - - - - + + + + 255 + 255 + 206 + + + 0 + 0 + 0 + + true + + + + + 2 + + + + + + + + + + + true + + + + + + 2 + + + + + + -1 + -1 + 142 + 106 + + + + + true + + + + + 2 + + + + + + + + true + + + + + + 2 + + + + + + -1 + -1 + 144 + 221 + + + + + + + true + + + + + 2 + + + + + + + + true + + + + + + 2 + + + + + + -1 + -1 + 384 + 213 + + + + + + + + + + _stereo_type + Stereo Type + false + + + _simpleEntityName + Simple Name + false + + + _entityName + Name + false + + + _background + Background Color + false + + + _attrs + Attributes... + false + + + _operations + Operations... + false + + + _abstract + abstract + false + + + + Class17 + false + + + + + + + + + + + + + _stereo_type + Stereo Type + false + + + _simpleEntityName + Simple Name + false + + + _entityName + Name + false + + + _background + Background Color + false + + + _attrs + Attributes... + false + + + _operations + Operations... + false + + + _abstract + abstract + false + + + + Class16 + false + + + + + + + + + + + + + _stereo_type + Stereo Type + false + + + _simpleEntityName + Simple Name + false + + + _entityName + Name + false + + + _background + Background Color + false + + + _attrs + Attributes... + false + + + _operations + Operations... + false + + + _abstract + abstract + false + + + + Class15 + false + + + + + \ No newline at end of file diff --git a/doc/CLD/09.Inform.cld b/doc/CLD/09.Inform.cld index 86cdc0b4..4a17882e 100644 --- a/doc/CLD/09.Inform.cld +++ b/doc/CLD/09.Inform.cld @@ -1,265 +1,265 @@ - - - - 255 - 255 - 206 - - - 0 - 0 - 0 - - true - - - - - 2 - - - - - - - - - - - true - - - - - - 2 - - - - - - -1 - -1 - 142 - 106 - - - - - true - - - - - 2 - - - - - - - - true - - - - - - 2 - - - - - - -1 - -1 - 144 - 221 - - - - - - - true - - - - - 2 - - - - - - - - true - - - - - - 2 - - - - - - -1 - -1 - 384 - 213 - - - - - - - - - - _stereo_type - Stereo Type - false - - - _simpleEntityName - Simple Name - false - - - _entityName - Name - false - - - _background - Background Color - false - - - _attrs - Attributes... - false - - - _operations - Operations... - false - - - _abstract - abstract - false - - - - Class17 - false - - - - - - - - - - - - - _stereo_type - Stereo Type - false - - - _simpleEntityName - Simple Name - false - - - _entityName - Name - false - - - _background - Background Color - false - - - _attrs - Attributes... - false - - - _operations - Operations... - false - - - _abstract - abstract - false - - - - Class16 - false - - - - - - - - - - - - - _stereo_type - Stereo Type - false - - - _simpleEntityName - Simple Name - false - - - _entityName - Name - false - - - _background - Background Color - false - - - _attrs - Attributes... - false - - - _operations - Operations... - false - - - _abstract - abstract - false - - - - Class15 - false - - - - - + + + + 255 + 255 + 206 + + + 0 + 0 + 0 + + true + + + + + 2 + + + + + + + + + + + true + + + + + + 2 + + + + + + -1 + -1 + 142 + 106 + + + + + true + + + + + 2 + + + + + + + + true + + + + + + 2 + + + + + + -1 + -1 + 144 + 221 + + + + + + + true + + + + + 2 + + + + + + + + true + + + + + + 2 + + + + + + -1 + -1 + 384 + 213 + + + + + + + + + + _stereo_type + Stereo Type + false + + + _simpleEntityName + Simple Name + false + + + _entityName + Name + false + + + _background + Background Color + false + + + _attrs + Attributes... + false + + + _operations + Operations... + false + + + _abstract + abstract + false + + + + Class17 + false + + + + + + + + + + + + + _stereo_type + Stereo Type + false + + + _simpleEntityName + Simple Name + false + + + _entityName + Name + false + + + _background + Background Color + false + + + _attrs + Attributes... + false + + + _operations + Operations... + false + + + _abstract + abstract + false + + + + Class16 + false + + + + + + + + + + + + + _stereo_type + Stereo Type + false + + + _simpleEntityName + Simple Name + false + + + _entityName + Name + false + + + _background + Background Color + false + + + _attrs + Attributes... + false + + + _operations + Operations... + false + + + _abstract + abstract + false + + + + Class15 + false + + + + + \ No newline at end of file diff --git a/src/main/java/nlib/bbs/service/BoardService.java b/src/main/java/nlib/bbs/service/BoardService.java index 00cd2fbe..1a19b390 100644 --- a/src/main/java/nlib/bbs/service/BoardService.java +++ b/src/main/java/nlib/bbs/service/BoardService.java @@ -1,56 +1,56 @@ - -package nlib.bbs.service; - -import nlib.restful.service.DataApiReqVO; -import nlib.restful.service.DataApiResVO; - -/** - *
    - * @Class Name : BoardService.java
    - * 
    - * @Description : 게시물 관리 클래스
    - * 
    - * 
    - * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    - *
    - * 
    - * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 2021. 7. 19. KNKIM 최초 생성 - * - * - * @author 이씨플라자 * DIGITALSHIP KNKIM - * @since 2021. 7. 19. - * @version 1.0 - * - */ -public interface BoardService -{ - public DataApiResVO listNotices(DataApiReqVO reqVO); - - public DataApiResVO selectNotice(DataApiReqVO reqVO); - - public DataApiResVO listFAQs(DataApiReqVO reqVO); - - /** - * 묻고답하기 목록 조회한다. - * - * @param reqVO - * @return - */ - public DataApiResVO listQnAs(DataApiReqVO reqVO); - - public DataApiResVO selectQnA(DataApiReqVO reqVO); - - public DataApiResVO insertQnA(DataApiReqVO reqVO); - - public DataApiResVO verifyWriter(DataApiReqVO reqVO); - - public DataApiResVO updateQnA(DataApiReqVO reqVO); - - public DataApiResVO deleteQnA(DataApiReqVO reqVO); - - + +package nlib.bbs.service; + +import nlib.restful.service.DataApiReqVO; +import nlib.restful.service.DataApiResVO; + +/** + *
    + * @Class Name : BoardService.java
    + * 
    + * @Description : 게시물 관리 클래스
    + * 
    + * 
    + * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    + *
    + * 
    + * + * @ ------------ -------- --------------------------- + * @ 수정일 수정자 수정내용 + * @ ------------ -------- --------------------------- + * @ 2021. 7. 19. KNKIM 최초 생성 + * + * + * @author 이씨플라자 * DIGITALSHIP KNKIM + * @since 2021. 7. 19. + * @version 1.0 + * + */ +public interface BoardService +{ + public DataApiResVO listNotices(DataApiReqVO reqVO); + + public DataApiResVO selectNotice(DataApiReqVO reqVO); + + public DataApiResVO listFAQs(DataApiReqVO reqVO); + + /** + * 묻고답하기 목록 조회한다. + * + * @param reqVO + * @return + */ + public DataApiResVO listQnAs(DataApiReqVO reqVO); + + public DataApiResVO selectQnA(DataApiReqVO reqVO); + + public DataApiResVO insertQnA(DataApiReqVO reqVO); + + public DataApiResVO verifyWriter(DataApiReqVO reqVO); + + public DataApiResVO updateQnA(DataApiReqVO reqVO); + + public DataApiResVO deleteQnA(DataApiReqVO reqVO); + + } \ No newline at end of file diff --git a/src/main/java/nlib/bbs/service/impl/BoardDAO.java b/src/main/java/nlib/bbs/service/impl/BoardDAO.java index 2664a1f7..31b4aa27 100644 --- a/src/main/java/nlib/bbs/service/impl/BoardDAO.java +++ b/src/main/java/nlib/bbs/service/impl/BoardDAO.java @@ -1,70 +1,70 @@ - -package nlib.bbs.service.impl; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Repository; - -import nlib.cmm.web.MainController; -import nlib.restful.DataApi; -import nlib.restful.service.DataApiReqVO; -import nlib.restful.service.DataApiResVO; - -@Repository("boardDAO") -public class BoardDAO extends DataApi -{ - private static final Logger log = LoggerFactory.getLogger(BoardDAO.class); - - /** - * 주 자원의 URI - */ - public static final String RESOURCE_URI = "/uac/service/board/qna"; - - public DataApiResVO listNotices(DataApiReqVO reqVO) { - return null; - } - - public DataApiResVO selectNotice(DataApiReqVO reqVO) { - return null; - } - - public DataApiResVO listFAQs(DataApiReqVO reqVO) { - return null; - } - - /** - * 묻고답하기 목록 조회한다. - * - * @param reqVO - * @return - */ - public DataApiResVO listQnAs(DataApiReqVO reqVO) { - reqVO.setReqUrl(RESOURCE_URI + "/list"); - return get(reqVO); - } - - public DataApiResVO selectQnA(DataApiReqVO reqVO) { - reqVO.setReqUrl(RESOURCE_URI); - return get(reqVO); - } - - public DataApiResVO verifyWriter(DataApiReqVO reqVO) { - return null; - } - - public DataApiResVO updateQnA(DataApiReqVO reqVO) { - reqVO.setReqUrl(RESOURCE_URI); - return post(reqVO); - } - - public DataApiResVO deleteQnA(DataApiReqVO reqVO) { - return null; - } - - public DataApiResVO insertQnA(DataApiReqVO reqVO) { - reqVO.setReqUrl(RESOURCE_URI); - return put(reqVO); - } - - + +package nlib.bbs.service.impl; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Repository; + +import nlib.cmm.web.MainController; +import nlib.restful.DataApi; +import nlib.restful.service.DataApiReqVO; +import nlib.restful.service.DataApiResVO; + +@Repository("boardDAO") +public class BoardDAO extends DataApi +{ + private static final Logger log = LoggerFactory.getLogger(BoardDAO.class); + + /** + * 주 자원의 URI + */ + public static final String RESOURCE_URI = "/uac/service/board/qna"; + + public DataApiResVO listNotices(DataApiReqVO reqVO) { + return null; + } + + public DataApiResVO selectNotice(DataApiReqVO reqVO) { + return null; + } + + public DataApiResVO listFAQs(DataApiReqVO reqVO) { + return null; + } + + /** + * 묻고답하기 목록 조회한다. + * + * @param reqVO + * @return + */ + public DataApiResVO listQnAs(DataApiReqVO reqVO) { + reqVO.setReqUrl(RESOURCE_URI + "/list"); + return get(reqVO); + } + + public DataApiResVO selectQnA(DataApiReqVO reqVO) { + reqVO.setReqUrl(RESOURCE_URI); + return get(reqVO); + } + + public DataApiResVO verifyWriter(DataApiReqVO reqVO) { + return null; + } + + public DataApiResVO updateQnA(DataApiReqVO reqVO) { + reqVO.setReqUrl(RESOURCE_URI); + return post(reqVO); + } + + public DataApiResVO deleteQnA(DataApiReqVO reqVO) { + return null; + } + + public DataApiResVO insertQnA(DataApiReqVO reqVO) { + reqVO.setReqUrl(RESOURCE_URI); + return put(reqVO); + } + + } \ No newline at end of file diff --git a/src/main/java/nlib/bbs/service/impl/BoardServiceImpl.java b/src/main/java/nlib/bbs/service/impl/BoardServiceImpl.java index ec6286d2..a339bcdf 100644 --- a/src/main/java/nlib/bbs/service/impl/BoardServiceImpl.java +++ b/src/main/java/nlib/bbs/service/impl/BoardServiceImpl.java @@ -1,66 +1,66 @@ - -package nlib.bbs.service.impl; - -import javax.annotation.Resource; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Service; - -import nlib.bbs.service.BoardService; -import nlib.restful.service.DataApiReqVO; -import nlib.restful.service.DataApiResVO; - -@Service("boardService") -public class BoardServiceImpl implements BoardService -{ - private static final Logger log = LoggerFactory.getLogger(BoardServiceImpl.class); - - @Resource(name = "boardDAO") - private BoardDAO boardDAO; - - - public DataApiResVO listNotices(DataApiReqVO reqVO) { - return null; - } - - public DataApiResVO selectNotice(DataApiReqVO reqVO) { - return null; - } - - public DataApiResVO listFAQs(DataApiReqVO reqVO) { - return null; - } - - /* - * 묻고답하기 목록 조회한다. - * - * (non-Javadoc) - * @see nlib.bbs.service.BoardService#listQnAs(nlib.restful.service.DataApiReqVO) - */ - public DataApiResVO listQnAs(DataApiReqVO reqVO) { - return boardDAO.listQnAs(reqVO); - } - - public DataApiResVO selectQnA(DataApiReqVO reqVO) { - return boardDAO.selectQnA(reqVO); - } - - public DataApiResVO insertQnA(DataApiReqVO reqVO) { - return boardDAO.insertQnA(reqVO); - } - - public DataApiResVO verifyWriter(DataApiReqVO reqVO) { - return null; - } - - public DataApiResVO updateQnA(DataApiReqVO reqVO) { - return boardDAO.updateQnA(reqVO); - } - - public DataApiResVO deleteQnA(DataApiReqVO reqVO) { - return null; - } - - + +package nlib.bbs.service.impl; + +import javax.annotation.Resource; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Service; + +import nlib.bbs.service.BoardService; +import nlib.restful.service.DataApiReqVO; +import nlib.restful.service.DataApiResVO; + +@Service("boardService") +public class BoardServiceImpl implements BoardService +{ + private static final Logger log = LoggerFactory.getLogger(BoardServiceImpl.class); + + @Resource(name = "boardDAO") + private BoardDAO boardDAO; + + + public DataApiResVO listNotices(DataApiReqVO reqVO) { + return null; + } + + public DataApiResVO selectNotice(DataApiReqVO reqVO) { + return null; + } + + public DataApiResVO listFAQs(DataApiReqVO reqVO) { + return null; + } + + /* + * 묻고답하기 목록 조회한다. + * + * (non-Javadoc) + * @see nlib.bbs.service.BoardService#listQnAs(nlib.restful.service.DataApiReqVO) + */ + public DataApiResVO listQnAs(DataApiReqVO reqVO) { + return boardDAO.listQnAs(reqVO); + } + + public DataApiResVO selectQnA(DataApiReqVO reqVO) { + return boardDAO.selectQnA(reqVO); + } + + public DataApiResVO insertQnA(DataApiReqVO reqVO) { + return boardDAO.insertQnA(reqVO); + } + + public DataApiResVO verifyWriter(DataApiReqVO reqVO) { + return null; + } + + public DataApiResVO updateQnA(DataApiReqVO reqVO) { + return boardDAO.updateQnA(reqVO); + } + + public DataApiResVO deleteQnA(DataApiReqVO reqVO) { + return null; + } + + } \ No newline at end of file diff --git a/src/main/java/nlib/bbs/web/BoardController.java b/src/main/java/nlib/bbs/web/BoardController.java index 6b45d210..7920cce5 100644 --- a/src/main/java/nlib/bbs/web/BoardController.java +++ b/src/main/java/nlib/bbs/web/BoardController.java @@ -1,411 +1,411 @@ - -package nlib.bbs.web; - -import java.util.HashMap; -import java.util.Map; - -import javax.annotation.Resource; -import javax.servlet.http.HttpServletRequest; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.ResponseEntity; -import org.springframework.security.authentication.AuthenticationManager; -import org.springframework.security.core.Authentication; -import org.springframework.stereotype.Controller; -import org.springframework.ui.ModelMap; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; - -import nlib.bbs.service.BoardService; -import nlib.cmm.NlibCommonController; -import nlib.cmm.crypto.AriaCrypto; -import nlib.cmm.crypto.NlibPasswordEncoder; -import nlib.cmm.service.CodeService; -import nlib.cmm.service.NlibProperty; -import nlib.restful.service.DataApiReqVO; -import nlib.restful.service.DataApiResVO; -import nlib.user.service.NlibLoginVO; -import nlib.util.StringUtil; - -@Controller -public class BoardController extends NlibCommonController -{ - private static final Logger log = LoggerFactory.getLogger(BoardController.class); - - static final String DEFUALT_PAGE_SIZE = NlibProperty.getProperty("list.paging.page.size"); - - @Resource(name = "boardService") - private BoardService boardService; - - @Resource(name = "nlibPasswordEncoder") - private NlibPasswordEncoder nlibPasswordEncoder; - - @Resource(name = "ariaCrypto") - private AriaCrypto ariaCrypto; - - @Resource(name = "codeService") - private CodeService codeService; - - - @Autowired - private AuthenticationManager authenticationManager; - - /** - * 공지사항 목록 조회한다. - * - * @param req - * @return - */ - @SuppressWarnings("deprecation") - @RequestMapping("/board/listNotices.do") - public String listNotices(HttpServletRequest req) { - - return "nlib/board/listNotices"; - } - - /** - * 공지사항 상세 내용 조회한다. - * @param req - * @return - */ - @RequestMapping("/board/selectNotice.do") - public String selectNotice(HttpServletRequest req) { - return "nlib/board/selectNotice"; - } - - /** - * FAQ 목록 조회한다. - * - * @param req - * @return - */ - @RequestMapping("/board/listFAQs.do") - public String listFAQs(HttpServletRequest req) { - return "nlib/board/listFAQs"; - } - - /** - * 묻고답하기 목록 조회 화면을 구성한다. - * - * @param req - * @return - */ - @RequestMapping("/board/listQnAs.do") - public String listQnAs(HttpServletRequest req, Authentication authentication, @RequestParam Map paramMap, ModelMap model) { - - String searchKeyword = paramMap.get("searchKeyword"); - String pageIndex = StringUtil.getString(paramMap.get("pageIndex"), "1"); - String pageSize = StringUtil.getString(paramMap.get("pageSize") , DEFUALT_PAGE_SIZE); - - log.debug("listQnAs > pageIndex = " + pageIndex); - log.debug("listQnAs > pageSize = " + pageSize); - log.debug("listQnAs > searchKeyword = " + searchKeyword); - - // 페이징 사이즈 코드 목록 조회 - DataApiReqVO reqVOforPageSize = new DataApiReqVO(); - reqVOforPageSize.setAuthKey(createAuthKey(req, authentication)); - reqVOforPageSize.setPageSize(0); - reqVOforPageSize.addInfoItem("codeUpperId", "PAGE_SIZE"); - DataApiResVO resVOforPageSize = codeService.listCodes(reqVOforPageSize); - - // 반환 정보 - model.addAttribute("pageIndex" , pageIndex); - model.addAttribute("pageSize" , pageSize); - model.addAttribute("searchKeyword", searchKeyword); - model.addAttribute("pageSizeCodes", resVOforPageSize.getList()); - - return "nlib/board/listQnAs"; - } - - /** - * 묻고답하기 목록 조회한다. - * - * @param req - * @return - */ - @RequestMapping(value="/board/listQnAsAjax.do") - public ResponseEntity listQnAsAjax(HttpServletRequest req, - Authentication authentication, @RequestBody Map paramMap) { - - String searchKeyword = paramMap.get("searchKeyword"); - String pageIndex = StringUtil.getString(paramMap.get("pageIndex"), "1"); - String pageSize = StringUtil.getString(paramMap.get("pageSize") , DEFUALT_PAGE_SIZE); - - log.debug("listQnAsAjax > pageIndex = " + pageIndex); - log.debug("listQnAsAjax > pageSize = " + pageSize); - log.debug("listQnAsAjax > searchKeyword = " + searchKeyword); - - //------------------------------- - // REQ VO 구성 - //------------------------------- - DataApiReqVO reqVO = new DataApiReqVO(); - reqVO.setAuthKey(createAuthKey(req, authentication)); - reqVO.setPageIndex(pageIndex); - reqVO.setPageSize(pageSize); - reqVO.addInfoItem("searchKeyword", searchKeyword); - - // 요청 - DataApiResVO resVO = boardService.listQnAs(reqVO); - - //------------------------------- - // JSON변환 응답 처리 - //------------------------------- - // JS-GRID 페이징 처리를 포함한 응답값 처리 - // {data: [{...}], - // itemsCount: 255 - // } - HashMap retMap = new HashMap(); - retMap.put("data", resVO.getList()); - retMap.put("itemsCount", resVO.getRecordTotCount()); - - return makeResponseEntityJson(retMap); - } - - - /** - * 묻고답하기 상세 내용 조회한다. - * - * @param req - * @return - */ - @RequestMapping("/board/selectQnA.do") - public String selectQnA(HttpServletRequest req, Authentication authentication, @RequestParam Map paramMap, ModelMap model) { - - // 목록 이동시 전달할 매개변수 - String searchKeyword = paramMap.get("searchKeyword"); - String pageIndex = paramMap.get("pageIndex"); - String pageSize = paramMap.get("pageSize"); - - // 게시물 번호 - String articleNo = paramMap.get("articleNo"); - - log.debug("selectQnA > pageIndex = " + pageIndex); - log.debug("selectQnA > pageSize = " + pageSize); - log.debug("selectQnA > searchKeyword = " + searchKeyword); - log.debug("selectQnA > articleNo = " + articleNo); - - //------------------------------- - // REQ VO 구성 - //------------------------------- - DataApiReqVO reqVO = new DataApiReqVO(); - reqVO.setAuthKey(createAuthKey(req, authentication)); - reqVO.setPageIndex(pageIndex); - reqVO.setPageSize(pageSize); - - // 추가 정보 설정 : 게시판ID, 게시물번호 - HashMap info = new HashMap(); - info.put("boardNo", "QNA"); - info.put("articleNo", articleNo); - reqVO.setInfo(info); - - // 요청 - DataApiResVO resVO = boardService.selectQnA(reqVO); - - // 반환 정보 - model.addAttribute("articleNo" , articleNo); - model.addAttribute("article" , resVO.getInfo()); - model.addAttribute("preArticle" , resVO.getList().get(0)); - model.addAttribute("nextArticle" , resVO.getList().get(1)); - - model.addAttribute("pageIndex" , pageIndex); - model.addAttribute("pageSize" , pageSize); - model.addAttribute("searchKeyword", searchKeyword); - - return "nlib/board/selectQnA"; - } - - /** - * 묻고답하기 글작성화면을 표출한다. - * - * @param req - * @return - */ - @RequestMapping("/board/insertQnAForm.do") - public String insertQnAForm(HttpServletRequest req, Authentication authentication, @RequestParam Map paramMap, ModelMap model) { - - NlibLoginVO loginVO = getNlibLoginVO(authentication); - model.addAttribute("regUserName", loginVO.getName()); - model.addAttribute("email", loginVO.getEmail()); - - return "nlib/board/insertQnAForm"; - } - - @RequestMapping("/board/insertQnA.do") - public String insertQnA(HttpServletRequest req, Authentication authentication, @RequestParam Map paramMap, ModelMap model) { - - NlibLoginVO loginVO = getNlibLoginVO(authentication); - - log.debug("paramMap > " + paramMap); - - String message = null; - String authKey = createAuthKey(req, authentication); - - //------------------------------- - // REQ VO 구성 - //------------------------------- - DataApiReqVO reqVO = new DataApiReqVO(); - reqVO.setAuthKey(authKey); - reqVO.addInfoItem("boardNo" , "QNA"); - reqVO.addInfoItem("title" , paramMap.get("title")); - reqVO.addInfoItem("regUserName" , paramMap.get("regUserName")); - reqVO.addInfoItem("email" , paramMap.get("email")); - reqVO.addInfoItem("contentQeust", paramMap.get("contentQeust")); - - // 요청 - DataApiResVO resVO = boardService.insertQnA(reqVO); - - // 처리결과 확인 - if(!resVO.isSuccess()) { - message = resVO.getResultMessage(); - return "redirect:/board/insertQnAForm.do"; - } - - return "redirect:nlib/board/listQnAs"; - } - - @RequestMapping("/board/verifyWriter.do") - public String verifyWriter(HttpServletRequest req) { - return "nlib/board/verifyWriter"; - } - - @RequestMapping("/board/updateQnAForm.do") - public String updateQnAForm(HttpServletRequest req, Authentication authentication, @RequestParam Map paramMap, ModelMap model) { - - // 목록 이동시 전달할 매개변수 - String searchKeyword = paramMap.get("searchKeyword"); - String pageIndex = paramMap.get("pageIndex"); - String pageSize = paramMap.get("pageSize"); - - // 게시물 번호 - String articleNo = paramMap.get("articleNo"); - String articlePassword = paramMap.get("articlePassword"); - - log.debug("updateQnAForm > pageIndex = " + pageIndex); - log.debug("updateQnAForm > pageSize = " + pageSize); - log.debug("updateQnAForm > searchKeyword = " + searchKeyword); - log.debug("updateQnAForm > articleNo = " + articleNo); - log.debug("updateQnAForm > articlePassword = " + articlePassword); - - if(StringUtil.isEmpty(articlePassword)) { - model.addAttribute("message", "비밀빈호가 올바르지 않습니다.(1)"); - return "redirect:/board/selectQnA.do"; - } - - //------------------------------- - // REQ VO 구성 - //------------------------------- - DataApiReqVO reqVO = new DataApiReqVO(); - reqVO.setAuthKey(createAuthKey(req, authentication)); - reqVO.setPageIndex(pageIndex); - reqVO.setPageSize(pageSize); - - // 추가 정보 설정 : 게시판ID, 게시물번호 - HashMap info = new HashMap(); - info.put("boardNo", "QNA"); - info.put("articleNo", articleNo); - reqVO.setInfo(info); - - // 요청 - DataApiResVO resVO = boardService.selectQnA(reqVO); - - // 비밀번호 확인 - HashMap article = resVO.getInfo(); - if(!articlePassword.equals(article.get("articlePassword"))) { - model.addAttribute("message", "비밀빈호가 올바르지 않습니다.(1)"); - return "redirect:/board/selectQnA.do"; - } - - // 반환 정보 - model.addAttribute("articleNo" , articleNo); - model.addAttribute("article" , resVO.getInfo()); - - // 게시글 비밀번호 처리 - String shaArticlePassword = nlibPasswordEncoder.encode(articlePassword); - String encArticlePassword = ariaCrypto.encode(shaArticlePassword, createAuthKey(req, authentication)); - model.addAttribute("encArticlePassword", encArticlePassword); - - // 검색 정보 - model.addAttribute("pageIndex" , pageIndex); - model.addAttribute("pageSize" , pageSize); - model.addAttribute("searchKeyword", searchKeyword); - - return "nlib/board/updateQnAForm"; - } - - @RequestMapping("/board/updateQnA.do") - public String updateQnA(HttpServletRequest req, Authentication authentication, @RequestParam Map paramMap, ModelMap model) { - - log.debug("paramMap > " + paramMap); - - String message = null; - String authKey = createAuthKey(req, authentication); - - // 목록 이동시 전달할 매개변수 - String searchKeyword = paramMap.get("searchKeyword"); - String pageIndex = paramMap.get("pageIndex"); - String pageSize = paramMap.get("pageSize"); - - // 게시물 번호 - String articleNo = paramMap.get("articleNo"); - String encArticlePassword = paramMap.get("encArticlePassword"); - String checkArticlePassword = ariaCrypto.decode(encArticlePassword, authKey); - - //------------------------------- - // 비밀번호 유효 체크 - //------------------------------- - // 기존 정보 조회 - DataApiReqVO reqVO = new DataApiReqVO(); - reqVO.setAuthKey(authKey); - reqVO.addInfoItem("articleNo", articleNo); - - DataApiResVO resVO = boardService.selectQnA(reqVO); - String oldArticlePassword = resVO.getInfoItem("articlePassword"); - if(checkArticlePassword == null || !checkArticlePassword.equals(oldArticlePassword)) { - message = "잘못된 접근입니다."; - // TODO 수정화면으로 다시 redirect 시킬것 - return "redirect:/board/updateQnAForm.do"; - } - - //------------------------------- - // REQ VO 구성 - //------------------------------- - DataApiReqVO updateReqVO = new DataApiReqVO(); - updateReqVO.setAuthKey(authKey); - updateReqVO.addInfoItem("boardNo" , "QNA"); - updateReqVO.addInfoItem("articleNo" , articleNo); - updateReqVO.addInfoItem("title" , paramMap.get("title")); - updateReqVO.addInfoItem("regUserName" , paramMap.get("regUserName")); - updateReqVO.addInfoItem("email" , paramMap.get("email")); - updateReqVO.addInfoItem("contentQeust", paramMap.get("contentQeust")); - - // 요청 - DataApiResVO updateResVO = boardService.updateQnA(updateReqVO); - - // 처리결과 확인 - if(!updateResVO.isSuccess()) { - message = updateResVO.getResultMessage(); - return "redirect:/board/updateQnAForm.do"; - } - - // 반환 정보 - model.addAttribute("articleNo" , updateResVO.getInfoItem("articleNo")); // 신규등록된 게시물 ID - model.addAttribute("article" , resVO.getInfo()); - - // 검색 정보 - model.addAttribute("pageIndex" , pageIndex); - model.addAttribute("pageSize" , pageSize); - model.addAttribute("searchKeyword", searchKeyword); - - return "redirect:nlib/board/selectQnA"; - } - - @RequestMapping("/board/deleteQnA.do") - public String deleteQnA(HttpServletRequest req) { - return "nlib/board/deleteQnA"; - } - - + +package nlib.bbs.web; + +import java.util.HashMap; +import java.util.Map; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.ResponseEntity; +import org.springframework.security.authentication.AuthenticationManager; +import org.springframework.security.core.Authentication; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; + +import nlib.bbs.service.BoardService; +import nlib.cmm.NlibCommonController; +import nlib.cmm.crypto.AriaCrypto; +import nlib.cmm.crypto.NlibPasswordEncoder; +import nlib.cmm.service.CodeService; +import nlib.cmm.service.NlibProperty; +import nlib.restful.service.DataApiReqVO; +import nlib.restful.service.DataApiResVO; +import nlib.user.service.NlibLoginVO; +import nlib.util.StringUtil; + +@Controller +public class BoardController extends NlibCommonController +{ + private static final Logger log = LoggerFactory.getLogger(BoardController.class); + + static final String DEFUALT_PAGE_SIZE = NlibProperty.getProperty("list.paging.page.size"); + + @Resource(name = "boardService") + private BoardService boardService; + + @Resource(name = "nlibPasswordEncoder") + private NlibPasswordEncoder nlibPasswordEncoder; + + @Resource(name = "ariaCrypto") + private AriaCrypto ariaCrypto; + + @Resource(name = "codeService") + private CodeService codeService; + + + @Autowired + private AuthenticationManager authenticationManager; + + /** + * 공지사항 목록 조회한다. + * + * @param req + * @return + */ + @SuppressWarnings("deprecation") + @RequestMapping("/board/listNotices.do") + public String listNotices(HttpServletRequest req) { + + return "nlib/board/listNotices"; + } + + /** + * 공지사항 상세 내용 조회한다. + * @param req + * @return + */ + @RequestMapping("/board/selectNotice.do") + public String selectNotice(HttpServletRequest req) { + return "nlib/board/selectNotice"; + } + + /** + * FAQ 목록 조회한다. + * + * @param req + * @return + */ + @RequestMapping("/board/listFAQs.do") + public String listFAQs(HttpServletRequest req) { + return "nlib/board/listFAQs"; + } + + /** + * 묻고답하기 목록 조회 화면을 구성한다. + * + * @param req + * @return + */ + @RequestMapping("/board/listQnAs.do") + public String listQnAs(HttpServletRequest req, Authentication authentication, @RequestParam Map paramMap, ModelMap model) { + + String searchKeyword = paramMap.get("searchKeyword"); + String pageIndex = StringUtil.getString(paramMap.get("pageIndex"), "1"); + String pageSize = StringUtil.getString(paramMap.get("pageSize") , DEFUALT_PAGE_SIZE); + + log.debug("listQnAs > pageIndex = " + pageIndex); + log.debug("listQnAs > pageSize = " + pageSize); + log.debug("listQnAs > searchKeyword = " + searchKeyword); + + // 페이징 사이즈 코드 목록 조회 + DataApiReqVO reqVOforPageSize = new DataApiReqVO(); + reqVOforPageSize.setAuthKey(createAuthKey(req, authentication)); + reqVOforPageSize.setPageSize(0); + reqVOforPageSize.addInfoItem("codeUpperId", "PAGE_SIZE"); + DataApiResVO resVOforPageSize = codeService.listCodes(reqVOforPageSize); + + // 반환 정보 + model.addAttribute("pageIndex" , pageIndex); + model.addAttribute("pageSize" , pageSize); + model.addAttribute("searchKeyword", searchKeyword); + model.addAttribute("pageSizeCodes", resVOforPageSize.getList()); + + return "nlib/board/listQnAs"; + } + + /** + * 묻고답하기 목록 조회한다. + * + * @param req + * @return + */ + @RequestMapping(value="/board/listQnAsAjax.do") + public ResponseEntity listQnAsAjax(HttpServletRequest req, + Authentication authentication, @RequestBody Map paramMap) { + + String searchKeyword = paramMap.get("searchKeyword"); + String pageIndex = StringUtil.getString(paramMap.get("pageIndex"), "1"); + String pageSize = StringUtil.getString(paramMap.get("pageSize") , DEFUALT_PAGE_SIZE); + + log.debug("listQnAsAjax > pageIndex = " + pageIndex); + log.debug("listQnAsAjax > pageSize = " + pageSize); + log.debug("listQnAsAjax > searchKeyword = " + searchKeyword); + + //------------------------------- + // REQ VO 구성 + //------------------------------- + DataApiReqVO reqVO = new DataApiReqVO(); + reqVO.setAuthKey(createAuthKey(req, authentication)); + reqVO.setPageIndex(pageIndex); + reqVO.setPageSize(pageSize); + reqVO.addInfoItem("searchKeyword", searchKeyword); + + // 요청 + DataApiResVO resVO = boardService.listQnAs(reqVO); + + //------------------------------- + // JSON변환 응답 처리 + //------------------------------- + // JS-GRID 페이징 처리를 포함한 응답값 처리 + // {data: [{...}], + // itemsCount: 255 + // } + HashMap retMap = new HashMap(); + retMap.put("data", resVO.getList()); + retMap.put("itemsCount", resVO.getRecordTotCount()); + + return makeResponseEntityJson(retMap); + } + + + /** + * 묻고답하기 상세 내용 조회한다. + * + * @param req + * @return + */ + @RequestMapping("/board/selectQnA.do") + public String selectQnA(HttpServletRequest req, Authentication authentication, @RequestParam Map paramMap, ModelMap model) { + + // 목록 이동시 전달할 매개변수 + String searchKeyword = paramMap.get("searchKeyword"); + String pageIndex = paramMap.get("pageIndex"); + String pageSize = paramMap.get("pageSize"); + + // 게시물 번호 + String articleNo = paramMap.get("articleNo"); + + log.debug("selectQnA > pageIndex = " + pageIndex); + log.debug("selectQnA > pageSize = " + pageSize); + log.debug("selectQnA > searchKeyword = " + searchKeyword); + log.debug("selectQnA > articleNo = " + articleNo); + + //------------------------------- + // REQ VO 구성 + //------------------------------- + DataApiReqVO reqVO = new DataApiReqVO(); + reqVO.setAuthKey(createAuthKey(req, authentication)); + reqVO.setPageIndex(pageIndex); + reqVO.setPageSize(pageSize); + + // 추가 정보 설정 : 게시판ID, 게시물번호 + HashMap info = new HashMap(); + info.put("boardNo", "QNA"); + info.put("articleNo", articleNo); + reqVO.setInfo(info); + + // 요청 + DataApiResVO resVO = boardService.selectQnA(reqVO); + + // 반환 정보 + model.addAttribute("articleNo" , articleNo); + model.addAttribute("article" , resVO.getInfo()); + model.addAttribute("preArticle" , resVO.getList().get(0)); + model.addAttribute("nextArticle" , resVO.getList().get(1)); + + model.addAttribute("pageIndex" , pageIndex); + model.addAttribute("pageSize" , pageSize); + model.addAttribute("searchKeyword", searchKeyword); + + return "nlib/board/selectQnA"; + } + + /** + * 묻고답하기 글작성화면을 표출한다. + * + * @param req + * @return + */ + @RequestMapping("/board/insertQnAForm.do") + public String insertQnAForm(HttpServletRequest req, Authentication authentication, @RequestParam Map paramMap, ModelMap model) { + + NlibLoginVO loginVO = getNlibLoginVO(authentication); + model.addAttribute("regUserName", loginVO.getName()); + model.addAttribute("email", loginVO.getEmail()); + + return "nlib/board/insertQnAForm"; + } + + @RequestMapping("/board/insertQnA.do") + public String insertQnA(HttpServletRequest req, Authentication authentication, @RequestParam Map paramMap, ModelMap model) { + + NlibLoginVO loginVO = getNlibLoginVO(authentication); + + log.debug("paramMap > " + paramMap); + + String message = null; + String authKey = createAuthKey(req, authentication); + + //------------------------------- + // REQ VO 구성 + //------------------------------- + DataApiReqVO reqVO = new DataApiReqVO(); + reqVO.setAuthKey(authKey); + reqVO.addInfoItem("boardNo" , "QNA"); + reqVO.addInfoItem("title" , paramMap.get("title")); + reqVO.addInfoItem("regUserName" , paramMap.get("regUserName")); + reqVO.addInfoItem("email" , paramMap.get("email")); + reqVO.addInfoItem("contentQeust", paramMap.get("contentQeust")); + + // 요청 + DataApiResVO resVO = boardService.insertQnA(reqVO); + + // 처리결과 확인 + if(!resVO.isSuccess()) { + message = resVO.getResultMessage(); + return "redirect:/board/insertQnAForm.do"; + } + + return "redirect:nlib/board/listQnAs"; + } + + @RequestMapping("/board/verifyWriter.do") + public String verifyWriter(HttpServletRequest req) { + return "nlib/board/verifyWriter"; + } + + @RequestMapping("/board/updateQnAForm.do") + public String updateQnAForm(HttpServletRequest req, Authentication authentication, @RequestParam Map paramMap, ModelMap model) { + + // 목록 이동시 전달할 매개변수 + String searchKeyword = paramMap.get("searchKeyword"); + String pageIndex = paramMap.get("pageIndex"); + String pageSize = paramMap.get("pageSize"); + + // 게시물 번호 + String articleNo = paramMap.get("articleNo"); + String articlePassword = paramMap.get("articlePassword"); + + log.debug("updateQnAForm > pageIndex = " + pageIndex); + log.debug("updateQnAForm > pageSize = " + pageSize); + log.debug("updateQnAForm > searchKeyword = " + searchKeyword); + log.debug("updateQnAForm > articleNo = " + articleNo); + log.debug("updateQnAForm > articlePassword = " + articlePassword); + + if(StringUtil.isEmpty(articlePassword)) { + model.addAttribute("message", "비밀빈호가 올바르지 않습니다.(1)"); + return "redirect:/board/selectQnA.do"; + } + + //------------------------------- + // REQ VO 구성 + //------------------------------- + DataApiReqVO reqVO = new DataApiReqVO(); + reqVO.setAuthKey(createAuthKey(req, authentication)); + reqVO.setPageIndex(pageIndex); + reqVO.setPageSize(pageSize); + + // 추가 정보 설정 : 게시판ID, 게시물번호 + HashMap info = new HashMap(); + info.put("boardNo", "QNA"); + info.put("articleNo", articleNo); + reqVO.setInfo(info); + + // 요청 + DataApiResVO resVO = boardService.selectQnA(reqVO); + + // 비밀번호 확인 + HashMap article = resVO.getInfo(); + if(!articlePassword.equals(article.get("articlePassword"))) { + model.addAttribute("message", "비밀빈호가 올바르지 않습니다.(1)"); + return "redirect:/board/selectQnA.do"; + } + + // 반환 정보 + model.addAttribute("articleNo" , articleNo); + model.addAttribute("article" , resVO.getInfo()); + + // 게시글 비밀번호 처리 + String shaArticlePassword = nlibPasswordEncoder.encode(articlePassword); + String encArticlePassword = ariaCrypto.encode(shaArticlePassword, createAuthKey(req, authentication)); + model.addAttribute("encArticlePassword", encArticlePassword); + + // 검색 정보 + model.addAttribute("pageIndex" , pageIndex); + model.addAttribute("pageSize" , pageSize); + model.addAttribute("searchKeyword", searchKeyword); + + return "nlib/board/updateQnAForm"; + } + + @RequestMapping("/board/updateQnA.do") + public String updateQnA(HttpServletRequest req, Authentication authentication, @RequestParam Map paramMap, ModelMap model) { + + log.debug("paramMap > " + paramMap); + + String message = null; + String authKey = createAuthKey(req, authentication); + + // 목록 이동시 전달할 매개변수 + String searchKeyword = paramMap.get("searchKeyword"); + String pageIndex = paramMap.get("pageIndex"); + String pageSize = paramMap.get("pageSize"); + + // 게시물 번호 + String articleNo = paramMap.get("articleNo"); + String encArticlePassword = paramMap.get("encArticlePassword"); + String checkArticlePassword = ariaCrypto.decode(encArticlePassword, authKey); + + //------------------------------- + // 비밀번호 유효 체크 + //------------------------------- + // 기존 정보 조회 + DataApiReqVO reqVO = new DataApiReqVO(); + reqVO.setAuthKey(authKey); + reqVO.addInfoItem("articleNo", articleNo); + + DataApiResVO resVO = boardService.selectQnA(reqVO); + String oldArticlePassword = resVO.getInfoItem("articlePassword"); + if(checkArticlePassword == null || !checkArticlePassword.equals(oldArticlePassword)) { + message = "잘못된 접근입니다."; + // TODO 수정화면으로 다시 redirect 시킬것 + return "redirect:/board/updateQnAForm.do"; + } + + //------------------------------- + // REQ VO 구성 + //------------------------------- + DataApiReqVO updateReqVO = new DataApiReqVO(); + updateReqVO.setAuthKey(authKey); + updateReqVO.addInfoItem("boardNo" , "QNA"); + updateReqVO.addInfoItem("articleNo" , articleNo); + updateReqVO.addInfoItem("title" , paramMap.get("title")); + updateReqVO.addInfoItem("regUserName" , paramMap.get("regUserName")); + updateReqVO.addInfoItem("email" , paramMap.get("email")); + updateReqVO.addInfoItem("contentQeust", paramMap.get("contentQeust")); + + // 요청 + DataApiResVO updateResVO = boardService.updateQnA(updateReqVO); + + // 처리결과 확인 + if(!updateResVO.isSuccess()) { + message = updateResVO.getResultMessage(); + return "redirect:/board/updateQnAForm.do"; + } + + // 반환 정보 + model.addAttribute("articleNo" , updateResVO.getInfoItem("articleNo")); // 신규등록된 게시물 ID + model.addAttribute("article" , resVO.getInfo()); + + // 검색 정보 + model.addAttribute("pageIndex" , pageIndex); + model.addAttribute("pageSize" , pageSize); + model.addAttribute("searchKeyword", searchKeyword); + + return "redirect:nlib/board/selectQnA"; + } + + @RequestMapping("/board/deleteQnA.do") + public String deleteQnA(HttpServletRequest req) { + return "nlib/board/deleteQnA"; + } + + } \ No newline at end of file diff --git a/src/main/java/nlib/cmm/NlibCommonController.java b/src/main/java/nlib/cmm/NlibCommonController.java index 0cc283d2..ae6b389e 100644 --- a/src/main/java/nlib/cmm/NlibCommonController.java +++ b/src/main/java/nlib/cmm/NlibCommonController.java @@ -1,178 +1,178 @@ -package nlib.cmm; - -import java.util.Base64; -import java.util.HashMap; -import java.util.List; - -import javax.servlet.http.HttpServletRequest; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.http.HttpHeaders; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.security.core.Authentication; - -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; - -import nlib.bbs.web.BoardController; -import nlib.cmm.exception.ErrorMessage; -import nlib.restful.service.DataApiResVO; -import nlib.security.SecUserVO; -import nlib.user.service.NlibLoginVO; - -/** - *
    - * @Class Name : NlibCommonController.java
    - * 
    - * @Description : 컨트롤러의 공통적인 기능을 제공하는 컨트롤러 상위 클래스
    - * 
    - * 
    - * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    - *
    - * 
    - * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 2021. 7. 23. KNKIM 최초 생성 - * - * - * @author 이씨플라자 * DIGITALSHIP KNKIM - * @since 2021. 7. 23. - * @version 1.0 - * - */ -public class NlibCommonController { - - private static final Logger log = LoggerFactory.getLogger(BoardController.class); - - - /** - * AuthKey 생성 시, 로그인하지 않은 사용자의 AuthKey 생성시 사용되는 접두어 - */ - static final String ANONYMOUS_AUTH_KEY_PREFIX = "GST-"; - - /** - * 스프링 시큐리티 Authentication를 통해서 사용자로그인정보 NlibLoginVO를 리턴한다. - * - * @param authentication - * @return - */ - public NlibLoginVO getNlibLoginVO(Authentication authentication) { - if(authentication == null) return null; - - return (NlibLoginVO)authentication.getPrincipal(); - } - - /** - * 스프링 시큐리티 Authentication를 통해서 사용자로그인정보 SecUserVO를 리턴한다. - * - * @param authentication - * @return - */ - public SecUserVO getSecLoginVO(Authentication authentication) { - - if(authentication == null) return null; - - return (SecUserVO)authentication.getPrincipal(); - } - - /** - * 통합자료시스템 요청 시, 제공할 사용자정보 auth key 생성 - * - 로그인 한 경우 : 사용자ID를 BASE64로 인코딩한 값 - * - 로그인하지 않은 경우 : GST-세션ID - * - * @param request - * @param authentication - * @return - */ - public String createAuthKey(HttpServletRequest request, Authentication authentication) { - - String userId = null; - String authKey = null; - - if(authentication != null) { - userId = ((NlibLoginVO)authentication.getPrincipal()).getId(); - } - - if(nlib.util.StringUtil.isEmpty(userId)) { - authKey = ANONYMOUS_AUTH_KEY_PREFIX + request.getSession().getId(); - } else { - authKey = Base64.getEncoder().encodeToString(userId.getBytes()); - } - - log.debug("createAuthKey > " + authKey); - - return authKey; - } - - public ResponseEntity makeResponseEntityJson(DataApiResVO resVO) { - - // Convert Json - ObjectMapper mapper = new ObjectMapper(); - String jsonStr = null; - - HttpHeaders headers = new HttpHeaders(); - headers.add(HttpHeaders.CONTENT_TYPE, "application/json; charset=UTF-8"); - - try { - jsonStr = mapper.writeValueAsString(resVO); - log.debug("RETURN DATA > json:" + jsonStr); - } catch (JsonProcessingException e) { - ErrorMessage eMsg = new ErrorMessage("ERR_JSON_CONVERT", "응답객체를 JSON으로 변환 처리 중 오류가 발생하였습니다. : " + e.toString()); - try { jsonStr = mapper.writeValueAsString(eMsg); } catch (JsonProcessingException ee) {} - e.printStackTrace(); - return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).headers(headers).body(jsonStr); - } - - return ResponseEntity.ok().headers(headers).body(jsonStr); - } - - - public ResponseEntity makeResponseEntityJson(List> list) { - - // Convert Json - ObjectMapper mapper = new ObjectMapper(); - String jsonStr = null; - - HttpHeaders headers = new HttpHeaders(); - headers.add(HttpHeaders.CONTENT_TYPE, "application/json; charset=UTF-8"); - - try { - jsonStr = mapper.writeValueAsString(list); - log.debug("RETURN DATA > json:" + jsonStr); - } catch (JsonProcessingException e) { - ErrorMessage eMsg = new ErrorMessage("ERR_JSON_CONVERT", "응답객체를 JSON으로 변환 처리 중 오류가 발생하였습니다. : " + e.toString()); - try { jsonStr = mapper.writeValueAsString(eMsg); } catch (JsonProcessingException ee) {} - e.printStackTrace(); - return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).headers(headers).body(jsonStr); - } - - return ResponseEntity.ok().headers(headers).body(jsonStr); - } - - public ResponseEntity makeResponseEntityJson(HashMap retMap) { - - // Convert Json - ObjectMapper mapper = new ObjectMapper(); - String jsonStr = null; - - HttpHeaders headers = new HttpHeaders(); - headers.add(HttpHeaders.CONTENT_TYPE, "application/json; charset=UTF-8"); - - try { - jsonStr = mapper.writeValueAsString(retMap); - log.debug("RETURN DATA > json:" + jsonStr); - } catch (JsonProcessingException e) { - ErrorMessage eMsg = new ErrorMessage("ERR_JSON_CONVERT", "응답객체를 JSON으로 변환 처리 중 오류가 발생하였습니다. : " + e.toString()); - try { jsonStr = mapper.writeValueAsString(eMsg); } catch (JsonProcessingException ee) {} - e.printStackTrace(); - return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).headers(headers).body(jsonStr); - } - - return ResponseEntity.ok().headers(headers).body(jsonStr); - } - -} +package nlib.cmm; + +import java.util.Base64; +import java.util.HashMap; +import java.util.List; + +import javax.servlet.http.HttpServletRequest; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.security.core.Authentication; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; + +import nlib.bbs.web.BoardController; +import nlib.cmm.exception.ErrorMessage; +import nlib.restful.service.DataApiResVO; +import nlib.security.SecUserVO; +import nlib.user.service.NlibLoginVO; + +/** + *
    + * @Class Name : NlibCommonController.java
    + * 
    + * @Description : 컨트롤러의 공통적인 기능을 제공하는 컨트롤러 상위 클래스
    + * 
    + * 
    + * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    + *
    + * 
    + * + * @ ------------ -------- --------------------------- + * @ 수정일 수정자 수정내용 + * @ ------------ -------- --------------------------- + * @ 2021. 7. 23. KNKIM 최초 생성 + * + * + * @author 이씨플라자 * DIGITALSHIP KNKIM + * @since 2021. 7. 23. + * @version 1.0 + * + */ +public class NlibCommonController { + + private static final Logger log = LoggerFactory.getLogger(BoardController.class); + + + /** + * AuthKey 생성 시, 로그인하지 않은 사용자의 AuthKey 생성시 사용되는 접두어 + */ + static final String ANONYMOUS_AUTH_KEY_PREFIX = "GST-"; + + /** + * 스프링 시큐리티 Authentication를 통해서 사용자로그인정보 NlibLoginVO를 리턴한다. + * + * @param authentication + * @return + */ + public NlibLoginVO getNlibLoginVO(Authentication authentication) { + if(authentication == null) return null; + + return (NlibLoginVO)authentication.getPrincipal(); + } + + /** + * 스프링 시큐리티 Authentication를 통해서 사용자로그인정보 SecUserVO를 리턴한다. + * + * @param authentication + * @return + */ + public SecUserVO getSecLoginVO(Authentication authentication) { + + if(authentication == null) return null; + + return (SecUserVO)authentication.getPrincipal(); + } + + /** + * 통합자료시스템 요청 시, 제공할 사용자정보 auth key 생성 + * - 로그인 한 경우 : 사용자ID를 BASE64로 인코딩한 값 + * - 로그인하지 않은 경우 : GST-세션ID + * + * @param request + * @param authentication + * @return + */ + public String createAuthKey(HttpServletRequest request, Authentication authentication) { + + String userId = null; + String authKey = null; + + if(authentication != null) { + userId = ((NlibLoginVO)authentication.getPrincipal()).getId(); + } + + if(nlib.util.StringUtil.isEmpty(userId)) { + authKey = ANONYMOUS_AUTH_KEY_PREFIX + request.getSession().getId(); + } else { + authKey = Base64.getEncoder().encodeToString(userId.getBytes()); + } + + log.debug("createAuthKey > " + authKey); + + return authKey; + } + + public ResponseEntity makeResponseEntityJson(DataApiResVO resVO) { + + // Convert Json + ObjectMapper mapper = new ObjectMapper(); + String jsonStr = null; + + HttpHeaders headers = new HttpHeaders(); + headers.add(HttpHeaders.CONTENT_TYPE, "application/json; charset=UTF-8"); + + try { + jsonStr = mapper.writeValueAsString(resVO); + log.debug("RETURN DATA > json:" + jsonStr); + } catch (JsonProcessingException e) { + ErrorMessage eMsg = new ErrorMessage("ERR_JSON_CONVERT", "응답객체를 JSON으로 변환 처리 중 오류가 발생하였습니다. : " + e.toString()); + try { jsonStr = mapper.writeValueAsString(eMsg); } catch (JsonProcessingException ee) {} + e.printStackTrace(); + return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).headers(headers).body(jsonStr); + } + + return ResponseEntity.ok().headers(headers).body(jsonStr); + } + + + public ResponseEntity makeResponseEntityJson(List> list) { + + // Convert Json + ObjectMapper mapper = new ObjectMapper(); + String jsonStr = null; + + HttpHeaders headers = new HttpHeaders(); + headers.add(HttpHeaders.CONTENT_TYPE, "application/json; charset=UTF-8"); + + try { + jsonStr = mapper.writeValueAsString(list); + log.debug("RETURN DATA > json:" + jsonStr); + } catch (JsonProcessingException e) { + ErrorMessage eMsg = new ErrorMessage("ERR_JSON_CONVERT", "응답객체를 JSON으로 변환 처리 중 오류가 발생하였습니다. : " + e.toString()); + try { jsonStr = mapper.writeValueAsString(eMsg); } catch (JsonProcessingException ee) {} + e.printStackTrace(); + return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).headers(headers).body(jsonStr); + } + + return ResponseEntity.ok().headers(headers).body(jsonStr); + } + + public ResponseEntity makeResponseEntityJson(HashMap retMap) { + + // Convert Json + ObjectMapper mapper = new ObjectMapper(); + String jsonStr = null; + + HttpHeaders headers = new HttpHeaders(); + headers.add(HttpHeaders.CONTENT_TYPE, "application/json; charset=UTF-8"); + + try { + jsonStr = mapper.writeValueAsString(retMap); + log.debug("RETURN DATA > json:" + jsonStr); + } catch (JsonProcessingException e) { + ErrorMessage eMsg = new ErrorMessage("ERR_JSON_CONVERT", "응답객체를 JSON으로 변환 처리 중 오류가 발생하였습니다. : " + e.toString()); + try { jsonStr = mapper.writeValueAsString(eMsg); } catch (JsonProcessingException ee) {} + e.printStackTrace(); + return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).headers(headers).body(jsonStr); + } + + return ResponseEntity.ok().headers(headers).body(jsonStr); + } + +} diff --git a/src/main/java/nlib/cmm/crypto/AriaCrypto.java b/src/main/java/nlib/cmm/crypto/AriaCrypto.java index 8d1dee7e..95a1ca52 100644 --- a/src/main/java/nlib/cmm/crypto/AriaCrypto.java +++ b/src/main/java/nlib/cmm/crypto/AriaCrypto.java @@ -1,131 +1,131 @@ -package nlib.cmm.crypto; - -import org.apache.tomcat.util.codec.binary.Base64; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.stereotype.Component; - -import egovframework.rte.fdl.cryptography.EgovPasswordEncoder; -import egovframework.rte.fdl.cryptography.impl.EgovARIACryptoServiceImpl; -import nlib.cmm.service.NlibProperty; -import nlib.sample.web.SampleEncoderController; -import nlib.util.StringUtil; - -/** - *
    - * @Class Name : AriaCrypto.java
    - * 
    - * @Description : 양방향 Aria 알고리즘 암복호화 처리 클래스 (egov Aria 알고리즘 구현체 사용) 
    - * 
    - * 
    - * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    - *
    - * 
    - * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 2021. 7. 8. KNKIM 최초 생성 - * - * - * @author 이씨플라자 * DIGITALSHIP KNKIM - * @since 2021. 7. 8. - * @version 1.0 - * - */ -@Component("ariaCrypto") -public class AriaCrypto { - - private static final Logger log = LoggerFactory.getLogger(AriaCrypto.class); - - /** - * 암호처리 시, 기본 키 - */ - private static String ARIA_DEFAULT_KEY = NlibProperty.getProperty("crypto.aria.defaultKey"); - - /** - * 기본키를 가지고 암호화한다. - * - * @param value - * @return - */ - public static String encode(String value) { - log.info("encode : 암호화에 사용할 키 정보가 없으므로 기본키 정보를 사용합니다 : " + ARIA_DEFAULT_KEY); - return encode(value, ARIA_DEFAULT_KEY); - } - - /** - * 전달받은 key(사용자고유번호 혹은 메일주소 등 salt값)로 암호화한다. - * - * @param value - * @param key - * @return - */ - public static String encode(String value, String key) { - - if(StringUtil.isEmpty(value)) { - log.error("encode : 암호화할 문자열 정보가 없습니다."); - return null; - } - - if(StringUtil.isEmpty(key)) { - log.error("encode : 암호화에 사용할 키 정보가 없습니다."); - return null; - } - - EgovPasswordEncoder egovPasswordEncoder = new EgovPasswordEncoder(); - - String hashedPassword = egovPasswordEncoder.encryptPassword(key); - egovPasswordEncoder.setHashedPassword(hashedPassword); - egovPasswordEncoder.setAlgorithm("SHA-256"); - - EgovARIACryptoServiceImpl egovARIACryptoServiceImpl = new EgovARIACryptoServiceImpl(); - egovARIACryptoServiceImpl.setPasswordEncoder(egovPasswordEncoder); - egovARIACryptoServiceImpl.setBlockSize(1025); - - return Base64.encodeBase64String(egovARIACryptoServiceImpl.encrypt(value.getBytes(), key)); - } - - /** - * 기본키를 가지고 복호화한다. - * - * @param value - * @return - */ - public static String decode(String value) { - log.info("decode : 복호화에 사용할 키 정보가 없으므로 기본키 정보를 사용합니다 : " + ARIA_DEFAULT_KEY); - return decode(value, ARIA_DEFAULT_KEY); - } - - /** - * 전달받은 key(사용자고유번호 혹은 메일주소 등 salt값)로 복호화한다. - * @param value - * @param key - * @return - */ - public static String decode(String value, String key) { - - if(StringUtil.isEmpty(value)) { - log.error("decode : 복호화할 암호문자열 정보가 없습니다."); - return null; - } - - if(StringUtil.isEmpty(key)) { - log.error("decode : 복호화에 사용할 키 정보가 없습니다."); - return null; - } - - EgovPasswordEncoder egovPasswordEncoder = new EgovPasswordEncoder(); - - String hashedPassword = egovPasswordEncoder.encryptPassword(key); - egovPasswordEncoder.setHashedPassword(hashedPassword); - egovPasswordEncoder.setAlgorithm("SHA-256"); - - EgovARIACryptoServiceImpl egovARIACryptoServiceImpl = new EgovARIACryptoServiceImpl(); - egovARIACryptoServiceImpl.setPasswordEncoder(egovPasswordEncoder); - egovARIACryptoServiceImpl.setBlockSize(1025); - - return new String(egovARIACryptoServiceImpl.decrypt(Base64.decodeBase64(value), key)); - } -} +package nlib.cmm.crypto; + +import org.apache.tomcat.util.codec.binary.Base64; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Component; + +import egovframework.rte.fdl.cryptography.EgovPasswordEncoder; +import egovframework.rte.fdl.cryptography.impl.EgovARIACryptoServiceImpl; +import nlib.cmm.service.NlibProperty; +import nlib.sample.web.SampleEncoderController; +import nlib.util.StringUtil; + +/** + *
    + * @Class Name : AriaCrypto.java
    + * 
    + * @Description : 양방향 Aria 알고리즘 암복호화 처리 클래스 (egov Aria 알고리즘 구현체 사용) 
    + * 
    + * 
    + * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    + *
    + * 
    + * + * @ ------------ -------- --------------------------- + * @ 수정일 수정자 수정내용 + * @ ------------ -------- --------------------------- + * @ 2021. 7. 8. KNKIM 최초 생성 + * + * + * @author 이씨플라자 * DIGITALSHIP KNKIM + * @since 2021. 7. 8. + * @version 1.0 + * + */ +@Component("ariaCrypto") +public class AriaCrypto { + + private static final Logger log = LoggerFactory.getLogger(AriaCrypto.class); + + /** + * 암호처리 시, 기본 키 + */ + private static String ARIA_DEFAULT_KEY = NlibProperty.getProperty("crypto.aria.defaultKey"); + + /** + * 기본키를 가지고 암호화한다. + * + * @param value + * @return + */ + public static String encode(String value) { + log.info("encode : 암호화에 사용할 키 정보가 없으므로 기본키 정보를 사용합니다 : " + ARIA_DEFAULT_KEY); + return encode(value, ARIA_DEFAULT_KEY); + } + + /** + * 전달받은 key(사용자고유번호 혹은 메일주소 등 salt값)로 암호화한다. + * + * @param value + * @param key + * @return + */ + public static String encode(String value, String key) { + + if(StringUtil.isEmpty(value)) { + log.error("encode : 암호화할 문자열 정보가 없습니다."); + return null; + } + + if(StringUtil.isEmpty(key)) { + log.error("encode : 암호화에 사용할 키 정보가 없습니다."); + return null; + } + + EgovPasswordEncoder egovPasswordEncoder = new EgovPasswordEncoder(); + + String hashedPassword = egovPasswordEncoder.encryptPassword(key); + egovPasswordEncoder.setHashedPassword(hashedPassword); + egovPasswordEncoder.setAlgorithm("SHA-256"); + + EgovARIACryptoServiceImpl egovARIACryptoServiceImpl = new EgovARIACryptoServiceImpl(); + egovARIACryptoServiceImpl.setPasswordEncoder(egovPasswordEncoder); + egovARIACryptoServiceImpl.setBlockSize(1025); + + return Base64.encodeBase64String(egovARIACryptoServiceImpl.encrypt(value.getBytes(), key)); + } + + /** + * 기본키를 가지고 복호화한다. + * + * @param value + * @return + */ + public static String decode(String value) { + log.info("decode : 복호화에 사용할 키 정보가 없으므로 기본키 정보를 사용합니다 : " + ARIA_DEFAULT_KEY); + return decode(value, ARIA_DEFAULT_KEY); + } + + /** + * 전달받은 key(사용자고유번호 혹은 메일주소 등 salt값)로 복호화한다. + * @param value + * @param key + * @return + */ + public static String decode(String value, String key) { + + if(StringUtil.isEmpty(value)) { + log.error("decode : 복호화할 암호문자열 정보가 없습니다."); + return null; + } + + if(StringUtil.isEmpty(key)) { + log.error("decode : 복호화에 사용할 키 정보가 없습니다."); + return null; + } + + EgovPasswordEncoder egovPasswordEncoder = new EgovPasswordEncoder(); + + String hashedPassword = egovPasswordEncoder.encryptPassword(key); + egovPasswordEncoder.setHashedPassword(hashedPassword); + egovPasswordEncoder.setAlgorithm("SHA-256"); + + EgovARIACryptoServiceImpl egovARIACryptoServiceImpl = new EgovARIACryptoServiceImpl(); + egovARIACryptoServiceImpl.setPasswordEncoder(egovPasswordEncoder); + egovARIACryptoServiceImpl.setBlockSize(1025); + + return new String(egovARIACryptoServiceImpl.decrypt(Base64.decodeBase64(value), key)); + } +} diff --git a/src/main/java/nlib/cmm/crypto/NlibPasswordEncoder.java b/src/main/java/nlib/cmm/crypto/NlibPasswordEncoder.java index 47135bc3..d7e7ba5c 100644 --- a/src/main/java/nlib/cmm/crypto/NlibPasswordEncoder.java +++ b/src/main/java/nlib/cmm/crypto/NlibPasswordEncoder.java @@ -1,68 +1,68 @@ -package nlib.cmm.crypto; - -import javax.annotation.Resource; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.security.crypto.password.PasswordEncoder; -import org.springframework.stereotype.Component; -import org.springframework.stereotype.Service; - -import egovframework.rte.fdl.cryptography.EgovPasswordEncoder; - -/** - *
    - * @Class Name : NlibPasswordEncoder.java
    - * 
    - * @Description : 스프링 시큐리티 비밀번호 암호화 처리를 위하여 전자정부 프레임워크의 SHA256 알고리즘 구현체를 사용한 비밀번호 인코더 클래스 
    - * 
    - * 
    - * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    - *
    - * 
    - * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 2021. 7. 9. KNKIM 최초 생성 - * - * - * @author 이씨플라자 * DIGITALSHIP KNKIM - * @since 2021. 7. 9. - * @version 1.0 - * - */ -@Component("nlibPasswordEncoder") -public class NlibPasswordEncoder implements PasswordEncoder { /* extends EgovPasswordEncoder */ - - private static final Logger log = LoggerFactory.getLogger(NlibPasswordEncoder.class); - - @Resource(name = "egovEnvPasswordEncoderService") - EgovPasswordEncoder egovPasswordEncoder; - - - /* 비밀번호를 SHA-256 알고리즘을 사용하여 암호화한다. - * - * (non-Javadoc) - * @see org.springframework.security.crypto.password.PasswordEncoder#encode(java.lang.CharSequence) - */ - @Override - public String encode(CharSequence rawPassword) { - - return egovPasswordEncoder.encryptPassword(rawPassword.toString()); - } - - /* 두 입력된 비밀번호가 일치하는 지 확인한다. - * - rawPassword : 입력된 비밀번호로 암호화되지 않은 비밀번호 - * - encodedPassword : 암호화된 비밀번호 (사용자DB에서 읽어온 값) - * - * (non-Javadoc) - * @see org.springframework.security.crypto.password.PasswordEncoder#matches(java.lang.CharSequence, java.lang.String) - */ - @Override - public boolean matches(CharSequence rawPassword, String encodedPassword) { - - return egovPasswordEncoder.checkPassword(rawPassword.toString(), encodedPassword); - } - -} +package nlib.cmm.crypto; + +import javax.annotation.Resource; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.security.crypto.password.PasswordEncoder; +import org.springframework.stereotype.Component; +import org.springframework.stereotype.Service; + +import egovframework.rte.fdl.cryptography.EgovPasswordEncoder; + +/** + *
    + * @Class Name : NlibPasswordEncoder.java
    + * 
    + * @Description : 스프링 시큐리티 비밀번호 암호화 처리를 위하여 전자정부 프레임워크의 SHA256 알고리즘 구현체를 사용한 비밀번호 인코더 클래스 
    + * 
    + * 
    + * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    + *
    + * 
    + * + * @ ------------ -------- --------------------------- + * @ 수정일 수정자 수정내용 + * @ ------------ -------- --------------------------- + * @ 2021. 7. 9. KNKIM 최초 생성 + * + * + * @author 이씨플라자 * DIGITALSHIP KNKIM + * @since 2021. 7. 9. + * @version 1.0 + * + */ +@Component("nlibPasswordEncoder") +public class NlibPasswordEncoder implements PasswordEncoder { /* extends EgovPasswordEncoder */ + + private static final Logger log = LoggerFactory.getLogger(NlibPasswordEncoder.class); + + @Resource(name = "egovEnvPasswordEncoderService") + EgovPasswordEncoder egovPasswordEncoder; + + + /* 비밀번호를 SHA-256 알고리즘을 사용하여 암호화한다. + * + * (non-Javadoc) + * @see org.springframework.security.crypto.password.PasswordEncoder#encode(java.lang.CharSequence) + */ + @Override + public String encode(CharSequence rawPassword) { + + return egovPasswordEncoder.encryptPassword(rawPassword.toString()); + } + + /* 두 입력된 비밀번호가 일치하는 지 확인한다. + * - rawPassword : 입력된 비밀번호로 암호화되지 않은 비밀번호 + * - encodedPassword : 암호화된 비밀번호 (사용자DB에서 읽어온 값) + * + * (non-Javadoc) + * @see org.springframework.security.crypto.password.PasswordEncoder#matches(java.lang.CharSequence, java.lang.String) + */ + @Override + public boolean matches(CharSequence rawPassword, String encodedPassword) { + + return egovPasswordEncoder.checkPassword(rawPassword.toString(), encodedPassword); + } + +} diff --git a/src/main/java/nlib/cmm/fileupload/FileUploadController.java b/src/main/java/nlib/cmm/fileupload/FileUploadController.java index e06d2e1f..7b169677 100644 --- a/src/main/java/nlib/cmm/fileupload/FileUploadController.java +++ b/src/main/java/nlib/cmm/fileupload/FileUploadController.java @@ -1,186 +1,186 @@ -package nlib.cmm.fileupload; - -import java.io.File; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; - -import javax.annotation.Resource; -import javax.servlet.http.HttpServletResponse; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.http.HttpHeaders; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.ResponseBody; -import org.springframework.web.multipart.MultipartFile; -import org.springframework.web.multipart.MultipartHttpServletRequest; - -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; - -import egovframework.com.cmm.EgovWebUtil; -import egovframework.com.cmm.service.FileVO; -import nlib.cmm.exception.ErrorMessage; -import nlib.cmm.service.NlibProperty; -import nlib.util.FileUtil; -import nlib.util.StringUtil; -import nlib.util.UUID; - -/** - *
    - * @Class Name : FileUploadController.java
    - * 
    - * @Description : 파일 업로드를 처리하는 컨트롤러  
    - * 
    - * 
    - * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    - *
    - * 
    - * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 2021. 7. 15. KNKIM 최초 생성 - * - * - * @author 이씨플라자 * DIGITALSHIP KNKIM - * @since 2021. 7. 15. - * @version 1.0 - * - */ -@Controller -public class FileUploadController { - - private static final Logger log = LoggerFactory.getLogger(FileUploadController.class); - - @Resource(name="nlibProperty") - NlibProperty nlibProperty; - - - /** - * 첨부파일이 저장되는 최상위 위치 - */ - @Value("#{properties['fileupload.base.path']}") - private String FILEUPLOAD_BASE_PATH; - - /** - * 첨부파일 임시 저장 위치 - */ - @Value("#{properties['fileupload.temp.subpath']}") - private String FILEUPLOAD_TEMP_SUBPATH; - - @ResponseBody - @RequestMapping(value="/fileupload/uploadFilesAjax.do", produces="application/json") - public ResponseEntity uploadFilesAjax( - final MultipartHttpServletRequest multiRequest - , @RequestParam("subPathKey") String subPathKey - , HttpServletResponse response) { - - // TODO : 권한 체크 추가할 것 - - List result = new ArrayList(); - - try { - - // 최상위 위치 - if(FileUtil.isNotValid(FILEUPLOAD_BASE_PATH)) throw new Exception("첨부파일이 저장되는 최상위 위치값이 적절하지 않습니다."); - - // 서브 위치 - if(StringUtil.isEmpty(subPathKey)) throw new Exception("첨부파일이 저장되는 위치정보값이 정확하지 않습니다."); - String subPath = nlibProperty.getProperty(subPathKey); - if(FileUtil.isNotValid(subPath)) throw new Exception("첨부파일 서브 위치값이 적절하지 않습니다."); - - final Map files = multiRequest.getFileMap(); - log.debug("uploadFilesAjax : 진입 " + (files == null ? " files null " : files.size())); - - File dir = new File(FILEUPLOAD_BASE_PATH + subPath); - if(!dir.exists() || !dir.isDirectory()) dir.mkdirs(); - - if(!files.isEmpty()) { - - Iterator> itr = files.entrySet().iterator(); - MultipartFile file; - String filePath = ""; - FileVO fvo; - - int fileKey = 1; - while (itr.hasNext()) { - Entry entry = itr.next(); - - file = entry.getValue(); - String orginFileName = file.getOriginalFilename(); - - //-------------------------------------- - // 원 파일명이 없는 경우 처리 - // (첨부가 되지 않은 input file type) - //-------------------------------------- - if ("".equals(orginFileName)) { - continue; - } - ////------------------------------------ - - int index = orginFileName.lastIndexOf("."); - //String fileName = orginFileName.substring(0, index); - String fileExt = orginFileName.substring(index + 1); - //String newName = KeyStr + getTimeStamp() + fileKey; - String newName = UUID.getPhysicalFileName(); - long size = file.getSize(); - - log.debug("FILE UPLOAD : File New Name=" + newName); - - if (!"".equals(orginFileName)) { - filePath = FILEUPLOAD_BASE_PATH + subPath + "/" + newName; - log.debug("FILE UPLOAD : filePath=" + filePath); - - file.transferTo(new File(EgovWebUtil.filePathBlackList(filePath))); - } - - fvo = new FileVO(); - fvo.setFileExtsn(fileExt); - //fvo.setFileStreCours(storePathString); - fvo.setFileMg(Long.toString(size)); - fvo.setOrignlFileNm(orginFileName); - fvo.setStreFileNm(newName); - //fvo.setAtchFileId(atchFileIdString); - fvo.setFileSn(String.valueOf(fileKey)); - - result.add(fvo); - - fileKey++; - } - } - } catch(Exception e) { - ErrorMessage errorMessage = new ErrorMessage("ERROR", "처리에 실패하였습니다 : " + e.toString()); - e.printStackTrace(); - return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(errorMessage); - } - - // Convert Json - ObjectMapper mapper = new ObjectMapper(); - String json; - try { - json = mapper.writeValueAsString(result); - log.debug("RETURN DATA > json:" + json); - } catch (JsonProcessingException e) { - json = null; - e.printStackTrace(); - } - - HttpHeaders responseHeaders = new HttpHeaders(); - //responseHeaders.set("Content-Type", "application/json; charset=UTF-8"); - - ResponseEntity ret = ResponseEntity.ok().headers(responseHeaders).body(json); - return ret; - } - -} - +package nlib.cmm.fileupload; + +import java.io.File; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.MultipartHttpServletRequest; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; + +import egovframework.com.cmm.EgovWebUtil; +import egovframework.com.cmm.service.FileVO; +import nlib.cmm.exception.ErrorMessage; +import nlib.cmm.service.NlibProperty; +import nlib.util.FileUtil; +import nlib.util.StringUtil; +import nlib.util.UUID; + +/** + *
    + * @Class Name : FileUploadController.java
    + * 
    + * @Description : 파일 업로드를 처리하는 컨트롤러  
    + * 
    + * 
    + * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    + *
    + * 
    + * + * @ ------------ -------- --------------------------- + * @ 수정일 수정자 수정내용 + * @ ------------ -------- --------------------------- + * @ 2021. 7. 15. KNKIM 최초 생성 + * + * + * @author 이씨플라자 * DIGITALSHIP KNKIM + * @since 2021. 7. 15. + * @version 1.0 + * + */ +@Controller +public class FileUploadController { + + private static final Logger log = LoggerFactory.getLogger(FileUploadController.class); + + @Resource(name="nlibProperty") + NlibProperty nlibProperty; + + + /** + * 첨부파일이 저장되는 최상위 위치 + */ + @Value("#{properties['fileupload.base.path']}") + private String FILEUPLOAD_BASE_PATH; + + /** + * 첨부파일 임시 저장 위치 + */ + @Value("#{properties['fileupload.temp.subpath']}") + private String FILEUPLOAD_TEMP_SUBPATH; + + @ResponseBody + @RequestMapping(value="/fileupload/uploadFilesAjax.do", produces="application/json") + public ResponseEntity uploadFilesAjax( + final MultipartHttpServletRequest multiRequest + , @RequestParam("subPathKey") String subPathKey + , HttpServletResponse response) { + + // TODO : 권한 체크 추가할 것 + + List result = new ArrayList(); + + try { + + // 최상위 위치 + if(FileUtil.isNotValid(FILEUPLOAD_BASE_PATH)) throw new Exception("첨부파일이 저장되는 최상위 위치값이 적절하지 않습니다."); + + // 서브 위치 + if(StringUtil.isEmpty(subPathKey)) throw new Exception("첨부파일이 저장되는 위치정보값이 정확하지 않습니다."); + String subPath = nlibProperty.getProperty(subPathKey); + if(FileUtil.isNotValid(subPath)) throw new Exception("첨부파일 서브 위치값이 적절하지 않습니다."); + + final Map files = multiRequest.getFileMap(); + log.debug("uploadFilesAjax : 진입 " + (files == null ? " files null " : files.size())); + + File dir = new File(FILEUPLOAD_BASE_PATH + subPath); + if(!dir.exists() || !dir.isDirectory()) dir.mkdirs(); + + if(!files.isEmpty()) { + + Iterator> itr = files.entrySet().iterator(); + MultipartFile file; + String filePath = ""; + FileVO fvo; + + int fileKey = 1; + while (itr.hasNext()) { + Entry entry = itr.next(); + + file = entry.getValue(); + String orginFileName = file.getOriginalFilename(); + + //-------------------------------------- + // 원 파일명이 없는 경우 처리 + // (첨부가 되지 않은 input file type) + //-------------------------------------- + if ("".equals(orginFileName)) { + continue; + } + ////------------------------------------ + + int index = orginFileName.lastIndexOf("."); + //String fileName = orginFileName.substring(0, index); + String fileExt = orginFileName.substring(index + 1); + //String newName = KeyStr + getTimeStamp() + fileKey; + String newName = UUID.getPhysicalFileName(); + long size = file.getSize(); + + log.debug("FILE UPLOAD : File New Name=" + newName); + + if (!"".equals(orginFileName)) { + filePath = FILEUPLOAD_BASE_PATH + subPath + "/" + newName; + log.debug("FILE UPLOAD : filePath=" + filePath); + + file.transferTo(new File(EgovWebUtil.filePathBlackList(filePath))); + } + + fvo = new FileVO(); + fvo.setFileExtsn(fileExt); + //fvo.setFileStreCours(storePathString); + fvo.setFileMg(Long.toString(size)); + fvo.setOrignlFileNm(orginFileName); + fvo.setStreFileNm(newName); + //fvo.setAtchFileId(atchFileIdString); + fvo.setFileSn(String.valueOf(fileKey)); + + result.add(fvo); + + fileKey++; + } + } + } catch(Exception e) { + ErrorMessage errorMessage = new ErrorMessage("ERROR", "처리에 실패하였습니다 : " + e.toString()); + e.printStackTrace(); + return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(errorMessage); + } + + // Convert Json + ObjectMapper mapper = new ObjectMapper(); + String json; + try { + json = mapper.writeValueAsString(result); + log.debug("RETURN DATA > json:" + json); + } catch (JsonProcessingException e) { + json = null; + e.printStackTrace(); + } + + HttpHeaders responseHeaders = new HttpHeaders(); + //responseHeaders.set("Content-Type", "application/json; charset=UTF-8"); + + ResponseEntity ret = ResponseEntity.ok().headers(responseHeaders).body(json); + return ret; + } + +} + diff --git a/src/main/java/nlib/cmm/fileupload/FileUploadDomain.java b/src/main/java/nlib/cmm/fileupload/FileUploadDomain.java index 27eb4658..a7d078e4 100644 --- a/src/main/java/nlib/cmm/fileupload/FileUploadDomain.java +++ b/src/main/java/nlib/cmm/fileupload/FileUploadDomain.java @@ -1,41 +1,41 @@ -package nlib.cmm.fileupload; - -import java.io.Serializable; -import java.util.List; - -import org.springframework.web.multipart.MultipartFile; - -public class FileUploadDomain implements Serializable { - - private String name; - - private String description; - - private List images; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public List getImages() { - return images; - } - - public void setImages(List images) { - this.images = images; - } - - -} +package nlib.cmm.fileupload; + +import java.io.Serializable; +import java.util.List; + +import org.springframework.web.multipart.MultipartFile; + +public class FileUploadDomain implements Serializable { + + private String name; + + private String description; + + private List images; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public List getImages() { + return images; + } + + public void setImages(List images) { + this.images = images; + } + + +} diff --git a/src/main/java/nlib/cmm/service/impl/CodeDAO.java b/src/main/java/nlib/cmm/service/impl/CodeDAO.java index 4b3e346b..abbe2118 100644 --- a/src/main/java/nlib/cmm/service/impl/CodeDAO.java +++ b/src/main/java/nlib/cmm/service/impl/CodeDAO.java @@ -1,28 +1,28 @@ - -package nlib.cmm.service.impl; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Repository; - -import nlib.cmm.web.MainController; -import nlib.restful.DataApi; -import nlib.restful.service.DataApiReqVO; -import nlib.restful.service.DataApiResVO; - -@Repository("codeDAO") -public class CodeDAO extends DataApi -{ - private static final Logger log = LoggerFactory.getLogger(CodeDAO.class); - - /** - * 주 자원의 URI - */ - public static final String RESOURCE_URI = "/uac/service/code/list"; - - public DataApiResVO listCodes(DataApiReqVO reqVO) { - reqVO.setReqUrl(RESOURCE_URI + "/" + reqVO.getInfoItem("codeUpperId")); - return get(reqVO); - } - + +package nlib.cmm.service.impl; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Repository; + +import nlib.cmm.web.MainController; +import nlib.restful.DataApi; +import nlib.restful.service.DataApiReqVO; +import nlib.restful.service.DataApiResVO; + +@Repository("codeDAO") +public class CodeDAO extends DataApi +{ + private static final Logger log = LoggerFactory.getLogger(CodeDAO.class); + + /** + * 주 자원의 URI + */ + public static final String RESOURCE_URI = "/uac/service/code/list"; + + public DataApiResVO listCodes(DataApiReqVO reqVO) { + reqVO.setReqUrl(RESOURCE_URI + "/" + reqVO.getInfoItem("codeUpperId")); + return get(reqVO); + } + } \ No newline at end of file diff --git a/src/main/java/nlib/cmm/web/CodeController.java b/src/main/java/nlib/cmm/web/CodeController.java index 59e4f934..7349b666 100644 --- a/src/main/java/nlib/cmm/web/CodeController.java +++ b/src/main/java/nlib/cmm/web/CodeController.java @@ -1,87 +1,87 @@ -package nlib.cmm.web; - -import java.util.HashMap; -import java.util.Map; - -import javax.annotation.Resource; -import javax.servlet.http.HttpServletRequest; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.http.ResponseEntity; -import org.springframework.security.core.Authentication; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; - -import nlib.cmm.NlibCommonController; -import nlib.cmm.service.CodeService; -import nlib.restful.service.DataApiReqVO; -import nlib.restful.service.DataApiResVO; -import nlib.util.StringUtil; - -@Controller -public class CodeController extends NlibCommonController { - - private static final Logger log = LoggerFactory.getLogger(CodeController.class); - - @Resource(name="codeService") - private CodeService codeService; - - @RequestMapping(value="/code/listCodesAjax.do") - public ResponseEntity listCodeAjax(HttpServletRequest req, - Authentication authentication, @RequestBody Map paramMap) { - - String codeSearchKeyword = paramMap.get("codeSearchKeyword"); - String codePageIndex = paramMap.get("codePageIndex"); - String codePageSize = paramMap.get("codePageSize"); - String codeUpperId = paramMap.get("codeUpperId"); - - log.debug("listCodeAjax > codeSearchKeyword = " + codeSearchKeyword); - log.debug("listCodeAjax > codePageIndex = " + codePageIndex); - log.debug("listCodeAjax > codePageSize = " + codePageSize); - log.debug("listCodeAjax > codeUpperId = " + codeUpperId); - - //------------------------------- - // REQ VO 구성 - //------------------------------- - DataApiReqVO reqVO = new DataApiReqVO(); - reqVO.setAuthKey(createAuthKey(req, authentication)); - reqVO.setPageIndex(codePageIndex); - reqVO.setPageSize(codePageSize); - - // 추가 정보 설정 - reqVO.addInfoItem("searchKeyword", codeSearchKeyword); - reqVO.addInfoItem("codeUpperId", codeUpperId); - - // 요청 - DataApiResVO resVO = codeService.listCodes(reqVO); - - //------------------------------- - // JSON변환 응답 처리 - //------------------------------- - // JS-GRID 페이징 처리를 포함한 응답값 처리 - // (1) 페이징을 서버단에서 처리하는 경우 (pagingloading = false) - // {data: [{...}], - // itemsCount: 255 - // } - // (2) 페이징을 클라이언트에서 처리하는 경우 (pagingloading = true) - // {data: [{...}], - // itemsCount: 255 - // } - - // 코드 페이징 사이즈값이 없거나 0인 경우, 서버에서 페이징 처리하지 않고 전체 데이터 전송 - if(StringUtil.isEmpty(codePageSize) || Integer.parseInt(codePageSize) <= 0) { - return makeResponseEntityJson(resVO.getList()); - } - - // 코드 페이징 처리되는 경우 - HashMap retMap = new HashMap(); - retMap.put("data", resVO.getList()); - retMap.put("itemsCount", resVO.getRecordTotCount()); - - return makeResponseEntityJson(retMap); - } - - -} +package nlib.cmm.web; + +import java.util.HashMap; +import java.util.Map; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.http.ResponseEntity; +import org.springframework.security.core.Authentication; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; + +import nlib.cmm.NlibCommonController; +import nlib.cmm.service.CodeService; +import nlib.restful.service.DataApiReqVO; +import nlib.restful.service.DataApiResVO; +import nlib.util.StringUtil; + +@Controller +public class CodeController extends NlibCommonController { + + private static final Logger log = LoggerFactory.getLogger(CodeController.class); + + @Resource(name="codeService") + private CodeService codeService; + + @RequestMapping(value="/code/listCodesAjax.do") + public ResponseEntity listCodeAjax(HttpServletRequest req, + Authentication authentication, @RequestBody Map paramMap) { + + String codeSearchKeyword = paramMap.get("codeSearchKeyword"); + String codePageIndex = paramMap.get("codePageIndex"); + String codePageSize = paramMap.get("codePageSize"); + String codeUpperId = paramMap.get("codeUpperId"); + + log.debug("listCodeAjax > codeSearchKeyword = " + codeSearchKeyword); + log.debug("listCodeAjax > codePageIndex = " + codePageIndex); + log.debug("listCodeAjax > codePageSize = " + codePageSize); + log.debug("listCodeAjax > codeUpperId = " + codeUpperId); + + //------------------------------- + // REQ VO 구성 + //------------------------------- + DataApiReqVO reqVO = new DataApiReqVO(); + reqVO.setAuthKey(createAuthKey(req, authentication)); + reqVO.setPageIndex(codePageIndex); + reqVO.setPageSize(codePageSize); + + // 추가 정보 설정 + reqVO.addInfoItem("searchKeyword", codeSearchKeyword); + reqVO.addInfoItem("codeUpperId", codeUpperId); + + // 요청 + DataApiResVO resVO = codeService.listCodes(reqVO); + + //------------------------------- + // JSON변환 응답 처리 + //------------------------------- + // JS-GRID 페이징 처리를 포함한 응답값 처리 + // (1) 페이징을 서버단에서 처리하는 경우 (pagingloading = false) + // {data: [{...}], + // itemsCount: 255 + // } + // (2) 페이징을 클라이언트에서 처리하는 경우 (pagingloading = true) + // {data: [{...}], + // itemsCount: 255 + // } + + // 코드 페이징 사이즈값이 없거나 0인 경우, 서버에서 페이징 처리하지 않고 전체 데이터 전송 + if(StringUtil.isEmpty(codePageSize) || Integer.parseInt(codePageSize) <= 0) { + return makeResponseEntityJson(resVO.getList()); + } + + // 코드 페이징 처리되는 경우 + HashMap retMap = new HashMap(); + retMap.put("data", resVO.getList()); + retMap.put("itemsCount", resVO.getRecordTotCount()); + + return makeResponseEntityJson(retMap); + } + + +} diff --git a/src/main/java/nlib/restful/service/DataApiReqVO.java b/src/main/java/nlib/restful/service/DataApiReqVO.java index 607b2f06..4febb366 100644 --- a/src/main/java/nlib/restful/service/DataApiReqVO.java +++ b/src/main/java/nlib/restful/service/DataApiReqVO.java @@ -1,139 +1,139 @@ -package nlib.restful.service; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - *
    - * @Class Name : DataApiReqVO.java
    - * 
    - * @Description : RESTful API 요청 VO
    - * 
    - * 
    - * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    - *
    - * 
    - * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 2021. 6. 22. KNKIM 최초 생성 - * - * - * @author 이씨플라자 * DIGITALSHIP KNKIM - * @since 2021. 6. 22. - * @version 1.0 - * - */ -public class DataApiReqVO { - - public static final int DEFAULT_PAGE_SIZE = 10; - public static final int DEFAULT_PAGE_INDEX = 1; - - /* 처리결과 */ - private String authKey; /* 로그인키 */ - - /* 페이징 정보 */ - private int pageIndex = 0; /* 요청 페이지 번호 */ - private int pageSize = 0; /* 페이지별 표출할 레코드 수 */ - - /* 기본정보 */ - private HashMap info = null; - - public boolean hasInfo() { - return (info != null && info.size() > 0); - } - - /* 요청업무ID 및 처리URI */ - int reqMethod; /* 요청메소드구분값 */ - String reqUrl; /* 요청업무ID에 대한 통합시스템의 응답 처리 프로그램 URI */ - - // GET/SET - public String getAuthKey() { - return authKey; - } - - public void setAuthKey(String authKey) { - this.authKey = authKey; - } - - public int getPageIndex() { - return (pageIndex < 1 ? DEFAULT_PAGE_INDEX : pageIndex); - } - - public void setPageIndex(int pageIndex) { - this.pageIndex = pageIndex; - } - - public void setPageIndex(String pageIndex) { - try { - this.pageIndex = Integer.parseInt(pageIndex); - } catch(Exception e) { - this.pageIndex = DEFAULT_PAGE_INDEX; - } - - } - - public int getPageSize() { - return (pageSize < 1 ? DEFAULT_PAGE_SIZE : pageSize); - } - - public void setPageSize(String pageSize) { - try { - this.pageSize = Integer.parseInt(pageSize); - } catch(Exception e) { - this.pageSize = DEFAULT_PAGE_SIZE; - } - } - - public void setPageSize(int pageSize) { - this.pageSize = pageSize; - } - - public HashMap getInfo() { - return info; - } - - public void setInfo(HashMap info) { - this.info = info; - } - - public String getReqUrl() { - return reqUrl; - } - public void setReqUrl(String reqUrl) { - this.reqUrl = reqUrl; - } - - public int getReqMethod() { - return reqMethod; - } - - public void setReqMethod(int reqMethod) { - this.reqMethod = reqMethod; - } - - public void addInfoItem(String key, String value) { - if(key == null) return; - - if(info == null) info = new HashMap(); - - info.put(key, value); - } - - public String getInfoItem(String key) { - if(key == null) return null; - if(info == null) return null; - - return (String)info.get(key); - } - - public void removeInfoItem(String key) { - if(key == null) return; - if(info == null) return; - - info.remove(key); - } - -} +package nlib.restful.service; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + *
    + * @Class Name : DataApiReqVO.java
    + * 
    + * @Description : RESTful API 요청 VO
    + * 
    + * 
    + * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    + *
    + * 
    + * + * @ ------------ -------- --------------------------- + * @ 수정일 수정자 수정내용 + * @ ------------ -------- --------------------------- + * @ 2021. 6. 22. KNKIM 최초 생성 + * + * + * @author 이씨플라자 * DIGITALSHIP KNKIM + * @since 2021. 6. 22. + * @version 1.0 + * + */ +public class DataApiReqVO { + + public static final int DEFAULT_PAGE_SIZE = 10; + public static final int DEFAULT_PAGE_INDEX = 1; + + /* 처리결과 */ + private String authKey; /* 로그인키 */ + + /* 페이징 정보 */ + private int pageIndex = 0; /* 요청 페이지 번호 */ + private int pageSize = 0; /* 페이지별 표출할 레코드 수 */ + + /* 기본정보 */ + private HashMap info = null; + + public boolean hasInfo() { + return (info != null && info.size() > 0); + } + + /* 요청업무ID 및 처리URI */ + int reqMethod; /* 요청메소드구분값 */ + String reqUrl; /* 요청업무ID에 대한 통합시스템의 응답 처리 프로그램 URI */ + + // GET/SET + public String getAuthKey() { + return authKey; + } + + public void setAuthKey(String authKey) { + this.authKey = authKey; + } + + public int getPageIndex() { + return (pageIndex < 1 ? DEFAULT_PAGE_INDEX : pageIndex); + } + + public void setPageIndex(int pageIndex) { + this.pageIndex = pageIndex; + } + + public void setPageIndex(String pageIndex) { + try { + this.pageIndex = Integer.parseInt(pageIndex); + } catch(Exception e) { + this.pageIndex = DEFAULT_PAGE_INDEX; + } + + } + + public int getPageSize() { + return (pageSize < 1 ? DEFAULT_PAGE_SIZE : pageSize); + } + + public void setPageSize(String pageSize) { + try { + this.pageSize = Integer.parseInt(pageSize); + } catch(Exception e) { + this.pageSize = DEFAULT_PAGE_SIZE; + } + } + + public void setPageSize(int pageSize) { + this.pageSize = pageSize; + } + + public HashMap getInfo() { + return info; + } + + public void setInfo(HashMap info) { + this.info = info; + } + + public String getReqUrl() { + return reqUrl; + } + public void setReqUrl(String reqUrl) { + this.reqUrl = reqUrl; + } + + public int getReqMethod() { + return reqMethod; + } + + public void setReqMethod(int reqMethod) { + this.reqMethod = reqMethod; + } + + public void addInfoItem(String key, String value) { + if(key == null) return; + + if(info == null) info = new HashMap(); + + info.put(key, value); + } + + public String getInfoItem(String key) { + if(key == null) return null; + if(info == null) return null; + + return (String)info.get(key); + } + + public void removeInfoItem(String key) { + if(key == null) return; + if(info == null) return; + + info.remove(key); + } + +} diff --git a/src/main/java/nlib/restful/service/DataApiResVO.java b/src/main/java/nlib/restful/service/DataApiResVO.java index b2a334c5..f6e0b36d 100644 --- a/src/main/java/nlib/restful/service/DataApiResVO.java +++ b/src/main/java/nlib/restful/service/DataApiResVO.java @@ -1,134 +1,134 @@ -package nlib.restful.service; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import nlib.util.StringUtil; - -/** - *
    - * @Class Name : DataApiResVO.java
    - * 
    - * @Description : RESTful API 응답 VO
    - * 
    - * 
    - * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    - *
    - * 
    - * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 2021. 6. 22. KNKIM 최초 생성 - * - * - * @author 이씨플라자 * DIGITALSHIP KNKIM - * @since 2021. 6. 22. - * @version 1.0 - * - */ -public class DataApiResVO { - - /** - * 생성자 - */ - public DataApiResVO() { - super(); - } - - /** - * 생성자 - * - * @param resultCode - * @param resultMessage - */ - public DataApiResVO(String resultCode, String resultMessage) { - this.resultCode = resultCode; - this.resultMessage = resultMessage; - } - - - /* 처리결과 */ - String resultCode; /* 결과코드 */ - String resultMessage; /* 결과내용(오류내용) */ - - /* 페이징 정보 */ - int pageIndex = 0; /* 요청 페이지 번호 (page) */ - int pageLastIndex = 0; /* 마지막페이지번호 (totPages) */ - - /* 기본/추가 정보 */ - HashMap info = null; - - /* 목록정보 */ - int recordTotCount = 0; /* 총 레코드수 (records) */ - - /** - * 응답 처리결과가 성공인지의 여부를 리턴한다. - * 결과코드(resultCode)의 값이 "S"로 시작하는 경우 true 리턴한다. - * - * @return - */ - public boolean isSuccess() { - if(StringUtil.isEmpty(resultCode)) return false; - return (resultCode.trim().charAt(0) == 'S'); - } - - // GET/SET - - public String getResultCode() { - return resultCode; - } - public void setResultCode(String resultCode) { - this.resultCode = resultCode; - } - public String getResultMessage() { - return resultMessage; - } - public void setResultMessage(String resultMessage) { - this.resultMessage = resultMessage; - } - public int getPageIndex() { - return pageIndex; - } - public void setPageIndex(int pageIndex) { - this.pageIndex = pageIndex; - } - public int getPageLastIndex() { - return pageLastIndex; - } - public void setPageLastIndex(int pageLastIndex) { - this.pageLastIndex = pageLastIndex; - } - public HashMap getInfo() { - return info; - } - public void setInfo(HashMap info) { - this.info = info; - } - public int getRecordTotCount() { - return recordTotCount; - } - public void setRecordTotCount(int recordTotCount) { - this.recordTotCount = recordTotCount; - } - - /** - * 반복되는 목록용 리스트 정보를 가져온다. - * - RESTful API : ""요소로 반복되는 요소를 반환한다. - * - * @return - */ - public List> getList() { - if(info == null) return null; - return (List>)info.get("results"); - } - - - public String getInfoItem(String key) { - if(key == null) return null; - if(info == null) return null; - - return (String)info.get(key); - } -} +package nlib.restful.service; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import nlib.util.StringUtil; + +/** + *
    + * @Class Name : DataApiResVO.java
    + * 
    + * @Description : RESTful API 응답 VO
    + * 
    + * 
    + * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    + *
    + * 
    + * + * @ ------------ -------- --------------------------- + * @ 수정일 수정자 수정내용 + * @ ------------ -------- --------------------------- + * @ 2021. 6. 22. KNKIM 최초 생성 + * + * + * @author 이씨플라자 * DIGITALSHIP KNKIM + * @since 2021. 6. 22. + * @version 1.0 + * + */ +public class DataApiResVO { + + /** + * 생성자 + */ + public DataApiResVO() { + super(); + } + + /** + * 생성자 + * + * @param resultCode + * @param resultMessage + */ + public DataApiResVO(String resultCode, String resultMessage) { + this.resultCode = resultCode; + this.resultMessage = resultMessage; + } + + + /* 처리결과 */ + String resultCode; /* 결과코드 */ + String resultMessage; /* 결과내용(오류내용) */ + + /* 페이징 정보 */ + int pageIndex = 0; /* 요청 페이지 번호 (page) */ + int pageLastIndex = 0; /* 마지막페이지번호 (totPages) */ + + /* 기본/추가 정보 */ + HashMap info = null; + + /* 목록정보 */ + int recordTotCount = 0; /* 총 레코드수 (records) */ + + /** + * 응답 처리결과가 성공인지의 여부를 리턴한다. + * 결과코드(resultCode)의 값이 "S"로 시작하는 경우 true 리턴한다. + * + * @return + */ + public boolean isSuccess() { + if(StringUtil.isEmpty(resultCode)) return false; + return (resultCode.trim().charAt(0) == 'S'); + } + + // GET/SET + + public String getResultCode() { + return resultCode; + } + public void setResultCode(String resultCode) { + this.resultCode = resultCode; + } + public String getResultMessage() { + return resultMessage; + } + public void setResultMessage(String resultMessage) { + this.resultMessage = resultMessage; + } + public int getPageIndex() { + return pageIndex; + } + public void setPageIndex(int pageIndex) { + this.pageIndex = pageIndex; + } + public int getPageLastIndex() { + return pageLastIndex; + } + public void setPageLastIndex(int pageLastIndex) { + this.pageLastIndex = pageLastIndex; + } + public HashMap getInfo() { + return info; + } + public void setInfo(HashMap info) { + this.info = info; + } + public int getRecordTotCount() { + return recordTotCount; + } + public void setRecordTotCount(int recordTotCount) { + this.recordTotCount = recordTotCount; + } + + /** + * 반복되는 목록용 리스트 정보를 가져온다. + * - RESTful API : ""요소로 반복되는 요소를 반환한다. + * + * @return + */ + public List> getList() { + if(info == null) return null; + return (List>)info.get("results"); + } + + + public String getInfoItem(String key) { + if(key == null) return null; + if(info == null) return null; + + return (String)info.get(key); + } +} diff --git a/src/main/java/nlib/restful/service/XmlConverter.java b/src/main/java/nlib/restful/service/XmlConverter.java index 15a67c3c..541169ef 100644 --- a/src/main/java/nlib/restful/service/XmlConverter.java +++ b/src/main/java/nlib/restful/service/XmlConverter.java @@ -1,239 +1,239 @@ -package nlib.restful.service; - -import java.io.ByteArrayInputStream; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.InputStream; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import javax.xml.stream.XMLEventReader; -import javax.xml.stream.XMLInputFactory; -import javax.xml.stream.XMLStreamException; -import javax.xml.stream.events.StartElement; -import javax.xml.stream.events.XMLEvent; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import nlib.sample.web.SampleEncoderController; -import nlib.util.StringUtil; - -public class XmlConverter { - - private static final Logger log = LoggerFactory.getLogger(XmlConverter.class); - - public static HashMap convert(String xmlStr) throws Exception { - - if(xmlStr == null) return null; - - ByteArrayInputStream bIn = new ByteArrayInputStream(xmlStr.getBytes()); - HashMap resMap = new HashMap(); - - try { - XMLInputFactory inputFactory = XMLInputFactory.newInstance(); - XMLEventReader eventReader = inputFactory.createXMLEventReader(bIn); - - resMap = getElementValue("result", eventReader, null); - log.debug("Converting XML to HashMap : Done >> " + resMap); - } catch (XMLStreamException e) { - e.printStackTrace(); - } catch (Exception e) { - e.printStackTrace(); - } - - return resMap; - } - - /** - * @param rootElementName - * @param eventReader - * @param alreadyRootOpened : 부모 요소 찾기 없이 작업 진행할지 여부. false인 경우, rootElementName 요소를 찾아서 이후 값 추출 수행 - * @param startElement - * @return - * @throws Exception - */ - public static HashMap getElementValue( - String rootElementName - , XMLEventReader eventReader - , XMLEvent firstChildElement) throws Exception { - - HashMap retMap = new HashMap(); - - try { - - int depth = (firstChildElement == null ? 0 : 1); - StartElement startElement = null; - - XMLEvent event = firstChildElement; - - String upperElementName = null; - String elementName = null; //(firstChildElement == null ? null : firstChildElement.asStartElement().getName().getLocalPart()); - String content = null; - String elementValue = ""; - HashMap elementValues = null; - boolean hasSubElements = false; - boolean isFirst = true; - - while (eventReader.hasNext()) { - - // 이벤트가 함께 매개변수로 넘어온 경우, 처음 읽기 생략 - if(!isFirst || event == null) { - event = eventReader.nextEvent(); - } - - if(isFirst) isFirst = false; - - - // 1 레벨 엘리먼트 찾기 - if (depth == 0 && event.isStartElement() && event.asStartElement().getName().getLocalPart().equals(rootElementName)) { - depth++; - continue; - } - - // 1 레벨 엘리먼트내의 2 레벨 엘리먼트 찾기 - if(depth == 1 && elementName == null && event.isStartElement()) { - elementName = event.asStartElement().getName().getLocalPart(); - elementValue = ""; - elementValues = null; - hasSubElements = false; - depth++; - continue; - } - - // 2 레벨 엘리먼트 내용 찾기 - if(depth == 2 && elementName != null && event.isCharacters()) { - content = event.asCharacters().getData(); - if(StringUtil.isNotEmpty(content)) { - elementValue += content; - } - continue; - } - - // 2 레벨 엘리먼트 종료 - if(depth == 2 && elementName != null && event.isEndElement()) { - - if(!elementName.equals(event.asEndElement().getName().getLocalPart())) { - throw new Exception("XML문의 요소 시작/종료 태그가 일치하지 않습니다. : " + elementName + " 요소가 " + event.asEndElement().getName().getLocalPart() + "로 종료되었습니다."); - } - - addValue(retMap, elementName, elementValue); - //log.debug(elementName + " : -" + elementValue + "_"); - - elementName = null; - elementValue = ""; - depth--; - } - - // 2 레벨 엘리먼트 > 하위 엘리먼트 존재하는 경우 - if(depth == 2 && elementName != null && event.isStartElement()) { - HashMap subMap = getElementValue(elementName, eventReader, event); - addValue(retMap, elementName, subMap); - depth--; - elementName = null; - } - - // 1 레벨 엘리먼트 종료된 경우, 돌아가기 - if(depth == 1 && elementName == null && event.isEndElement() && rootElementName.equals(event.asEndElement().getName().getLocalPart())) { - depth--; - return retMap; - } - - } // while - - } catch (XMLStreamException e) { - e.printStackTrace(); - } catch (Exception e) { - e.printStackTrace(); - } - - System.out.println("END"); - return retMap; - } - - public static void addValue(HashMap map, String key, Object value) throws Exception { - if(map == null) throw new Exception("값을 넣을 Map 변수가 초기화되지 않았습니다."); - - if(key == null) return; - if(value == null) return; - - Object curValObj = map.get(key); - if(curValObj == null) { - map.put(key, value); - return; - } - - if(curValObj instanceof String || curValObj instanceof HashMap) { - List values = new ArrayList(); - values.add(curValObj); - values.add(value); - map.put(key, values); - } else if(curValObj instanceof List) { - ((ArrayList)curValObj).add(value); - } - - return; - } - -/* - public static void main(String argv[]) throws Exception { - - XmlConverter xmlConverter = new XmlConverter(); - String xmlStr = "\r\n" + - "\r\n" + - "\r\n" + - " S\r\n" + - " 성공적으로 조회되었습니다.\r\n" + - " 10\r\n" + - " 1\r\n" + - " 15\r\n" + - " \r\n" + - " 1\r\n" + - " 101\r\n" + - " 공지사항 테스트\r\n" + - " 15\r\n" + - " 2021-07-19\r\n" + - " \r\n" + - " \r\n" + - " 2\r\n" + - " 101\r\n" + - " 공지사항 테스트\r\n" + - " 55\r\n" + - " 2021-07-19\r\n" + - " \r\n" + - " \r\n" + - " 3\r\n" + - " 101\r\n" + - " 공지사항 테스트\r\n" + - " 55\r\n" + - " 2021-07-19\r\n" + - " \r\n" + - " \r\n" + - " 4\r\n" + - " 101\r\n" + - " 공지사항 테스트\r\n" + - " 55\r\n" + - " 2021-07-19\r\n" + - " \r\n" + - " \r\n" + - " 5\r\n" + - " 101\r\n" + - " 공지사항 테스트\r\n" + - " 55\r\n" + - " 2021-07-19\r\n" + - " \r\n" + - " \r\n" + - " 6\r\n" + - " 101\r\n" + - " 공지사항 테스트\r\n" + - " 55\r\n" + - " 2021-07-19\r\n" + - " \r\n" + - " 3333\r\n" + - ""; - - HashMap resMap = xmlConverter.convert(xmlStr); - } - */ -} +package nlib.restful.service; + +import java.io.ByteArrayInputStream; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; + +import javax.xml.stream.XMLEventReader; +import javax.xml.stream.XMLInputFactory; +import javax.xml.stream.XMLStreamException; +import javax.xml.stream.events.StartElement; +import javax.xml.stream.events.XMLEvent; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import nlib.sample.web.SampleEncoderController; +import nlib.util.StringUtil; + +public class XmlConverter { + + private static final Logger log = LoggerFactory.getLogger(XmlConverter.class); + + public static HashMap convert(String xmlStr) throws Exception { + + if(xmlStr == null) return null; + + ByteArrayInputStream bIn = new ByteArrayInputStream(xmlStr.getBytes()); + HashMap resMap = new HashMap(); + + try { + XMLInputFactory inputFactory = XMLInputFactory.newInstance(); + XMLEventReader eventReader = inputFactory.createXMLEventReader(bIn); + + resMap = getElementValue("result", eventReader, null); + log.debug("Converting XML to HashMap : Done >> " + resMap); + } catch (XMLStreamException e) { + e.printStackTrace(); + } catch (Exception e) { + e.printStackTrace(); + } + + return resMap; + } + + /** + * @param rootElementName + * @param eventReader + * @param alreadyRootOpened : 부모 요소 찾기 없이 작업 진행할지 여부. false인 경우, rootElementName 요소를 찾아서 이후 값 추출 수행 + * @param startElement + * @return + * @throws Exception + */ + public static HashMap getElementValue( + String rootElementName + , XMLEventReader eventReader + , XMLEvent firstChildElement) throws Exception { + + HashMap retMap = new HashMap(); + + try { + + int depth = (firstChildElement == null ? 0 : 1); + StartElement startElement = null; + + XMLEvent event = firstChildElement; + + String upperElementName = null; + String elementName = null; //(firstChildElement == null ? null : firstChildElement.asStartElement().getName().getLocalPart()); + String content = null; + String elementValue = ""; + HashMap elementValues = null; + boolean hasSubElements = false; + boolean isFirst = true; + + while (eventReader.hasNext()) { + + // 이벤트가 함께 매개변수로 넘어온 경우, 처음 읽기 생략 + if(!isFirst || event == null) { + event = eventReader.nextEvent(); + } + + if(isFirst) isFirst = false; + + + // 1 레벨 엘리먼트 찾기 + if (depth == 0 && event.isStartElement() && event.asStartElement().getName().getLocalPart().equals(rootElementName)) { + depth++; + continue; + } + + // 1 레벨 엘리먼트내의 2 레벨 엘리먼트 찾기 + if(depth == 1 && elementName == null && event.isStartElement()) { + elementName = event.asStartElement().getName().getLocalPart(); + elementValue = ""; + elementValues = null; + hasSubElements = false; + depth++; + continue; + } + + // 2 레벨 엘리먼트 내용 찾기 + if(depth == 2 && elementName != null && event.isCharacters()) { + content = event.asCharacters().getData(); + if(StringUtil.isNotEmpty(content)) { + elementValue += content; + } + continue; + } + + // 2 레벨 엘리먼트 종료 + if(depth == 2 && elementName != null && event.isEndElement()) { + + if(!elementName.equals(event.asEndElement().getName().getLocalPart())) { + throw new Exception("XML문의 요소 시작/종료 태그가 일치하지 않습니다. : " + elementName + " 요소가 " + event.asEndElement().getName().getLocalPart() + "로 종료되었습니다."); + } + + addValue(retMap, elementName, elementValue); + //log.debug(elementName + " : -" + elementValue + "_"); + + elementName = null; + elementValue = ""; + depth--; + } + + // 2 레벨 엘리먼트 > 하위 엘리먼트 존재하는 경우 + if(depth == 2 && elementName != null && event.isStartElement()) { + HashMap subMap = getElementValue(elementName, eventReader, event); + addValue(retMap, elementName, subMap); + depth--; + elementName = null; + } + + // 1 레벨 엘리먼트 종료된 경우, 돌아가기 + if(depth == 1 && elementName == null && event.isEndElement() && rootElementName.equals(event.asEndElement().getName().getLocalPart())) { + depth--; + return retMap; + } + + } // while + + } catch (XMLStreamException e) { + e.printStackTrace(); + } catch (Exception e) { + e.printStackTrace(); + } + + System.out.println("END"); + return retMap; + } + + public static void addValue(HashMap map, String key, Object value) throws Exception { + if(map == null) throw new Exception("값을 넣을 Map 변수가 초기화되지 않았습니다."); + + if(key == null) return; + if(value == null) return; + + Object curValObj = map.get(key); + if(curValObj == null) { + map.put(key, value); + return; + } + + if(curValObj instanceof String || curValObj instanceof HashMap) { + List values = new ArrayList(); + values.add(curValObj); + values.add(value); + map.put(key, values); + } else if(curValObj instanceof List) { + ((ArrayList)curValObj).add(value); + } + + return; + } + +/* + public static void main(String argv[]) throws Exception { + + XmlConverter xmlConverter = new XmlConverter(); + String xmlStr = "\r\n" + + "\r\n" + + "\r\n" + + " S\r\n" + + " 성공적으로 조회되었습니다.\r\n" + + " 10\r\n" + + " 1\r\n" + + " 15\r\n" + + " \r\n" + + " 1\r\n" + + " 101\r\n" + + " 공지사항 테스트\r\n" + + " 15\r\n" + + " 2021-07-19\r\n" + + " \r\n" + + " \r\n" + + " 2\r\n" + + " 101\r\n" + + " 공지사항 테스트\r\n" + + " 55\r\n" + + " 2021-07-19\r\n" + + " \r\n" + + " \r\n" + + " 3\r\n" + + " 101\r\n" + + " 공지사항 테스트\r\n" + + " 55\r\n" + + " 2021-07-19\r\n" + + " \r\n" + + " \r\n" + + " 4\r\n" + + " 101\r\n" + + " 공지사항 테스트\r\n" + + " 55\r\n" + + " 2021-07-19\r\n" + + " \r\n" + + " \r\n" + + " 5\r\n" + + " 101\r\n" + + " 공지사항 테스트\r\n" + + " 55\r\n" + + " 2021-07-19\r\n" + + " \r\n" + + " \r\n" + + " 6\r\n" + + " 101\r\n" + + " 공지사항 테스트\r\n" + + " 55\r\n" + + " 2021-07-19\r\n" + + " \r\n" + + " 3333\r\n" + + ""; + + HashMap resMap = xmlConverter.convert(xmlStr); + } + */ +} diff --git a/src/main/java/nlib/restful/service/impl/DataApiRESTful.java b/src/main/java/nlib/restful/service/impl/DataApiRESTful.java index a533a791..8723c6f4 100644 --- a/src/main/java/nlib/restful/service/impl/DataApiRESTful.java +++ b/src/main/java/nlib/restful/service/impl/DataApiRESTful.java @@ -1,168 +1,168 @@ -package nlib.restful.service.impl; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.http.HttpEntity; -import org.springframework.http.HttpHeaders; -import org.springframework.http.HttpMethod; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.util.MultiValueMap; -import org.springframework.web.client.RestTemplate; - -import nlib.restful.service.DataApiReqVO; -import nlib.restful.service.DataApiResVO; -import nlib.restful.service.DataApiInterface; -import nlib.util.StringUtil; - -/** - *
    - * @Class Name : DataApiRESTful.java
    - * 
    - * @Description : 통합자료관리시스템에 RESTful API를 통해 질의/응답을 처리한다.
    - * 
    - * 
    - * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    - *
    - * 
    - * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 2021. 6. 22. KNKIM 최초 생성 - * - * - * @author 이씨플라자 * DIGITALSHIP KNKIM - * @since 2021. 6. 22. - * @version 1.0 - * - */ -public class DataApiRESTful implements DataApiInterface { - - private static final Logger log = LoggerFactory.getLogger(DataApiRESTful.class); - - /* DataApi 접속 서버 정보 */ - @Value("#{properties['dataapi.server.ip']}") - private String DAPI_SERVER_IP; - - @Value("#{properties['dataapi.server.port']}") - private String DAPI_SERVER_PORT; - - @Value("#{properties['dataapi.server.protocol']}") - private String DAPI_SERVER_PROTOCOL; - - - /** - * 조회 - * - * @param reqVO - * @return - */ - public DataApiResVO get(DataApiReqVO reqVO) { - - return send(reqVO, HttpMethod.GET); - } - - /** - * 등록 - * - * @param reqVO - * @return - */ - public DataApiResVO put(DataApiReqVO reqVO) { - return send(reqVO, HttpMethod.PUT); - } - - /** - * 수정 - * - * @param reqVO - * @return - */ - public DataApiResVO post(DataApiReqVO reqVO) { - return send(reqVO, HttpMethod.POST); - } - - /** - * 삭제 - * - * @param reqVO - * @return - */ - public DataApiResVO delete (DataApiReqVO reqVO) { - return send(reqVO, HttpMethod.DELETE); - } - - /** - * 실제 RESTful API 서버로 요청을 전송하고, 응답받은 자료를 응답VO에 담아서 리턴한다. - * - * @param reqVO - * @param method - * @return - */ - public DataApiResVO send(DataApiReqVO reqVO, HttpMethod method) { - - DataApiResVO resVO = null; - - try { - //----------------------------------- - // 입력값 검증작업 - //----------------------------------- - resVO = DataApiInterface.checkReqCommonParams(reqVO); - if(resVO != null) return resVO; - if(method == null) return new DataApiResVO("ERR_NO_METHOD", "HTTP 요청 Method가 유효하지 않습니다."); - - //----------------------------------- - // 폼 파라메터 생성 작업 - //----------------------------------- - HttpHeaders headers = new HttpHeaders(); - headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED); - MultiValueMap parameters = DataApiInterface.makeParamMap(reqVO); - HttpEntity> requestEntity = new HttpEntity(parameters, headers); - - //----------------------------------- - // 요청 처리 - //----------------------------------- - RestTemplate restTemplate = new RestTemplate(); - String url = DAPI_SERVER_PROTOCOL + "://" + DAPI_SERVER_IP + ("80".equals(DAPI_SERVER_PORT) ? "" : ":" + DAPI_SERVER_PORT) + reqVO.getReqUrl(); - log.debug("REQ URL : " + reqVO.getReqUrl()); - - ResponseEntity responseEntity = restTemplate.exchange(url, method, requestEntity, String.class); - - //----------------------------------- - // 응답 처리 - //----------------------------------- - HttpStatus statusCode = responseEntity.getStatusCode(); - log.debug("RES StatusCode : " + statusCode); - String resultXML = ""; - resultXML = responseEntity.getBody(); - log.debug("RES resultXML : " + resultXML); - - // 응답 자료 객체화 - resVO = DataApiInterface.convertXmlToResVO(resultXML); - - // 처리결과 코드 확인 - if(StringUtil.isEmpty(resVO.getResultCode())) { - if (statusCode == HttpStatus.OK) { - resVO.setResultCode("S_HTTP_STATUS_OK"); - resVO.setResultMessage("정상처리되었습니다."); - } else { - resVO.setResultCode("E_STATUS_CODE_FAIL"); - resVO.setResultMessage(String.format("처리에 실패하였습니다. (HTTP상태코드 : %s)", statusCode.toString())); - } - } - - //log.debug("RES resVO : " + resVO); - - } catch(Exception e) { - e.printStackTrace(); - return DataApiInterface.makeErrorRes("E_REQ_EXCEPTION", e.toString()); - } - - return resVO; - } - - -} +package nlib.restful.service.impl; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.http.HttpEntity; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.util.MultiValueMap; +import org.springframework.web.client.RestTemplate; + +import nlib.restful.service.DataApiReqVO; +import nlib.restful.service.DataApiResVO; +import nlib.restful.service.DataApiInterface; +import nlib.util.StringUtil; + +/** + *
    + * @Class Name : DataApiRESTful.java
    + * 
    + * @Description : 통합자료관리시스템에 RESTful API를 통해 질의/응답을 처리한다.
    + * 
    + * 
    + * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    + *
    + * 
    + * + * @ ------------ -------- --------------------------- + * @ 수정일 수정자 수정내용 + * @ ------------ -------- --------------------------- + * @ 2021. 6. 22. KNKIM 최초 생성 + * + * + * @author 이씨플라자 * DIGITALSHIP KNKIM + * @since 2021. 6. 22. + * @version 1.0 + * + */ +public class DataApiRESTful implements DataApiInterface { + + private static final Logger log = LoggerFactory.getLogger(DataApiRESTful.class); + + /* DataApi 접속 서버 정보 */ + @Value("#{properties['dataapi.server.ip']}") + private String DAPI_SERVER_IP; + + @Value("#{properties['dataapi.server.port']}") + private String DAPI_SERVER_PORT; + + @Value("#{properties['dataapi.server.protocol']}") + private String DAPI_SERVER_PROTOCOL; + + + /** + * 조회 + * + * @param reqVO + * @return + */ + public DataApiResVO get(DataApiReqVO reqVO) { + + return send(reqVO, HttpMethod.GET); + } + + /** + * 등록 + * + * @param reqVO + * @return + */ + public DataApiResVO put(DataApiReqVO reqVO) { + return send(reqVO, HttpMethod.PUT); + } + + /** + * 수정 + * + * @param reqVO + * @return + */ + public DataApiResVO post(DataApiReqVO reqVO) { + return send(reqVO, HttpMethod.POST); + } + + /** + * 삭제 + * + * @param reqVO + * @return + */ + public DataApiResVO delete (DataApiReqVO reqVO) { + return send(reqVO, HttpMethod.DELETE); + } + + /** + * 실제 RESTful API 서버로 요청을 전송하고, 응답받은 자료를 응답VO에 담아서 리턴한다. + * + * @param reqVO + * @param method + * @return + */ + public DataApiResVO send(DataApiReqVO reqVO, HttpMethod method) { + + DataApiResVO resVO = null; + + try { + //----------------------------------- + // 입력값 검증작업 + //----------------------------------- + resVO = DataApiInterface.checkReqCommonParams(reqVO); + if(resVO != null) return resVO; + if(method == null) return new DataApiResVO("ERR_NO_METHOD", "HTTP 요청 Method가 유효하지 않습니다."); + + //----------------------------------- + // 폼 파라메터 생성 작업 + //----------------------------------- + HttpHeaders headers = new HttpHeaders(); + headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED); + MultiValueMap parameters = DataApiInterface.makeParamMap(reqVO); + HttpEntity> requestEntity = new HttpEntity(parameters, headers); + + //----------------------------------- + // 요청 처리 + //----------------------------------- + RestTemplate restTemplate = new RestTemplate(); + String url = DAPI_SERVER_PROTOCOL + "://" + DAPI_SERVER_IP + ("80".equals(DAPI_SERVER_PORT) ? "" : ":" + DAPI_SERVER_PORT) + reqVO.getReqUrl(); + log.debug("REQ URL : " + reqVO.getReqUrl()); + + ResponseEntity responseEntity = restTemplate.exchange(url, method, requestEntity, String.class); + + //----------------------------------- + // 응답 처리 + //----------------------------------- + HttpStatus statusCode = responseEntity.getStatusCode(); + log.debug("RES StatusCode : " + statusCode); + String resultXML = ""; + resultXML = responseEntity.getBody(); + log.debug("RES resultXML : " + resultXML); + + // 응답 자료 객체화 + resVO = DataApiInterface.convertXmlToResVO(resultXML); + + // 처리결과 코드 확인 + if(StringUtil.isEmpty(resVO.getResultCode())) { + if (statusCode == HttpStatus.OK) { + resVO.setResultCode("S_HTTP_STATUS_OK"); + resVO.setResultMessage("정상처리되었습니다."); + } else { + resVO.setResultCode("E_STATUS_CODE_FAIL"); + resVO.setResultMessage(String.format("처리에 실패하였습니다. (HTTP상태코드 : %s)", statusCode.toString())); + } + } + + //log.debug("RES resVO : " + resVO); + + } catch(Exception e) { + e.printStackTrace(); + return DataApiInterface.makeErrorRes("E_REQ_EXCEPTION", e.toString()); + } + + return resVO; + } + + +} diff --git a/src/main/java/nlib/restful/service/impl/DataApiTempXml.java b/src/main/java/nlib/restful/service/impl/DataApiTempXml.java index 73804a8a..7d13a327 100644 --- a/src/main/java/nlib/restful/service/impl/DataApiTempXml.java +++ b/src/main/java/nlib/restful/service/impl/DataApiTempXml.java @@ -1,216 +1,216 @@ -package nlib.restful.service.impl; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStreamReader; -import java.nio.charset.StandardCharsets; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.http.HttpEntity; -import org.springframework.http.HttpHeaders; -import org.springframework.http.HttpMethod; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.util.MultiValueMap; - -import com.fasterxml.jackson.dataformat.xml.XmlMapper; - -import nlib.restful.service.DataApiReqVO; -import nlib.restful.service.DataApiResVO; -import nlib.restful.service.DataApiServerResponseVO; -import nlib.restful.service.DataApiInterface; -import nlib.util.StringUtil; - -/** - *
    - * @Class Name : DataApiTempXml.java
    - * 
    - * @Description : DataAPI의 요청에 대해서 로컬의 테스트용 XML 파일을 읽어서 응답을 처리한다. (자체 선개발 진행용) 
    - * 
    - * 
    - * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    - *
    - * 
    - * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 2021. 7. 9. KNKIM 최초 생성 - * - * - * @author 이씨플라자 * DIGITALSHIP KNKIM - * @since 2021. 7. 9. - * @version 1.0 - * - */ -public class DataApiTempXml implements DataApiInterface { - - private static final Logger log = LoggerFactory.getLogger(DataApiTempXml.class); - - /* DataApi 접속 서버 정보 */ - @Value("#{properties['dataapi.temp.xml.path']}") - private String DAPI_TEMP_XML_PATH; - - - /** - * 조회 - * - * @param reqVO - * @return - */ - public DataApiResVO get(DataApiReqVO reqVO) { - - return send(reqVO, HttpMethod.GET); - } - - /** - * 등록 - * - * @param reqVO - * @return - */ - public DataApiResVO put(DataApiReqVO reqVO) { - return send(reqVO, HttpMethod.PUT); - } - - /** - * 수정 - * - * @param reqVO - * @return - */ - public DataApiResVO post(DataApiReqVO reqVO) { - return send(reqVO, HttpMethod.POST); - } - - /** - * 삭제 - * - * @param reqVO - * @return - */ - public DataApiResVO delete (DataApiReqVO reqVO) { - return send(reqVO, HttpMethod.DELETE); - } - - /** - * 실제 RESTful API 서버로 요청을 전송하고, 응답받은 자료를 응답VO에 담아서 리턴한다. - * - * @param reqVO - * @param method - * @return - */ - public DataApiResVO send(DataApiReqVO reqVO, HttpMethod method) { - - DataApiResVO resVO = null; - - try { - //----------------------------------- - // 입력값 검증작업 - //----------------------------------- - resVO = DataApiInterface.checkReqCommonParams(reqVO); - if(resVO != null) return resVO; - if(method == null) return new DataApiResVO("ERR_NO_METHOD", "HTTP 요청 Method가 유효하지 않습니다."); - - //----------------------------------- - // 폼 파라메터 생성 작업 - //----------------------------------- - HttpHeaders headers = new HttpHeaders(); - headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED); - MultiValueMap parameters = DataApiInterface.makeParamMap(reqVO); - HttpEntity> requestEntity = new HttpEntity(parameters, headers); - - //----------------------------------- - // 응답 처리 - //----------------------------------- - HttpStatus statusCode = HttpStatus.OK; - String resultXML = getTempDataFromXmlFile(reqVO, method); - //log.debug("RES resultXML : " + resultXML); - - // 응답 자료 객체화 - resVO = DataApiInterface.convertXmlToResVO(resultXML); - - // 처리결과 코드 확인 - if(StringUtil.isEmpty(resVO.getResultCode())) { - if (statusCode == HttpStatus.OK) { - resVO.setResultCode("S_HTTP_STATUS_OK"); - resVO.setResultMessage("정상처리되었습니다."); - } else { - resVO.setResultCode("E_STATUS_CODE_FAIL"); - resVO.setResultMessage(String.format("처리에 실패하였습니다. (HTTP상태코드 : %s)", statusCode.toString())); - } - } - - //log.debug("RES resVO : " + resVO); - - } catch(Exception e) { - e.printStackTrace(); - return DataApiInterface.makeErrorRes("E_REQ_EXCEPTION", e.toString()); - } - - return resVO; - } - - /** - * 요청 URI와 메소드를 기반으로 임시 응답 XML 파일을 찾아서 내용을 문자열로 리턴한다. - * - * @param reqVO - * @param method - * @return - * @throws Exception - */ - private String getTempDataFromXmlFile(DataApiReqVO reqVO, HttpMethod method) throws Exception { - - String fileName = reqVO.getReqUrl().substring(1).replaceAll("/", "."); - String xmlPath = DAPI_TEMP_XML_PATH + "/" + fileName + "_" + method.toString().toUpperCase() + ".xml"; - String returnXmlStr = null; - - log.info("XML FILE PATH : " + xmlPath); - - - DataApiServerResponseVO resVO = null; - - File xmlFile = new File(xmlPath); - if(!xmlFile.exists()) { - resVO = new DataApiServerResponseVO("-20", String.format("%s 파일을 찾을 수 없습니다.",xmlPath)); - XmlMapper mapper = new XmlMapper(); - returnXmlStr = mapper.writer().withRootName("result").writeValueAsString(resVO); - } - - if(resVO == null && !xmlFile.isFile()) { - resVO = new DataApiServerResponseVO("-21", String.format("%s는 파일이어야 합니다.",xmlPath)); - XmlMapper mapper = new XmlMapper(); - returnXmlStr = mapper.writer().withRootName("result").writeValueAsString(resVO); - } - - if(resVO == null) { - StringBuilder strBd = new StringBuilder(); - - try (BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(xmlPath),StandardCharsets.UTF_8))) { - - String line; - int i = 0; - while ((line = br.readLine()) != null) { - strBd.append(line + "\n"); - } - returnXmlStr = strBd.toString(); - } catch (IOException e) { - log.error("XML 파일 읽는 중 오류 발생 : " + e.toString()); - e.printStackTrace(); - - resVO = new DataApiServerResponseVO("-22", String.format("%s 파일을 읽는 중 오류가 발생하였습니다(%s). ",xmlPath, e.toString())); - XmlMapper mapper = new XmlMapper(); - returnXmlStr = mapper.writer().withRootName("result").writeValueAsString(resVO); - } - - } - - log.info("RESUTN XML STR : " + returnXmlStr); - return returnXmlStr; - } - -} +package nlib.restful.service.impl; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStreamReader; +import java.nio.charset.StandardCharsets; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.http.HttpEntity; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.util.MultiValueMap; + +import com.fasterxml.jackson.dataformat.xml.XmlMapper; + +import nlib.restful.service.DataApiReqVO; +import nlib.restful.service.DataApiResVO; +import nlib.restful.service.DataApiServerResponseVO; +import nlib.restful.service.DataApiInterface; +import nlib.util.StringUtil; + +/** + *
    + * @Class Name : DataApiTempXml.java
    + * 
    + * @Description : DataAPI의 요청에 대해서 로컬의 테스트용 XML 파일을 읽어서 응답을 처리한다. (자체 선개발 진행용) 
    + * 
    + * 
    + * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    + *
    + * 
    + * + * @ ------------ -------- --------------------------- + * @ 수정일 수정자 수정내용 + * @ ------------ -------- --------------------------- + * @ 2021. 7. 9. KNKIM 최초 생성 + * + * + * @author 이씨플라자 * DIGITALSHIP KNKIM + * @since 2021. 7. 9. + * @version 1.0 + * + */ +public class DataApiTempXml implements DataApiInterface { + + private static final Logger log = LoggerFactory.getLogger(DataApiTempXml.class); + + /* DataApi 접속 서버 정보 */ + @Value("#{properties['dataapi.temp.xml.path']}") + private String DAPI_TEMP_XML_PATH; + + + /** + * 조회 + * + * @param reqVO + * @return + */ + public DataApiResVO get(DataApiReqVO reqVO) { + + return send(reqVO, HttpMethod.GET); + } + + /** + * 등록 + * + * @param reqVO + * @return + */ + public DataApiResVO put(DataApiReqVO reqVO) { + return send(reqVO, HttpMethod.PUT); + } + + /** + * 수정 + * + * @param reqVO + * @return + */ + public DataApiResVO post(DataApiReqVO reqVO) { + return send(reqVO, HttpMethod.POST); + } + + /** + * 삭제 + * + * @param reqVO + * @return + */ + public DataApiResVO delete (DataApiReqVO reqVO) { + return send(reqVO, HttpMethod.DELETE); + } + + /** + * 실제 RESTful API 서버로 요청을 전송하고, 응답받은 자료를 응답VO에 담아서 리턴한다. + * + * @param reqVO + * @param method + * @return + */ + public DataApiResVO send(DataApiReqVO reqVO, HttpMethod method) { + + DataApiResVO resVO = null; + + try { + //----------------------------------- + // 입력값 검증작업 + //----------------------------------- + resVO = DataApiInterface.checkReqCommonParams(reqVO); + if(resVO != null) return resVO; + if(method == null) return new DataApiResVO("ERR_NO_METHOD", "HTTP 요청 Method가 유효하지 않습니다."); + + //----------------------------------- + // 폼 파라메터 생성 작업 + //----------------------------------- + HttpHeaders headers = new HttpHeaders(); + headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED); + MultiValueMap parameters = DataApiInterface.makeParamMap(reqVO); + HttpEntity> requestEntity = new HttpEntity(parameters, headers); + + //----------------------------------- + // 응답 처리 + //----------------------------------- + HttpStatus statusCode = HttpStatus.OK; + String resultXML = getTempDataFromXmlFile(reqVO, method); + //log.debug("RES resultXML : " + resultXML); + + // 응답 자료 객체화 + resVO = DataApiInterface.convertXmlToResVO(resultXML); + + // 처리결과 코드 확인 + if(StringUtil.isEmpty(resVO.getResultCode())) { + if (statusCode == HttpStatus.OK) { + resVO.setResultCode("S_HTTP_STATUS_OK"); + resVO.setResultMessage("정상처리되었습니다."); + } else { + resVO.setResultCode("E_STATUS_CODE_FAIL"); + resVO.setResultMessage(String.format("처리에 실패하였습니다. (HTTP상태코드 : %s)", statusCode.toString())); + } + } + + //log.debug("RES resVO : " + resVO); + + } catch(Exception e) { + e.printStackTrace(); + return DataApiInterface.makeErrorRes("E_REQ_EXCEPTION", e.toString()); + } + + return resVO; + } + + /** + * 요청 URI와 메소드를 기반으로 임시 응답 XML 파일을 찾아서 내용을 문자열로 리턴한다. + * + * @param reqVO + * @param method + * @return + * @throws Exception + */ + private String getTempDataFromXmlFile(DataApiReqVO reqVO, HttpMethod method) throws Exception { + + String fileName = reqVO.getReqUrl().substring(1).replaceAll("/", "."); + String xmlPath = DAPI_TEMP_XML_PATH + "/" + fileName + "_" + method.toString().toUpperCase() + ".xml"; + String returnXmlStr = null; + + log.info("XML FILE PATH : " + xmlPath); + + + DataApiServerResponseVO resVO = null; + + File xmlFile = new File(xmlPath); + if(!xmlFile.exists()) { + resVO = new DataApiServerResponseVO("-20", String.format("%s 파일을 찾을 수 없습니다.",xmlPath)); + XmlMapper mapper = new XmlMapper(); + returnXmlStr = mapper.writer().withRootName("result").writeValueAsString(resVO); + } + + if(resVO == null && !xmlFile.isFile()) { + resVO = new DataApiServerResponseVO("-21", String.format("%s는 파일이어야 합니다.",xmlPath)); + XmlMapper mapper = new XmlMapper(); + returnXmlStr = mapper.writer().withRootName("result").writeValueAsString(resVO); + } + + if(resVO == null) { + StringBuilder strBd = new StringBuilder(); + + try (BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(xmlPath),StandardCharsets.UTF_8))) { + + String line; + int i = 0; + while ((line = br.readLine()) != null) { + strBd.append(line + "\n"); + } + returnXmlStr = strBd.toString(); + } catch (IOException e) { + log.error("XML 파일 읽는 중 오류 발생 : " + e.toString()); + e.printStackTrace(); + + resVO = new DataApiServerResponseVO("-22", String.format("%s 파일을 읽는 중 오류가 발생하였습니다(%s). ",xmlPath, e.toString())); + XmlMapper mapper = new XmlMapper(); + returnXmlStr = mapper.writer().withRootName("result").writeValueAsString(resVO); + } + + } + + log.info("RESUTN XML STR : " + returnXmlStr); + return returnXmlStr; + } + +} diff --git a/src/main/java/nlib/sample/service/SampleDataApiService.java b/src/main/java/nlib/sample/service/SampleDataApiService.java index ba272f70..6be6c327 100644 --- a/src/main/java/nlib/sample/service/SampleDataApiService.java +++ b/src/main/java/nlib/sample/service/SampleDataApiService.java @@ -1,32 +1,32 @@ -package nlib.sample.service; - -import nlib.restful.service.DataApiReqVO; -import nlib.restful.service.DataApiResVO; - -/** - *
    - * @Class Name : SampleDataApiService.java
    - * 
    - * @Description : RESTful API 호출 샘플
    - * 
    - * 
    - * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    - *
    - * 
    - * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 2021. 6. 22. KNKIM 최초 생성 - * - * - * @author 이씨플라자 * DIGITALSHIP KNKIM - * @since 2021. 6. 22. - * @version 1.0 - * - */ -public interface SampleDataApiService { - - public DataApiResVO getSampleInfo(DataApiReqVO reqVO) throws Exception; - -} +package nlib.sample.service; + +import nlib.restful.service.DataApiReqVO; +import nlib.restful.service.DataApiResVO; + +/** + *
    + * @Class Name : SampleDataApiService.java
    + * 
    + * @Description : RESTful API 호출 샘플
    + * 
    + * 
    + * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    + *
    + * 
    + * + * @ ------------ -------- --------------------------- + * @ 수정일 수정자 수정내용 + * @ ------------ -------- --------------------------- + * @ 2021. 6. 22. KNKIM 최초 생성 + * + * + * @author 이씨플라자 * DIGITALSHIP KNKIM + * @since 2021. 6. 22. + * @version 1.0 + * + */ +public interface SampleDataApiService { + + public DataApiResVO getSampleInfo(DataApiReqVO reqVO) throws Exception; + +} diff --git a/src/main/java/nlib/sample/service/impl/SampleDataApiDAO.java b/src/main/java/nlib/sample/service/impl/SampleDataApiDAO.java index 43c3b769..d3f48a58 100644 --- a/src/main/java/nlib/sample/service/impl/SampleDataApiDAO.java +++ b/src/main/java/nlib/sample/service/impl/SampleDataApiDAO.java @@ -1,47 +1,47 @@ -package nlib.sample.service.impl; - -import org.springframework.stereotype.Repository; - -import nlib.restful.DataApi; -import nlib.restful.service.DataApiReqVO; -import nlib.restful.service.DataApiResVO; - -/** - *
    - * @Class Name : SampleDataApiDAO.java
    - * 
    - * @Description : RESTful API 호출 샘플
    - * 
    - * 
    - * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    - *
    - * 
    - * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 2021. 6. 22. KNKIM 최초 생성 - * - * - * @author 이씨플라자 * DIGITALSHIP KNKIM - * @since 2021. 6. 22. - * @version 1.0 - * - */ -@Repository("sampleDataApiDAO") -public class SampleDataApiDAO extends DataApi { - - /** - * 주 자원의 URI - */ - public static final String RESOURCE_URI = "/uac/service/exports"; - - public DataApiResVO getSampleInfo(DataApiReqVO reqVO) throws Exception { - - // URI가 다른 경우, 해당 URI 설정 - reqVO.setReqUrl(RESOURCE_URI); - - return get(reqVO); - } - -} +package nlib.sample.service.impl; + +import org.springframework.stereotype.Repository; + +import nlib.restful.DataApi; +import nlib.restful.service.DataApiReqVO; +import nlib.restful.service.DataApiResVO; + +/** + *
    + * @Class Name : SampleDataApiDAO.java
    + * 
    + * @Description : RESTful API 호출 샘플
    + * 
    + * 
    + * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    + *
    + * 
    + * + * @ ------------ -------- --------------------------- + * @ 수정일 수정자 수정내용 + * @ ------------ -------- --------------------------- + * @ 2021. 6. 22. KNKIM 최초 생성 + * + * + * @author 이씨플라자 * DIGITALSHIP KNKIM + * @since 2021. 6. 22. + * @version 1.0 + * + */ +@Repository("sampleDataApiDAO") +public class SampleDataApiDAO extends DataApi { + + /** + * 주 자원의 URI + */ + public static final String RESOURCE_URI = "/uac/service/exports"; + + public DataApiResVO getSampleInfo(DataApiReqVO reqVO) throws Exception { + + // URI가 다른 경우, 해당 URI 설정 + reqVO.setReqUrl(RESOURCE_URI); + + return get(reqVO); + } + +} diff --git a/src/main/java/nlib/sample/service/impl/SampleDataApiServiceImpl.java b/src/main/java/nlib/sample/service/impl/SampleDataApiServiceImpl.java index ccf9ee1a..10d87081 100644 --- a/src/main/java/nlib/sample/service/impl/SampleDataApiServiceImpl.java +++ b/src/main/java/nlib/sample/service/impl/SampleDataApiServiceImpl.java @@ -1,44 +1,44 @@ -package nlib.sample.service.impl; - -import javax.annotation.Resource; - -import org.springframework.stereotype.Service; - -import nlib.restful.service.DataApiReqVO; -import nlib.restful.service.DataApiResVO; -import nlib.sample.service.SampleDataApiService; - -/** - *
    - * @Class Name : SampleDataApiServiceImpl.java
    - * 
    - * @Description : RESTful API 호출 샘플
    - * 
    - * 
    - * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    - *
    - * 
    - * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 2021. 6. 22. KNKIM 최초 생성 - * - * - * @author 이씨플라자 * DIGITALSHIP KNKIM - * @since 2021. 6. 22. - * @version 1.0 - * - */ -@Service("sampleDataApiService") -public class SampleDataApiServiceImpl implements SampleDataApiService { - - /** SampleDataApiDAO */ - @Resource(name = "sampleDataApiDAO") - private SampleDataApiDAO sampleDataApiDAO; - - public DataApiResVO getSampleInfo(DataApiReqVO reqVO) throws Exception { - return sampleDataApiDAO.getSampleInfo(reqVO); - } - -} +package nlib.sample.service.impl; + +import javax.annotation.Resource; + +import org.springframework.stereotype.Service; + +import nlib.restful.service.DataApiReqVO; +import nlib.restful.service.DataApiResVO; +import nlib.sample.service.SampleDataApiService; + +/** + *
    + * @Class Name : SampleDataApiServiceImpl.java
    + * 
    + * @Description : RESTful API 호출 샘플
    + * 
    + * 
    + * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    + *
    + * 
    + * + * @ ------------ -------- --------------------------- + * @ 수정일 수정자 수정내용 + * @ ------------ -------- --------------------------- + * @ 2021. 6. 22. KNKIM 최초 생성 + * + * + * @author 이씨플라자 * DIGITALSHIP KNKIM + * @since 2021. 6. 22. + * @version 1.0 + * + */ +@Service("sampleDataApiService") +public class SampleDataApiServiceImpl implements SampleDataApiService { + + /** SampleDataApiDAO */ + @Resource(name = "sampleDataApiDAO") + private SampleDataApiDAO sampleDataApiDAO; + + public DataApiResVO getSampleInfo(DataApiReqVO reqVO) throws Exception { + return sampleDataApiDAO.getSampleInfo(reqVO); + } + +} diff --git a/src/main/java/nlib/sample/web/BarcodeController.java b/src/main/java/nlib/sample/web/BarcodeController.java index 8d37dbaa..109c6353 100644 --- a/src/main/java/nlib/sample/web/BarcodeController.java +++ b/src/main/java/nlib/sample/web/BarcodeController.java @@ -1,104 +1,104 @@ -package nlib.sample.web; - -import java.awt.image.BufferedImage; -import java.io.ByteArrayOutputStream; - -import javax.annotation.Resource; -import javax.imageio.ImageIO; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.http.MediaType; -import org.springframework.security.access.annotation.Secured; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.stereotype.Controller; -import org.springframework.ui.ModelMap; -import org.springframework.web.bind.annotation.ModelAttribute; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.ResponseBody; - -import nlib.cmm.qrcode.QRCodeUtil; -import nlib.user.service.NlibLoginVO; -import nlib.util.StringUtil; - -@Controller -public class BarcodeController { - - private static final Logger log = LoggerFactory.getLogger(BarcodeController.class); - - /** QRCodeService */ - @Resource(name = "qrCodeService") - private QRCodeUtil qrCodeService; - - /** - * 샘플 : 회원정보를 입력받을 수 있는 폼을 구성하여 표출한다. - * - * @param request - * @param response - * @return - * @throws Exception - */ - @RequestMapping(value="/sample/barcode/getMemberQRCodeForm.do", produces=MediaType.IMAGE_JPEG_VALUE) - @Secured("ROLE_ADMIN") - public String getMemberQRCodeForm(@ModelAttribute("loginVO") NlibLoginVO loginVO, ModelMap model) throws Exception { - - log.debug("getMemberQRCodeForm : loginVO=" + loginVO.toString()); - - if(StringUtil.isEmpty(loginVO.getUniqId())) loginVO.setUniqId("USER0001-000001"); - if(StringUtil.isEmpty(loginVO.getEmail())) loginVO.setEmail("myid@digitalship.co.kr"); - if(StringUtil.isEmpty(loginVO.getName())) loginVO.setName("홍길동"); - - model.addAttribute("loginVO", loginVO); - - return "nlib/sample/getMemberInfoFromQRCode"; - } - - /** - * 샘플 : 입력받은 회원정보를 가지고 QR 2D 바코드를 생성하는 예를 보여준다. - * 결과값은 JPG 바코드 이미지 이다. (Zxing Lib 사용) - * - * @param request - * @param response - * @return - * @throws Exception - */ - @RequestMapping(value="/sample/barcode/getMemberQRCode.do", produces=MediaType.IMAGE_JPEG_VALUE) - public @ResponseBody byte[] getMemberQRCode(@ModelAttribute("loginVO") NlibLoginVO loginVO, HttpServletRequest request, HttpServletResponse response) throws Exception { - - log.debug("getMemberQRCode : loginVO=" + loginVO.toString()); - - BufferedImage bufferedImage = qrCodeService.generateMemberQRCodeImage(loginVO); - - ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); - ImageIO.write( bufferedImage , "jpg", byteArrayOutputStream); - byte[] bs = byteArrayOutputStream.toByteArray(); - response.setContentLength(bs.length); - - return byteArrayOutputStream.toByteArray(); - } - - - /** - * 샘플 : 회원정보 QR 2D 바코드 내용을 입력받아 사용자VO 정보를 추출하는 예를 보여준다. - * - * @param request - * @param response - * @return - * @throws Exception - */ - @RequestMapping(value="/sample/barcode/getMemberInfoFromQRCode.do") - public String getMemberInfoFromQRCode(@RequestParam String barcodeText, ModelMap model) throws Exception { - - log.debug("getMemberInfoFromQRCode : barcodeText=" + barcodeText); - - NlibLoginVO loginVO = qrCodeService.getMemberInfoFromQRCode(barcodeText); - log.debug("getMemberInfoFromQRCode : loginVO=" + loginVO.toString()); - - model.addAttribute("loginVO", loginVO); - - return "nlib/sample/getMemberInfoFromQRCode"; - } -} +package nlib.sample.web; + +import java.awt.image.BufferedImage; +import java.io.ByteArrayOutputStream; + +import javax.annotation.Resource; +import javax.imageio.ImageIO; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.http.MediaType; +import org.springframework.security.access.annotation.Secured; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.ModelAttribute; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; + +import nlib.cmm.qrcode.QRCodeUtil; +import nlib.user.service.NlibLoginVO; +import nlib.util.StringUtil; + +@Controller +public class BarcodeController { + + private static final Logger log = LoggerFactory.getLogger(BarcodeController.class); + + /** QRCodeService */ + @Resource(name = "qrCodeService") + private QRCodeUtil qrCodeService; + + /** + * 샘플 : 회원정보를 입력받을 수 있는 폼을 구성하여 표출한다. + * + * @param request + * @param response + * @return + * @throws Exception + */ + @RequestMapping(value="/sample/barcode/getMemberQRCodeForm.do", produces=MediaType.IMAGE_JPEG_VALUE) + @Secured("ROLE_ADMIN") + public String getMemberQRCodeForm(@ModelAttribute("loginVO") NlibLoginVO loginVO, ModelMap model) throws Exception { + + log.debug("getMemberQRCodeForm : loginVO=" + loginVO.toString()); + + if(StringUtil.isEmpty(loginVO.getUniqId())) loginVO.setUniqId("USER0001-000001"); + if(StringUtil.isEmpty(loginVO.getEmail())) loginVO.setEmail("myid@digitalship.co.kr"); + if(StringUtil.isEmpty(loginVO.getName())) loginVO.setName("홍길동"); + + model.addAttribute("loginVO", loginVO); + + return "nlib/sample/getMemberInfoFromQRCode"; + } + + /** + * 샘플 : 입력받은 회원정보를 가지고 QR 2D 바코드를 생성하는 예를 보여준다. + * 결과값은 JPG 바코드 이미지 이다. (Zxing Lib 사용) + * + * @param request + * @param response + * @return + * @throws Exception + */ + @RequestMapping(value="/sample/barcode/getMemberQRCode.do", produces=MediaType.IMAGE_JPEG_VALUE) + public @ResponseBody byte[] getMemberQRCode(@ModelAttribute("loginVO") NlibLoginVO loginVO, HttpServletRequest request, HttpServletResponse response) throws Exception { + + log.debug("getMemberQRCode : loginVO=" + loginVO.toString()); + + BufferedImage bufferedImage = qrCodeService.generateMemberQRCodeImage(loginVO); + + ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); + ImageIO.write( bufferedImage , "jpg", byteArrayOutputStream); + byte[] bs = byteArrayOutputStream.toByteArray(); + response.setContentLength(bs.length); + + return byteArrayOutputStream.toByteArray(); + } + + + /** + * 샘플 : 회원정보 QR 2D 바코드 내용을 입력받아 사용자VO 정보를 추출하는 예를 보여준다. + * + * @param request + * @param response + * @return + * @throws Exception + */ + @RequestMapping(value="/sample/barcode/getMemberInfoFromQRCode.do") + public String getMemberInfoFromQRCode(@RequestParam String barcodeText, ModelMap model) throws Exception { + + log.debug("getMemberInfoFromQRCode : barcodeText=" + barcodeText); + + NlibLoginVO loginVO = qrCodeService.getMemberInfoFromQRCode(barcodeText); + log.debug("getMemberInfoFromQRCode : loginVO=" + loginVO.toString()); + + model.addAttribute("loginVO", loginVO); + + return "nlib/sample/getMemberInfoFromQRCode"; + } +} diff --git a/src/main/java/nlib/sample/web/SampleDataApiController.java b/src/main/java/nlib/sample/web/SampleDataApiController.java index ed1efd6a..d348f7f0 100644 --- a/src/main/java/nlib/sample/web/SampleDataApiController.java +++ b/src/main/java/nlib/sample/web/SampleDataApiController.java @@ -1,85 +1,85 @@ -package nlib.sample.web; - -import java.util.Map; - -import javax.annotation.Resource; - -import org.springframework.beans.factory.annotation.Value; -import org.springframework.stereotype.Controller; -import org.springframework.ui.ModelMap; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; - -import nlib.restful.service.DataApiReqVO; -import nlib.restful.service.DataApiResVO; -import nlib.sample.service.SampleDataApiService; - -/** - *
    - * @Class Name : SampleDataApiController.java
    - * 
    - * @Description : RESTful API 호출 샘플
    - * 
    - * 
    - * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    - *
    - * 
    - * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 2021. 6. 22. KNKIM 최초 생성 - * - * - * @author 이씨플라자 * DIGITALSHIP KNKIM - * @since 2021. 6. 22. - * @version 1.0 - * - */ -@Controller -public class SampleDataApiController { - - /** SampleDataApiService */ - @Resource(name = "sampleDataApiService") - private SampleDataApiService sampleDataApiService; - - - /* DataApi 접속 서버 정보 */ - @Value("#{properties['dataapi.server.ip']}") - private String dataapiServerIp; - - @Value("#{properties['dataapi.server.port']}") - private String dataapiServerPort; - - @Value("#{properties['dataapi.server.protocol']}") - private String dataapiServerProtocol; - - - @RequestMapping("/sample/getSampleInfoForm.do") - public String getSampleInfoForm(ModelMap model) throws Exception { - - model.addAttribute("serverProtocol", dataapiServerIp); - model.addAttribute("serverIp", dataapiServerPort); - model.addAttribute("serverPort", dataapiServerProtocol); - return "nlib/sample/getSampleInfoForm"; - } - - @RequestMapping("/sample/getSampleInfo.do") - public String getSampleInfo(@RequestParam Map commandMap, ModelMap model) throws Exception { - - String authKey = (String) commandMap.get("authKey"); - String page = (String) commandMap.get("page"); - String rows = (String) commandMap.get("rows"); - - DataApiReqVO reqVO = new DataApiReqVO(); - reqVO.setAuthKey(authKey); - reqVO.setPageIndex(page); - reqVO.setPageSize(rows); - - DataApiResVO resVO = sampleDataApiService.getSampleInfo(reqVO); - model.addAttribute("result", resVO); - - return "nlib/sample/getSampleInfo"; - } - -} +package nlib.sample.web; + +import java.util.Map; + +import javax.annotation.Resource; + +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; + +import nlib.restful.service.DataApiReqVO; +import nlib.restful.service.DataApiResVO; +import nlib.sample.service.SampleDataApiService; + +/** + *
    + * @Class Name : SampleDataApiController.java
    + * 
    + * @Description : RESTful API 호출 샘플
    + * 
    + * 
    + * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    + *
    + * 
    + * + * @ ------------ -------- --------------------------- + * @ 수정일 수정자 수정내용 + * @ ------------ -------- --------------------------- + * @ 2021. 6. 22. KNKIM 최초 생성 + * + * + * @author 이씨플라자 * DIGITALSHIP KNKIM + * @since 2021. 6. 22. + * @version 1.0 + * + */ +@Controller +public class SampleDataApiController { + + /** SampleDataApiService */ + @Resource(name = "sampleDataApiService") + private SampleDataApiService sampleDataApiService; + + + /* DataApi 접속 서버 정보 */ + @Value("#{properties['dataapi.server.ip']}") + private String dataapiServerIp; + + @Value("#{properties['dataapi.server.port']}") + private String dataapiServerPort; + + @Value("#{properties['dataapi.server.protocol']}") + private String dataapiServerProtocol; + + + @RequestMapping("/sample/getSampleInfoForm.do") + public String getSampleInfoForm(ModelMap model) throws Exception { + + model.addAttribute("serverProtocol", dataapiServerIp); + model.addAttribute("serverIp", dataapiServerPort); + model.addAttribute("serverPort", dataapiServerProtocol); + return "nlib/sample/getSampleInfoForm"; + } + + @RequestMapping("/sample/getSampleInfo.do") + public String getSampleInfo(@RequestParam Map commandMap, ModelMap model) throws Exception { + + String authKey = (String) commandMap.get("authKey"); + String page = (String) commandMap.get("page"); + String rows = (String) commandMap.get("rows"); + + DataApiReqVO reqVO = new DataApiReqVO(); + reqVO.setAuthKey(authKey); + reqVO.setPageIndex(page); + reqVO.setPageSize(rows); + + DataApiResVO resVO = sampleDataApiService.getSampleInfo(reqVO); + model.addAttribute("result", resVO); + + return "nlib/sample/getSampleInfo"; + } + +} diff --git a/src/main/java/nlib/sample/web/SampleEncoderController.java b/src/main/java/nlib/sample/web/SampleEncoderController.java index 05a08d9f..fcfee737 100644 --- a/src/main/java/nlib/sample/web/SampleEncoderController.java +++ b/src/main/java/nlib/sample/web/SampleEncoderController.java @@ -1,108 +1,108 @@ -package nlib.sample.web; - -import javax.annotation.Resource; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.stereotype.Controller; -import org.springframework.ui.ModelMap; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; - -import egovframework.rte.fdl.cryptography.EgovEnvCryptoService; -import egovframework.rte.fdl.cryptography.EgovPasswordEncoder; -import egovframework.rte.fdl.cryptography.impl.EgovARIACryptoServiceImpl; -import nlib.cmm.crypto.AriaCrypto; -import nlib.util.StringUtil; - -/** - *
    - * @Class Name : SampleEncoderController.java
    - * 
    - * @Description : 비밀번호 등 인코딩값 조회/생성
    - * 
    - * 
    - * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    - *
    - * 
    - * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 2021. 7. 8. KNKIM 최초 생성 - * - * - * @author 이씨플라자 * DIGITALSHIP KNKIM - * @since 2021. 7. 8. - * @version 1.0 - * - */ -@Controller -public class SampleEncoderController { - - private static final Logger log = LoggerFactory.getLogger(SampleEncoderController.class); - - /** 암호화서비스 */ - @Resource(name = "egovEnvCryptoService") - EgovEnvCryptoService cryptoService; - - @Resource(name = "egovEnvPasswordEncoderService") - EgovPasswordEncoder egovPasswordEncoder; - - - @Resource(name = "ariaCrypto") - AriaCrypto ariaCrypto; - - @Value("#{properties['dataapi.server.ip']}") - private String dataapiServerIp; - - @RequestMapping("/sample/password/getSampleEncoder.do") - public String getSampleInfoForm(ModelMap model - , @RequestParam(required=false) String hash - , @RequestParam(required=false) String plainText - , @RequestParam(required=false) String key - ) throws Exception { - - String msg = null; - String encodedText = null; - String decodedText = null; - - if(StringUtil.isEmpty(hash)) { - msg = "암호화 알고리즘을 선택하여 주시기 바랍니다."; - } else if(StringUtil.isEmpty(plainText)) { - msg = "암호화할 문자열을 입력하여 주시기 바랍니다."; - } else { - - log.debug("암호화 처리 시작 =" + plainText + "="); - - if("sha-256".equals(hash)) { - encodedText = egovPasswordEncoder.encryptPassword(plainText); - } else if("aria".equals(hash)) { - - if(StringUtil.isEmpty(key)) encodedText = ariaCrypto.encode(plainText); - else encodedText = ariaCrypto.encode(plainText, key); - - log.debug(" Aria plainText=" + plainText); - log.debug(" Aria encodedText=" + encodedText); - - if(StringUtil.isEmpty(key)) decodedText = ariaCrypto.decode(encodedText); - else decodedText = ariaCrypto.decode(encodedText, key); - - log.debug(" Aria after decoding, decodedText=" + decodedText); - } else { - msg = "암호화 알고리즘이 적합하지 않습니다."; - } - } - - model.addAttribute("msg", msg); - model.addAttribute("hash", hash); - model.addAttribute("plainText", plainText); - model.addAttribute("encodedText", encodedText); - model.addAttribute("decodedText", decodedText); - model.addAttribute("key", key); - - return "nlib/sample/getSampleEncoder"; - } - -} +package nlib.sample.web; + +import javax.annotation.Resource; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; + +import egovframework.rte.fdl.cryptography.EgovEnvCryptoService; +import egovframework.rte.fdl.cryptography.EgovPasswordEncoder; +import egovframework.rte.fdl.cryptography.impl.EgovARIACryptoServiceImpl; +import nlib.cmm.crypto.AriaCrypto; +import nlib.util.StringUtil; + +/** + *
    + * @Class Name : SampleEncoderController.java
    + * 
    + * @Description : 비밀번호 등 인코딩값 조회/생성
    + * 
    + * 
    + * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    + *
    + * 
    + * + * @ ------------ -------- --------------------------- + * @ 수정일 수정자 수정내용 + * @ ------------ -------- --------------------------- + * @ 2021. 7. 8. KNKIM 최초 생성 + * + * + * @author 이씨플라자 * DIGITALSHIP KNKIM + * @since 2021. 7. 8. + * @version 1.0 + * + */ +@Controller +public class SampleEncoderController { + + private static final Logger log = LoggerFactory.getLogger(SampleEncoderController.class); + + /** 암호화서비스 */ + @Resource(name = "egovEnvCryptoService") + EgovEnvCryptoService cryptoService; + + @Resource(name = "egovEnvPasswordEncoderService") + EgovPasswordEncoder egovPasswordEncoder; + + + @Resource(name = "ariaCrypto") + AriaCrypto ariaCrypto; + + @Value("#{properties['dataapi.server.ip']}") + private String dataapiServerIp; + + @RequestMapping("/sample/password/getSampleEncoder.do") + public String getSampleInfoForm(ModelMap model + , @RequestParam(required=false) String hash + , @RequestParam(required=false) String plainText + , @RequestParam(required=false) String key + ) throws Exception { + + String msg = null; + String encodedText = null; + String decodedText = null; + + if(StringUtil.isEmpty(hash)) { + msg = "암호화 알고리즘을 선택하여 주시기 바랍니다."; + } else if(StringUtil.isEmpty(plainText)) { + msg = "암호화할 문자열을 입력하여 주시기 바랍니다."; + } else { + + log.debug("암호화 처리 시작 =" + plainText + "="); + + if("sha-256".equals(hash)) { + encodedText = egovPasswordEncoder.encryptPassword(plainText); + } else if("aria".equals(hash)) { + + if(StringUtil.isEmpty(key)) encodedText = ariaCrypto.encode(plainText); + else encodedText = ariaCrypto.encode(plainText, key); + + log.debug(" Aria plainText=" + plainText); + log.debug(" Aria encodedText=" + encodedText); + + if(StringUtil.isEmpty(key)) decodedText = ariaCrypto.decode(encodedText); + else decodedText = ariaCrypto.decode(encodedText, key); + + log.debug(" Aria after decoding, decodedText=" + decodedText); + } else { + msg = "암호화 알고리즘이 적합하지 않습니다."; + } + } + + model.addAttribute("msg", msg); + model.addAttribute("hash", hash); + model.addAttribute("plainText", plainText); + model.addAttribute("encodedText", encodedText); + model.addAttribute("decodedText", decodedText); + model.addAttribute("key", key); + + return "nlib/sample/getSampleEncoder"; + } + +} diff --git a/src/main/java/nlib/user/web/userInfoController.java b/src/main/java/nlib/user/web/userInfoController.java index a4c0a2b3..3885cf9d 100644 --- a/src/main/java/nlib/user/web/userInfoController.java +++ b/src/main/java/nlib/user/web/userInfoController.java @@ -1,77 +1,77 @@ - -package nlib.user.web; - -import java.util.HashMap; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.springframework.security.core.Authentication; -import org.springframework.stereotype.Controller; -import org.springframework.ui.ModelMap; -import org.springframework.web.bind.annotation.RequestMapping; - -import nlib.restful.service.DataApiReqVO; -import nlib.security.SecUserVO; - - -/** - *
    - * @Class Name : userInfoController.java
    - * 
    - * @Description : 회원 정보 controller
    - * 
    - * 
    - * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    - *
    - * 
    - * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 2021. 7. 14. JSYOO 최초 생성 - * - * - * @author 이씨플라자 * DIGITALSHIP JSYOO - * @since 2021. 7. 14. - * @version 1.0 - * - */ -@Controller -public class userInfoController { - /** - * 내 정보 조회 - * @exception Exception - */ - @RequestMapping(value="/userInfo/getMyInfo.do") - public String getMyInfo(HttpServletResponse response,HttpServletRequest request) throws Exception{ - return "nlib/userInfo/getMyInfo"; - } - - /** - * 내 정보 수정 - * @exception Exception - */ - @RequestMapping(value="/userInfo/putMyInfo.do") - public String putMyInfo(HttpServletResponse response,HttpServletRequest request,Authentication authentication,ModelMap model) throws Exception{ - SecUserVO vo=(SecUserVO) authentication.getPrincipal(); - - HashMap map = new HashMap(); - map.put("id", vo.getId()); - - //회원 ID로 회원의 정보를 조회해온다. - DataApiReqVO reqvo=new DataApiReqVO(); - reqvo.setInfo(map); - - model.addAttribute("result",vo); - return "nlib/userInfo/putMyInfo"; - } - /** - * 내 정보 수정 전 password 인증 - * @exception Exception - */ - @RequestMapping(value="/userInfo/pwCertMyInfo.do") - public String pwCertMyInfo(HttpServletResponse response,HttpServletRequest request) throws Exception{ - return "nlib/userInfo/pwCertMyInfo"; - } + +package nlib.user.web; + +import java.util.HashMap; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.security.core.Authentication; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.RequestMapping; + +import nlib.restful.service.DataApiReqVO; +import nlib.security.SecUserVO; + + +/** + *
    + * @Class Name : userInfoController.java
    + * 
    + * @Description : 회원 정보 controller
    + * 
    + * 
    + * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    + *
    + * 
    + * + * @ ------------ -------- --------------------------- + * @ 수정일 수정자 수정내용 + * @ ------------ -------- --------------------------- + * @ 2021. 7. 14. JSYOO 최초 생성 + * + * + * @author 이씨플라자 * DIGITALSHIP JSYOO + * @since 2021. 7. 14. + * @version 1.0 + * + */ +@Controller +public class userInfoController { + /** + * 내 정보 조회 + * @exception Exception + */ + @RequestMapping(value="/userInfo/getMyInfo.do") + public String getMyInfo(HttpServletResponse response,HttpServletRequest request) throws Exception{ + return "nlib/userInfo/getMyInfo"; + } + + /** + * 내 정보 수정 + * @exception Exception + */ + @RequestMapping(value="/userInfo/putMyInfo.do") + public String putMyInfo(HttpServletResponse response,HttpServletRequest request,Authentication authentication,ModelMap model) throws Exception{ + SecUserVO vo=(SecUserVO) authentication.getPrincipal(); + + HashMap map = new HashMap(); + map.put("id", vo.getId()); + + //회원 ID로 회원의 정보를 조회해온다. + DataApiReqVO reqvo=new DataApiReqVO(); + reqvo.setInfo(map); + + model.addAttribute("result",vo); + return "nlib/userInfo/putMyInfo"; + } + /** + * 내 정보 수정 전 password 인증 + * @exception Exception + */ + @RequestMapping(value="/userInfo/pwCertMyInfo.do") + public String pwCertMyInfo(HttpServletResponse response,HttpServletRequest request) throws Exception{ + return "nlib/userInfo/pwCertMyInfo"; + } } \ No newline at end of file diff --git a/src/main/java/nlib/util/UUID.java b/src/main/java/nlib/util/UUID.java index 9611b0ea..132fd756 100644 --- a/src/main/java/nlib/util/UUID.java +++ b/src/main/java/nlib/util/UUID.java @@ -1,48 +1,48 @@ -package nlib.util; - -import egovframework.com.utl.fcc.service.EgovFormBasedFileUtil; -import egovframework.com.utl.fcc.service.EgovFormBasedUUID; - -/** - *
    - * @Class Name : UUID.java
    - * 
    - * @Description : UUID를 생성한다. 
    - * 
    - * 
    - * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    - *
    - * 
    - * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 2021. 7. 13. KNKIM 최초 생성 - * - * - * @author 이씨플라자 * DIGITALSHIP KNKIM - * @since 2021. 7. 13. - * @version 1.0 - * - */ -public class UUID { - - /** - * 새로운 UUID를 생성하여 리턴한다. - * - * @return - */ - public static String getNewUUID() { - return EgovFormBasedUUID.randomUUID().toString(); - } - - /** - * 파일용 UUID로 생성한 파일명을 리턴한다. - * - * @return - */ - public static String getPhysicalFileName() { - return "F" + StringUtil.getTimeStamp() + "_" + getNewUUID().replaceAll("-", "").toUpperCase(); - } - -} +package nlib.util; + +import egovframework.com.utl.fcc.service.EgovFormBasedFileUtil; +import egovframework.com.utl.fcc.service.EgovFormBasedUUID; + +/** + *
    + * @Class Name : UUID.java
    + * 
    + * @Description : UUID를 생성한다. 
    + * 
    + * 
    + * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    + *
    + * 
    + * + * @ ------------ -------- --------------------------- + * @ 수정일 수정자 수정내용 + * @ ------------ -------- --------------------------- + * @ 2021. 7. 13. KNKIM 최초 생성 + * + * + * @author 이씨플라자 * DIGITALSHIP KNKIM + * @since 2021. 7. 13. + * @version 1.0 + * + */ +public class UUID { + + /** + * 새로운 UUID를 생성하여 리턴한다. + * + * @return + */ + public static String getNewUUID() { + return EgovFormBasedUUID.randomUUID().toString(); + } + + /** + * 파일용 UUID로 생성한 파일명을 리턴한다. + * + * @return + */ + public static String getPhysicalFileName() { + return "F" + StringUtil.getTimeStamp() + "_" + getNewUUID().replaceAll("-", "").toUpperCase(); + } + +} diff --git a/src/main/resources/egovframework/spring/context-common.xml b/src/main/resources/egovframework/spring/context-common.xml index 8567186a..2a5cd8aa 100644 --- a/src/main/resources/egovframework/spring/context-common.xml +++ b/src/main/resources/egovframework/spring/context-common.xml @@ -1,77 +1,77 @@ - - - - - - - - - - - - - - - - classpath:/egovframework/message/message-common - classpath:/egovframework/rte/fdl/idgnr/messages/idgnr - classpath:/egovframework/rte/fdl/property/messages/properties - - - - 60 - - - - - - - - - - - - - - - - - - * - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + classpath:/egovframework/message/message-common + classpath:/egovframework/rte/fdl/idgnr/messages/idgnr + classpath:/egovframework/rte/fdl/property/messages/properties + + + + 60 + + + + + + + + + + + + + + + + + + * + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/egovframework/spring/context-validator.xml b/src/main/resources/egovframework/spring/context-validator.xml index 0cb5f5df..f128f50f 100644 --- a/src/main/resources/egovframework/spring/context-validator.xml +++ b/src/main/resources/egovframework/spring/context-validator.xml @@ -1,18 +1,18 @@ - - - - - - - + + + + + + + diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml index da51b57d..3b82c206 100644 --- a/src/main/resources/log4j2.xml +++ b/src/main/resources/log4j2.xml @@ -1,26 +1,26 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/nlib/nlib.properties b/src/main/resources/nlib/nlib.properties index e09541ee..501c3e84 100644 --- a/src/main/resources/nlib/nlib.properties +++ b/src/main/resources/nlib/nlib.properties @@ -1,62 +1,62 @@ -#----------------------------------------------------------------------- -# -# nlib.properties : \uc628\ub77c\uc778\uc790\ub8cc\ub300\ucd9c\uad00\ub9ac\uc2dc\uc2a4\ud15c -# -# @\ud504\ub85c\uc81d\ud2b8\uba85: \uc9c0\ubc29\ubb38\ud654\uc6d0 \ud1b5\ud569\uc790\ub8cc\uad00\ub9ac\uc2dc\uc2a4\ud15c \uad6c\ucd95\uc0ac\uc5c5 (2021) -#----------------------------------------------------------------------- -# 1. key = value \uad6c\uc870\uc785\ub2c8\ub2e4. -# 2. key\uac12\uc740 \uacf5\ubc31\ubb38\uc790\ub97c \ud3ec\ud568\ubd88\uac00, value\uac12\uc740 \uacf5\ubc31\ubb38\uc790\ub97c \uac00\ub2a5 -# 3. key\uac12\uc73c\ub85c \ud55c\uae00\uc744 \uc0ac\uc6a9\ubd88\uac00, value\uac12\uc740 \ud55c\uae00\uc0ac\uc6a9\uc774 \uac00\ub2a5 -# 4. \uc904\uc744 \ubc14\uafc0 \ud544\uc694\uac00 \uc788\uc73c\uba74 '\'\ub97c \ub77c\uc778\uc758 \ub05d\uc5d0 \ucd94\uac00(\ub9cc\uc57d '\'\ubb38\uc790\ub97c \uc0ac\uc6a9\ud574\uc57c \ud558\ub294 \uacbd\uc6b0\ub294 '\\'\ub97c \uc0ac\uc6a9) -# 5. Windows\uc5d0\uc11c\uc758 \ub514\ub809\ud1a0\ub9ac \ud45c\uc2dc : '\\' or '/' ('\' \uc0ac\uc6a9\ud558\uba74 \uc548\ub428) -# 6. Unix\uc5d0\uc11c\uc758 \ub514\ub809\ud1a0\ub9ac \ud45c\uc2dc : '/' -# 7. \uc8fc\uc11d\ubb38 \ucc98\ub9ac\ub294 #\uc0ac\uc6a9 -# 8. value\uac12 \ub4a4\uc5d0 \uc2a4\ud398\uc774\uc2a4\uac00 \uc874\uc7ac\ud558\ub294 \uacbd\uc6b0 \uc11c\ube14\ub9bf\uc5d0\uc11c \ucc38\uc870\ud560\ub54c\ub294 \uc5d0\ub7ec\ubc1c\uc0dd\ud560 \uc218 \uc788\uc73c\ubbc0\ub85c trim()\ud558\uac70\ub098 \ub9c8\uc9c0\ub9c9 \uacf5\ubc31\uc5c6\uc774 properties \uac12\uc744 \uc124\uc815\ud560\uac83 -#----------------------------------------------------------------------- - -#---------------------------------------- -# DataAPI \uc811\uc18d\uc815\ubcf4 -#---------------------------------------- -# \uac1c\ubc1c \uc11c\ubc84 -#dataapi.server.ip = 210.181.197.70 -#dataapi.server.port = 80 -#dataapi.server.protocol = http - -# \ub85c\uceec \uc11c\ubc84 -dataapi.server.ip = localhost -dataapi.server.port = 8088 -dataapi.server.protocol = http - -# \ub85c\uceec \uac1c\ubc1c\uc6a9 XML \ud30c\uc77c \uc704\uce58 -dataapi.temp.xml.path = C:/iams/workspace/nlib/data/dataxml - -# Aria \uc54c\uace0\ub9ac\uc998 -crypto.aria.defaultKey = TheFederationOfKoreaCultureCenter027042322 - - -#---------------------------------------- -# \ubaa9\ub85d \ud398\uc774\uc9d5 -#---------------------------------------- -list.paging.page.size = 10 - - -#---------------------------------------- -# \ucca8\ubd80\ud30c\uc77c \uacbd\ub85c \uc815\ubcf4 -#---------------------------------------- -# \ucca8\ubd80\ud30c\uc77c \ucd5c\uc0c1\uc704 \uc704\uce58 -fileupload.base.path = C:/iams/workspace/nlib/data/fileupload - -# \uc784\uc2dc \uc800\uc7a5 \uc704\uce58 -fileupload.temp.subpath = /temp - -# \ubb3b\uace0\ub2f5\ud558\uae30 \uac8c\uc2dc\ud310 \uc11c\ube0c\uc704\uce58 : \ucca8\ubd80\ud30c\uc77c \ucd5c\uc0c1\uc704 \uc704\uce58 \uc774\ud558\uc758 \uc704\uce58 \uc815\ubcf4\ub97c \uc124\uc815 -fileupload.bbs.qna.subpath = /bbs/qna - -# \uba54\uc77c \uacbd\ub85c -mailing.sender.membership.template = C:/iams/workspace/nlib/src/main/webapp/mail/mail_template.html - -#\uba54\uc77c \ubcf4\ub0b4\ub294 \uc8fc\uc18c -mailing.sender.membership.email = no-reply@nlib.org - -#\uba54\uc77c \ubcf4\ub0b4\ub294\uc0ac\ub78c \uc774\ub984 -mailing.sender.membership.name = Nlib +#----------------------------------------------------------------------- +# +# nlib.properties : \uc628\ub77c\uc778\uc790\ub8cc\ub300\ucd9c\uad00\ub9ac\uc2dc\uc2a4\ud15c +# +# @\ud504\ub85c\uc81d\ud2b8\uba85: \uc9c0\ubc29\ubb38\ud654\uc6d0 \ud1b5\ud569\uc790\ub8cc\uad00\ub9ac\uc2dc\uc2a4\ud15c \uad6c\ucd95\uc0ac\uc5c5 (2021) +#----------------------------------------------------------------------- +# 1. key = value \uad6c\uc870\uc785\ub2c8\ub2e4. +# 2. key\uac12\uc740 \uacf5\ubc31\ubb38\uc790\ub97c \ud3ec\ud568\ubd88\uac00, value\uac12\uc740 \uacf5\ubc31\ubb38\uc790\ub97c \uac00\ub2a5 +# 3. key\uac12\uc73c\ub85c \ud55c\uae00\uc744 \uc0ac\uc6a9\ubd88\uac00, value\uac12\uc740 \ud55c\uae00\uc0ac\uc6a9\uc774 \uac00\ub2a5 +# 4. \uc904\uc744 \ubc14\uafc0 \ud544\uc694\uac00 \uc788\uc73c\uba74 '\'\ub97c \ub77c\uc778\uc758 \ub05d\uc5d0 \ucd94\uac00(\ub9cc\uc57d '\'\ubb38\uc790\ub97c \uc0ac\uc6a9\ud574\uc57c \ud558\ub294 \uacbd\uc6b0\ub294 '\\'\ub97c \uc0ac\uc6a9) +# 5. Windows\uc5d0\uc11c\uc758 \ub514\ub809\ud1a0\ub9ac \ud45c\uc2dc : '\\' or '/' ('\' \uc0ac\uc6a9\ud558\uba74 \uc548\ub428) +# 6. Unix\uc5d0\uc11c\uc758 \ub514\ub809\ud1a0\ub9ac \ud45c\uc2dc : '/' +# 7. \uc8fc\uc11d\ubb38 \ucc98\ub9ac\ub294 #\uc0ac\uc6a9 +# 8. value\uac12 \ub4a4\uc5d0 \uc2a4\ud398\uc774\uc2a4\uac00 \uc874\uc7ac\ud558\ub294 \uacbd\uc6b0 \uc11c\ube14\ub9bf\uc5d0\uc11c \ucc38\uc870\ud560\ub54c\ub294 \uc5d0\ub7ec\ubc1c\uc0dd\ud560 \uc218 \uc788\uc73c\ubbc0\ub85c trim()\ud558\uac70\ub098 \ub9c8\uc9c0\ub9c9 \uacf5\ubc31\uc5c6\uc774 properties \uac12\uc744 \uc124\uc815\ud560\uac83 +#----------------------------------------------------------------------- + +#---------------------------------------- +# DataAPI \uc811\uc18d\uc815\ubcf4 +#---------------------------------------- +# \uac1c\ubc1c \uc11c\ubc84 +#dataapi.server.ip = 210.181.197.70 +#dataapi.server.port = 80 +#dataapi.server.protocol = http + +# \ub85c\uceec \uc11c\ubc84 +dataapi.server.ip = localhost +dataapi.server.port = 8088 +dataapi.server.protocol = http + +# \ub85c\uceec \uac1c\ubc1c\uc6a9 XML \ud30c\uc77c \uc704\uce58 +dataapi.temp.xml.path = C:/iams/workspace/nlib/data/dataxml + +# Aria \uc54c\uace0\ub9ac\uc998 +crypto.aria.defaultKey = TheFederationOfKoreaCultureCenter027042322 + + +#---------------------------------------- +# \ubaa9\ub85d \ud398\uc774\uc9d5 +#---------------------------------------- +list.paging.page.size = 10 + + +#---------------------------------------- +# \ucca8\ubd80\ud30c\uc77c \uacbd\ub85c \uc815\ubcf4 +#---------------------------------------- +# \ucca8\ubd80\ud30c\uc77c \ucd5c\uc0c1\uc704 \uc704\uce58 +fileupload.base.path = C:/iams/workspace/nlib/data/fileupload + +# \uc784\uc2dc \uc800\uc7a5 \uc704\uce58 +fileupload.temp.subpath = /temp + +# \ubb3b\uace0\ub2f5\ud558\uae30 \uac8c\uc2dc\ud310 \uc11c\ube0c\uc704\uce58 : \ucca8\ubd80\ud30c\uc77c \ucd5c\uc0c1\uc704 \uc704\uce58 \uc774\ud558\uc758 \uc704\uce58 \uc815\ubcf4\ub97c \uc124\uc815 +fileupload.bbs.qna.subpath = /bbs/qna + +# \uba54\uc77c \uacbd\ub85c +mailing.sender.membership.template = C:/iams/workspace/nlib/src/main/webapp/mail/mail_template.html + +#\uba54\uc77c \ubcf4\ub0b4\ub294 \uc8fc\uc18c +mailing.sender.membership.email = no-reply@nlib.org + +#\uba54\uc77c \ubcf4\ub0b4\ub294\uc0ac\ub78c \uc774\ub984 +mailing.sender.membership.name = Nlib diff --git a/src/main/webapp/WEB-INF/config/egovframework/springmvc/dispatcher-servlet.xml b/src/main/webapp/WEB-INF/config/egovframework/springmvc/dispatcher-servlet.xml index 039acea8..087a7bf6 100644 --- a/src/main/webapp/WEB-INF/config/egovframework/springmvc/dispatcher-servlet.xml +++ b/src/main/webapp/WEB-INF/config/egovframework/springmvc/dispatcher-servlet.xml @@ -1,85 +1,85 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /WEB-INF/tiles/tiles-layout.xml - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + /WEB-INF/tiles/tiles-layout.xml + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/nlib/board/insertQnA.jsp b/src/main/webapp/WEB-INF/jsp/nlib/board/insertQnA.jsp index f54976b3..dfa6d71c 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/board/insertQnA.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/board/insertQnA.jsp @@ -1,83 +1,83 @@ -<% -/** - *
    - * @Class Name : getSampleInfo.jsp
    - * 
    - * @Description : RESTful API 호출 샘플
    - * 
    - * 
    - * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    - *
    - * 
    - * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 2021. 6. 15. KNKIM 최초 생성 - * - * - * @author 이씨플라자 * DIGITALSHIP KNKIM - * @since 2021. 6. 15. - * @version 1.0 - * - */ - %> -<%@ page language="java" contentType="text/html; charset=UTF-8" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> -<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> -<%@ 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" %> -QRCode 회원정보 - - - - -${pageTitle} - - - - - - - - - - - -
    - -
    - - - - - - - +<% +/** + *
    + * @Class Name : getSampleInfo.jsp
    + * 
    + * @Description : RESTful API 호출 샘플
    + * 
    + * 
    + * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    + *
    + * 
    + * + * @ ------------ -------- --------------------------- + * @ 수정일 수정자 수정내용 + * @ ------------ -------- --------------------------- + * @ 2021. 6. 15. KNKIM 최초 생성 + * + * + * @author 이씨플라자 * DIGITALSHIP KNKIM + * @since 2021. 6. 15. + * @version 1.0 + * + */ + %> +<%@ page language="java" contentType="text/html; charset=UTF-8" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +<%@ 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" %> +QRCode 회원정보 + + + + +${pageTitle} + + + + + + + + + + + +
    + +
    + + + + + + + diff --git a/src/main/webapp/WEB-INF/jsp/nlib/board/insertQnAForm.jsp b/src/main/webapp/WEB-INF/jsp/nlib/board/insertQnAForm.jsp index ff8d9455..40f7b7fb 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/board/insertQnAForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/board/insertQnAForm.jsp @@ -1,121 +1,121 @@ -<% -/** - *
    - * @Class Name : listQnAs.jsp
    - * 
    - * @Description : 묻고답하기 목록을 조회한다.
    - * 
    - * 
    - * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    - *
    - * 
    - * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 2021. 7. 13. KNKIM 최초 생성 - * - * - * @author 이씨플라자 * DIGITALSHIP KNKIM - * @since 2021. 7. 13. - * @version 1.0 - * - */ - %> -<%@ page language="java" contentType="text/html; charset=UTF-8" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> -<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> -<%@ 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" %> - -묻고답하기 - 글쓰기 - - - - - - - -

    ${pageTitle }

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    제목
    작성자명
    비밀번호
    이메일
    내용
    첨부파일
    - - - - -
    - - -
    -
    -
    -
    - 이곳에 파일을 끌어다 놓거나, 클릭하여 올릴 파일을 선택하세요. -
    -
    -
    - - - +<% +/** + *
    + * @Class Name : listQnAs.jsp
    + * 
    + * @Description : 묻고답하기 목록을 조회한다.
    + * 
    + * 
    + * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    + *
    + * 
    + * + * @ ------------ -------- --------------------------- + * @ 수정일 수정자 수정내용 + * @ ------------ -------- --------------------------- + * @ 2021. 7. 13. KNKIM 최초 생성 + * + * + * @author 이씨플라자 * DIGITALSHIP KNKIM + * @since 2021. 7. 13. + * @version 1.0 + * + */ + %> +<%@ page language="java" contentType="text/html; charset=UTF-8" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +<%@ 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" %> + +묻고답하기 - 글쓰기 + + + + + + + +

    ${pageTitle }

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    제목
    작성자명
    비밀번호
    이메일
    내용
    첨부파일
    + + + + +
    + + +
    +
    +
    +
    + 이곳에 파일을 끌어다 놓거나, 클릭하여 올릴 파일을 선택하세요. +
    +
    +
    + + + diff --git a/src/main/webapp/WEB-INF/jsp/nlib/board/listFAQs.jsp b/src/main/webapp/WEB-INF/jsp/nlib/board/listFAQs.jsp index f54976b3..dfa6d71c 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/board/listFAQs.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/board/listFAQs.jsp @@ -1,83 +1,83 @@ -<% -/** - *
    - * @Class Name : getSampleInfo.jsp
    - * 
    - * @Description : RESTful API 호출 샘플
    - * 
    - * 
    - * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    - *
    - * 
    - * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 2021. 6. 15. KNKIM 최초 생성 - * - * - * @author 이씨플라자 * DIGITALSHIP KNKIM - * @since 2021. 6. 15. - * @version 1.0 - * - */ - %> -<%@ page language="java" contentType="text/html; charset=UTF-8" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> -<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> -<%@ 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" %> -QRCode 회원정보 - - - - -${pageTitle} - - - - - - - - - - - -
    - -
    - - - - - - - +<% +/** + *
    + * @Class Name : getSampleInfo.jsp
    + * 
    + * @Description : RESTful API 호출 샘플
    + * 
    + * 
    + * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    + *
    + * 
    + * + * @ ------------ -------- --------------------------- + * @ 수정일 수정자 수정내용 + * @ ------------ -------- --------------------------- + * @ 2021. 6. 15. KNKIM 최초 생성 + * + * + * @author 이씨플라자 * DIGITALSHIP KNKIM + * @since 2021. 6. 15. + * @version 1.0 + * + */ + %> +<%@ page language="java" contentType="text/html; charset=UTF-8" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +<%@ 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" %> +QRCode 회원정보 + + + + +${pageTitle} + + + + + + + + + + + +
    + +
    + + + + + + + diff --git a/src/main/webapp/WEB-INF/jsp/nlib/board/listNotices.jsp b/src/main/webapp/WEB-INF/jsp/nlib/board/listNotices.jsp index 309aad82..f02fa151 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/board/listNotices.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/board/listNotices.jsp @@ -1,146 +1,146 @@ -<% -/** - *
    - * @Class Name : listNotices.jsp
    - * 
    - * @Description : JS-GRID 샘플 화면 
    - * 
    - * 
    - * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    - *
    - * 
    - * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 2021. 6. 15. KNKIM 최초 생성 - * - * - * @author 이씨플라자 * DIGITALSHIP KNKIM - * @since 2021. 6. 15. - * @version 1.0 - * - */ - %> -<%@ page language="java" contentType="text/html; charset=UTF-8" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> -<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> -<%@ 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" %> - -공지사항 - - - - -${pageTitle} - - - - - - - - - - - -
    - -
    - - - - - - - +<% +/** + *
    + * @Class Name : listNotices.jsp
    + * 
    + * @Description : JS-GRID 샘플 화면 
    + * 
    + * 
    + * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    + *
    + * 
    + * + * @ ------------ -------- --------------------------- + * @ 수정일 수정자 수정내용 + * @ ------------ -------- --------------------------- + * @ 2021. 6. 15. KNKIM 최초 생성 + * + * + * @author 이씨플라자 * DIGITALSHIP KNKIM + * @since 2021. 6. 15. + * @version 1.0 + * + */ + %> +<%@ page language="java" contentType="text/html; charset=UTF-8" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +<%@ 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" %> + +공지사항 + + + + +${pageTitle} + + + + + + + + + + + +
    + +
    + + + + + + + diff --git a/src/main/webapp/WEB-INF/jsp/nlib/board/listQnAs.jsp b/src/main/webapp/WEB-INF/jsp/nlib/board/listQnAs.jsp index 38b22cc3..4e7666c3 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/board/listQnAs.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/board/listQnAs.jsp @@ -1,183 +1,183 @@ -<% -/** - *
    - * @Class Name : listQnAs.jsp
    - * 
    - * @Description : 묻고답하기 목록을 조회한다.
    - * 
    - * 
    - * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    - *
    - * 
    - * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 2021. 7. 13. KNKIM 최초 생성 - * - * - * @author 이씨플라자 * DIGITALSHIP KNKIM - * @since 2021. 7. 13. - * @version 1.0 - * - */ - %> -<%@ page language="java" contentType="text/html; charset=UTF-8" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> -<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> -<%@ 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" %> - -묻고답하기 - - - - -${pageTitle} - - - - - - - - - - - -

    ${pageTitle }

    - -
    - - - - - - - - -
    - - - - - - -
    - - - +<% +/** + *
    + * @Class Name : listQnAs.jsp
    + * 
    + * @Description : 묻고답하기 목록을 조회한다.
    + * 
    + * 
    + * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    + *
    + * 
    + * + * @ ------------ -------- --------------------------- + * @ 수정일 수정자 수정내용 + * @ ------------ -------- --------------------------- + * @ 2021. 7. 13. KNKIM 최초 생성 + * + * + * @author 이씨플라자 * DIGITALSHIP KNKIM + * @since 2021. 7. 13. + * @version 1.0 + * + */ + %> +<%@ page language="java" contentType="text/html; charset=UTF-8" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +<%@ 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" %> + +묻고답하기 + + + + +${pageTitle} + + + + + + + + + + + +

    ${pageTitle }

    + +
    + + + + + + + + +
    + + + + + + +
    + + + diff --git a/src/main/webapp/WEB-INF/jsp/nlib/board/selectQnA.jsp b/src/main/webapp/WEB-INF/jsp/nlib/board/selectQnA.jsp index d7e91651..19f24858 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/board/selectQnA.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/board/selectQnA.jsp @@ -1,157 +1,157 @@ -<% -/** - *
    - * @Class Name : selectQnA.jsp
    - * 
    - * @Description : 묻고답하기 상세내용을 조회한다.
    - * 
    - * 
    - * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    - *
    - * 
    - * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 2021. 7. 22. KNKIM 최초 생성 - * - * - * @author 이씨플라자 * DIGITALSHIP KNKIM - * @since 2021. 7. 22. - * @version 1.0 - * - */ - %> -<%@ page language="java" contentType="text/html; charset=UTF-8" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> -<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> -<%@ 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" %> - -묻고답하기 - 상세조회 - - - - -${pageTitle} - - - - - - - - - - -

    ${pageTitle }

    - -${message } -
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    유형Q & A작성자 : ${article.regUserName }작성일 : ${article.regDate }상태 : ${article.repStatus }
    질문내용${article.contentQeust}
    ${article.contentQeustFile}
    답변내용${article.contentReply}
    ${article.contentReplyFile}
    - -
    - - - - - - - - - - - - - - - - - - -
    이전글Q&A${preArticle.title }작성자 : ${preArticle.regUserName }작성일 : ${preArticle.regDate }상태 : ${preArticle.repStatus }
    다음글Q&A${nextArticle.title }작성자 : ${nextArticle.regUserName }작성일 : ${nextArticle.regDate }상태 : ${nextArticle.repStatus }
    - - - - - - -
    - - - - - - - +<% +/** + *
    + * @Class Name : selectQnA.jsp
    + * 
    + * @Description : 묻고답하기 상세내용을 조회한다.
    + * 
    + * 
    + * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    + *
    + * 
    + * + * @ ------------ -------- --------------------------- + * @ 수정일 수정자 수정내용 + * @ ------------ -------- --------------------------- + * @ 2021. 7. 22. KNKIM 최초 생성 + * + * + * @author 이씨플라자 * DIGITALSHIP KNKIM + * @since 2021. 7. 22. + * @version 1.0 + * + */ + %> +<%@ page language="java" contentType="text/html; charset=UTF-8" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +<%@ 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" %> + +묻고답하기 - 상세조회 + + + + +${pageTitle} + + + + + + + + + + +

    ${pageTitle }

    + +${message } +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    유형Q & A작성자 : ${article.regUserName }작성일 : ${article.regDate }상태 : ${article.repStatus }
    질문내용${article.contentQeust}
    ${article.contentQeustFile}
    답변내용${article.contentReply}
    ${article.contentReplyFile}
    + +
    + + + + + + + + + + + + + + + + + + +
    이전글Q&A${preArticle.title }작성자 : ${preArticle.regUserName }작성일 : ${preArticle.regDate }상태 : ${preArticle.repStatus }
    다음글Q&A${nextArticle.title }작성자 : ${nextArticle.regUserName }작성일 : ${nextArticle.regDate }상태 : ${nextArticle.repStatus }
    + + + + + + +
    + + + + + + + diff --git a/src/main/webapp/WEB-INF/jsp/nlib/board/updateQnAForm.jsp b/src/main/webapp/WEB-INF/jsp/nlib/board/updateQnAForm.jsp index f8f5bdb0..05176da5 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/board/updateQnAForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/board/updateQnAForm.jsp @@ -1,143 +1,143 @@ -<% -/** - *
    - * @Class Name : updateQnAForm.jsp
    - * 
    - * @Description : 묻고답하기 수정화면을 표출한다. 
    - * 
    - * 
    - * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    - *
    - * 
    - * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 2021. 7. 23. KNKIM 최초 생성 - * - * - * @author 이씨플라자 * DIGITALSHIP KNKIM - * @since 2021. 7. 23. - * @version 1.0 - * - */ - %> -<%@ page language="java" contentType="text/html; charset=UTF-8" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> -<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> -<%@ 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" %> - -묻고답하기 - 수정 - - - - -${pageTitle} - - - - - - - - - - -

    ${pageTitle }

    - -${message } -
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    제목
    작성자
    이메일
    기존비밀번호
    비밀번호
    질문내용
    - -
    - - - - - -
    - - - - - - - +<% +/** + *
    + * @Class Name : updateQnAForm.jsp
    + * 
    + * @Description : 묻고답하기 수정화면을 표출한다. 
    + * 
    + * 
    + * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    + *
    + * 
    + * + * @ ------------ -------- --------------------------- + * @ 수정일 수정자 수정내용 + * @ ------------ -------- --------------------------- + * @ 2021. 7. 23. KNKIM 최초 생성 + * + * + * @author 이씨플라자 * DIGITALSHIP KNKIM + * @since 2021. 7. 23. + * @version 1.0 + * + */ + %> +<%@ page language="java" contentType="text/html; charset=UTF-8" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +<%@ 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" %> + +묻고답하기 - 수정 + + + + +${pageTitle} + + + + + + + + + + +

    ${pageTitle }

    + +${message } +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    제목
    작성자
    이메일
    기존비밀번호
    비밀번호
    질문내용
    + +
    + + + + + +
    + + + + + + + diff --git a/src/main/webapp/WEB-INF/jsp/nlib/cmm/error/accessDenied.jsp b/src/main/webapp/WEB-INF/jsp/nlib/cmm/error/accessDenied.jsp index 62a8dc1b..79323da1 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/cmm/error/accessDenied.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/cmm/error/accessDenied.jsp @@ -1,38 +1,38 @@ -<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> -<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> - - - - - -<spring:message code="title.html"/> - - - - -
    -

    -
    - -

    ${pageTitle}

    - -
    -
    -
    -

    -

    ${pageTitle}

    - -
    -
    -
    -
    -
    - - +<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> + + + + + +<spring:message code="title.html"/> + + + + +
    +

    +
    + +

    ${pageTitle}

    + +
    +
    +
    +

    +

    ${pageTitle}

    + +
    +
    +
    +
    +
    + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/nlib/cmm/error/bizException.jsp b/src/main/webapp/WEB-INF/jsp/nlib/cmm/error/bizException.jsp index f26a363d..4b474248 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/cmm/error/bizException.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/cmm/error/bizException.jsp @@ -1,39 +1,39 @@ -<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> -<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> - - - - - -<spring:message code="title.html"/> - - - - - -
    -

    -
    - -

    ${pageTitle}

    - -
    -
    -
    -

    -

    ${pageTitle}

    - -
    -
    -
    -
    -
    - - - +<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> + + + + + +<spring:message code="title.html"/> + + + + + +
    +

    +
    + +

    ${pageTitle}

    + +
    +
    +
    +

    +

    ${pageTitle}

    + +
    +
    +
    +
    +
    + + + diff --git a/src/main/webapp/WEB-INF/jsp/nlib/cmm/validator.jsp b/src/main/webapp/WEB-INF/jsp/nlib/cmm/validator.jsp index da17e41e..5fd6058f 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/cmm/validator.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/cmm/validator.jsp @@ -1,4 +1,4 @@ -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<%@ page language="java" contentType="application/javascript" pageEncoding="UTF-8"%> -<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ page language="java" contentType="application/javascript" pageEncoding="UTF-8"%> +<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %> \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/nlib/inform/selectGreeting.jsp b/src/main/webapp/WEB-INF/jsp/nlib/inform/selectGreeting.jsp index f246edae..8291b146 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/inform/selectGreeting.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/inform/selectGreeting.jsp @@ -1,59 +1,59 @@ -<% -/** - *
    - * @Class Name : selectGreeting.jsp
    - * 
    - * @Description : 인사말 조회 
    - * 
    - * 
    - * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    - *
    - * 
    - * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 2021. 7. 27. KNKIM 최초 생성 - * - * - * @author 이씨플라자 * DIGITALSHIP KNKIM - * @since 2021. 7. 27. - * @version 1.0 - * - */ - %> -<%@ page language="java" contentType="text/html; charset=UTF-8" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> -<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> -<%@ 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" %> - -인사말 - - - - -${pageTitle} - - - -

    ${pageTitle } - ${deptName }

    - - -
    -${informContent } -
    - - - - - - +<% +/** + *
    + * @Class Name : selectGreeting.jsp
    + * 
    + * @Description : 인사말 조회 
    + * 
    + * 
    + * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    + *
    + * 
    + * + * @ ------------ -------- --------------------------- + * @ 수정일 수정자 수정내용 + * @ ------------ -------- --------------------------- + * @ 2021. 7. 27. KNKIM 최초 생성 + * + * + * @author 이씨플라자 * DIGITALSHIP KNKIM + * @since 2021. 7. 27. + * @version 1.0 + * + */ + %> +<%@ page language="java" contentType="text/html; charset=UTF-8" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +<%@ 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" %> + +인사말 + + + + +${pageTitle} + + + +

    ${pageTitle } - ${deptName }

    + + +
    +${informContent } +
    + + + + + + diff --git a/src/main/webapp/WEB-INF/jsp/nlib/inform/selectNCultureLocationInfo.jsp b/src/main/webapp/WEB-INF/jsp/nlib/inform/selectNCultureLocationInfo.jsp index 5b5c9b58..e9f58b85 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/inform/selectNCultureLocationInfo.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/inform/selectNCultureLocationInfo.jsp @@ -1,63 +1,63 @@ -<% -/** - *
    - * @Class Name : selectNCultureLocationInfo.jsp
    - * 
    - * @Description : 찾아오시는길 조회 
    - * 
    - * 
    - * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    - *
    - * 
    - * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 2021. 7. 27. KNKIM 최초 생성 - * - * - * @author 이씨플라자 * DIGITALSHIP KNKIM - * @since 2021. 7. 27. - * @version 1.0 - * - */ - %> -<%@ page language="java" contentType="text/html; charset=UTF-8" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> -<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> -<%@ 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" %> - -찾아오시는길 - - - - -${pageTitle} - - - -

    ${pageTitle }

    - -주소 : ${zipcode } ${addr1 } ${addr2 }
    -전화번호 : ${tel }
    -팩스번호 : ${fax }
    - - 
    - -
    -${informContent } -
    - - - - - +<% +/** + *
    + * @Class Name : selectNCultureLocationInfo.jsp
    + * 
    + * @Description : 찾아오시는길 조회 
    + * 
    + * 
    + * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    + *
    + * 
    + * + * @ ------------ -------- --------------------------- + * @ 수정일 수정자 수정내용 + * @ ------------ -------- --------------------------- + * @ 2021. 7. 27. KNKIM 최초 생성 + * + * + * @author 이씨플라자 * DIGITALSHIP KNKIM + * @since 2021. 7. 27. + * @version 1.0 + * + */ + %> +<%@ page language="java" contentType="text/html; charset=UTF-8" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +<%@ 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" %> + +찾아오시는길 + + + + +${pageTitle} + + + +

    ${pageTitle }

    + +주소 : ${zipcode } ${addr1 } ${addr2 }
    +전화번호 : ${tel }
    +팩스번호 : ${fax }
    + + 
    + +
    +${informContent } +
    + + + + + diff --git a/src/main/webapp/WEB-INF/jsp/nlib/inform/selectNCultureOperationInfo.jsp b/src/main/webapp/WEB-INF/jsp/nlib/inform/selectNCultureOperationInfo.jsp index 3d21b9f8..3f0acd0b 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/inform/selectNCultureOperationInfo.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/inform/selectNCultureOperationInfo.jsp @@ -1,58 +1,58 @@ -<% -/** - *
    - * @Class Name : selectNCultureOperationInfo.jsp
    - * 
    - * @Description : 이용안내 조회 
    - * 
    - * 
    - * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    - *
    - * 
    - * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 2021. 7. 27. KNKIM 최초 생성 - * - * - * @author 이씨플라자 * DIGITALSHIP KNKIM - * @since 2021. 7. 27. - * @version 1.0 - * - */ - %> -<%@ page language="java" contentType="text/html; charset=UTF-8" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> -<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> -<%@ 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" %> - -이용안내 - - - - -${pageTitle} - - - -

    ${pageTitle }

    - -
    -${informContent } -
    - - - - - - +<% +/** + *
    + * @Class Name : selectNCultureOperationInfo.jsp
    + * 
    + * @Description : 이용안내 조회 
    + * 
    + * 
    + * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    + *
    + * 
    + * + * @ ------------ -------- --------------------------- + * @ 수정일 수정자 수정내용 + * @ ------------ -------- --------------------------- + * @ 2021. 7. 27. KNKIM 최초 생성 + * + * + * @author 이씨플라자 * DIGITALSHIP KNKIM + * @since 2021. 7. 27. + * @version 1.0 + * + */ + %> +<%@ page language="java" contentType="text/html; charset=UTF-8" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +<%@ 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" %> + +이용안내 + + + + +${pageTitle} + + + +

    ${pageTitle }

    + +
    +${informContent } +
    + + + + + + diff --git a/src/main/webapp/WEB-INF/jsp/nlib/inform/selectPrivacyInfo.jsp b/src/main/webapp/WEB-INF/jsp/nlib/inform/selectPrivacyInfo.jsp index 6075e69b..d2dc31ce 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/inform/selectPrivacyInfo.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/inform/selectPrivacyInfo.jsp @@ -1,58 +1,58 @@ -<% -/** - *
    - * @Class Name : selectPrivacyInfo.jsp
    - * 
    - * @Description : 개인정보처리방침 조회 
    - * 
    - * 
    - * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    - *
    - * 
    - * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 2021. 7. 27. KNKIM 최초 생성 - * - * - * @author 이씨플라자 * DIGITALSHIP KNKIM - * @since 2021. 7. 27. - * @version 1.0 - * - */ - %> -<%@ page language="java" contentType="text/html; charset=UTF-8" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> -<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> -<%@ 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" %> - -개인정보처리방침 - - - - -${pageTitle} - - - -

    ${pageTitle }

    - -
    -${informContent } -
    - - - - - - +<% +/** + *
    + * @Class Name : selectPrivacyInfo.jsp
    + * 
    + * @Description : 개인정보처리방침 조회 
    + * 
    + * 
    + * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    + *
    + * 
    + * + * @ ------------ -------- --------------------------- + * @ 수정일 수정자 수정내용 + * @ ------------ -------- --------------------------- + * @ 2021. 7. 27. KNKIM 최초 생성 + * + * + * @author 이씨플라자 * DIGITALSHIP KNKIM + * @since 2021. 7. 27. + * @version 1.0 + * + */ + %> +<%@ page language="java" contentType="text/html; charset=UTF-8" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +<%@ 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" %> + +개인정보처리방침 + + + + +${pageTitle} + + + +

    ${pageTitle }

    + +
    +${informContent } +
    + + + + + + diff --git a/src/main/webapp/WEB-INF/jsp/nlib/inform/selectTermsInfo.jsp b/src/main/webapp/WEB-INF/jsp/nlib/inform/selectTermsInfo.jsp index 1a9e7105..6713efa8 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/inform/selectTermsInfo.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/inform/selectTermsInfo.jsp @@ -1,58 +1,58 @@ -<% -/** - *
    - * @Class Name : selectTermsInfo.jsp
    - * 
    - * @Description : 이용약관 조회 
    - * 
    - * 
    - * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    - *
    - * 
    - * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 2021. 7. 27. KNKIM 최초 생성 - * - * - * @author 이씨플라자 * DIGITALSHIP KNKIM - * @since 2021. 7. 27. - * @version 1.0 - * - */ - %> -<%@ page language="java" contentType="text/html; charset=UTF-8" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> -<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> -<%@ 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" %> - -이용약관 - - - - -${pageTitle} - - - -

    ${pageTitle }

    - -
    -${informContent } -
    - - - - - - +<% +/** + *
    + * @Class Name : selectTermsInfo.jsp
    + * 
    + * @Description : 이용약관 조회 
    + * 
    + * 
    + * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    + *
    + * 
    + * + * @ ------------ -------- --------------------------- + * @ 수정일 수정자 수정내용 + * @ ------------ -------- --------------------------- + * @ 2021. 7. 27. KNKIM 최초 생성 + * + * + * @author 이씨플라자 * DIGITALSHIP KNKIM + * @since 2021. 7. 27. + * @version 1.0 + * + */ + %> +<%@ page language="java" contentType="text/html; charset=UTF-8" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +<%@ 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" %> + +이용약관 + + + + +${pageTitle} + + + +

    ${pageTitle }

    + +
    +${informContent } +
    + + + + + + diff --git a/src/main/webapp/WEB-INF/jsp/nlib/member/initPasswordResult.jsp b/src/main/webapp/WEB-INF/jsp/nlib/member/initPasswordResult.jsp index 067a0ae5..cc1057c8 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/member/initPasswordResult.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/member/initPasswordResult.jsp @@ -1,36 +1,36 @@ -<% -/** - *
    - * @Class Name : initPasswordResult.jsp
    - * 
    - * @Description : 비밀번호 찾기 결과
    - * 
    - * 
    - * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    - *
    - * 
    - * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 2021. 7. 12. JSYOO 최초 생성 - * - * - * @author 이씨플라자 * DIGITALSHIP JSYOO - * @since 2021. 7. 12. - * @version 1.0 - * - */ - %> -<%@ page language="java" contentType="text/html; charset=UTF-8" - pageEncoding="UTF-8"%> - - - - -Insert title here - - -비밀번호찾기 결과페이지 - +<% +/** + *
    + * @Class Name : initPasswordResult.jsp
    + * 
    + * @Description : 비밀번호 찾기 결과
    + * 
    + * 
    + * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    + *
    + * 
    + * + * @ ------------ -------- --------------------------- + * @ 수정일 수정자 수정내용 + * @ ------------ -------- --------------------------- + * @ 2021. 7. 12. JSYOO 최초 생성 + * + * + * @author 이씨플라자 * DIGITALSHIP JSYOO + * @since 2021. 7. 12. + * @version 1.0 + * + */ + %> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + + +Insert title here + + +비밀번호찾기 결과페이지 + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/nlib/member/insertMemberInfoForm.jsp b/src/main/webapp/WEB-INF/jsp/nlib/member/insertMemberInfoForm.jsp index f33bf4cd..355ae042 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/member/insertMemberInfoForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/member/insertMemberInfoForm.jsp @@ -1,393 +1,393 @@ -<% -/** - *
    - * @Class Name : insertMemberInfoForm.jsp
    - * 
    - * @Description : 회원가입폼
    - * 
    - * 
    - * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    - *
    - * 
    - * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 2021. 7. 12. JSYOO 최초 생성 - * - * - * @author 이씨플라자 * DIGITALSHIP JSYOO - * @since 2021. 7. 12. - * @version 1.0 - * - */ - %> -<%@ page language="java" contentType="text/html; charset=UTF-8" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> -<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> -<%@ 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" %> - - - -${pageTitle} <spring:message code="title.create" /> - - - - - - -
    -

    - 회원가입 -


    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    아이디 - required readonly > -
    비밀번호 - -
    비밀번호 확인 - -
    이름 - > -
    생일 - > - - required pattern="^(0[1-9]|[12][0-9]|3[0-1])$"> -
    휴대전화 - > - -
    주소 -
    - - -
    -
    - > - -
    -
    - - - +<% +/** + *
    + * @Class Name : insertMemberInfoForm.jsp
    + * 
    + * @Description : 회원가입폼
    + * 
    + * 
    + * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    + *
    + * 
    + * + * @ ------------ -------- --------------------------- + * @ 수정일 수정자 수정내용 + * @ ------------ -------- --------------------------- + * @ 2021. 7. 12. JSYOO 최초 생성 + * + * + * @author 이씨플라자 * DIGITALSHIP JSYOO + * @since 2021. 7. 12. + * @version 1.0 + * + */ + %> +<%@ page language="java" contentType="text/html; charset=UTF-8" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +<%@ 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" %> + + + +${pageTitle} <spring:message code="title.create" /> + + + + + + +
    +

    + 회원가입 +


    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    아이디 + required readonly > +
    비밀번호 + +
    비밀번호 확인 + +
    이름 + > +
    생일 + > + + required pattern="^(0[1-9]|[12][0-9]|3[0-1])$"> +
    휴대전화 + > + +
    주소 +
    + + +
    +
    + > + +
    +
    + + + diff --git a/src/main/webapp/WEB-INF/jsp/nlib/member/insertMemberInfoResult.jsp b/src/main/webapp/WEB-INF/jsp/nlib/member/insertMemberInfoResult.jsp index 05568d61..170ba711 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/member/insertMemberInfoResult.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/member/insertMemberInfoResult.jsp @@ -1,37 +1,37 @@ -<% -/** - *
    - * @Class Name : insertMemberInfoResult.jsp
    - * 
    - * @Description : 회원가입 결과
    - * 
    - * 
    - * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    - *
    - * 
    - * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 2021. 7. 12. JSYOO 최초 생성 - * - * - * @author 이씨플라자 * DIGITALSHIP JSYOO - * @since 2021. 7. 12. - * @version 1.0 - * - */ - %> -<%@ page language="java" contentType="text/html; charset=UTF-8" - pageEncoding="UTF-8"%> - - - -Insert title here - - -환영합니다 - - - +<% +/** + *
    + * @Class Name : insertMemberInfoResult.jsp
    + * 
    + * @Description : 회원가입 결과
    + * 
    + * 
    + * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    + *
    + * 
    + * + * @ ------------ -------- --------------------------- + * @ 수정일 수정자 수정내용 + * @ ------------ -------- --------------------------- + * @ 2021. 7. 12. JSYOO 최초 생성 + * + * + * @author 이씨플라자 * DIGITALSHIP JSYOO + * @since 2021. 7. 12. + * @version 1.0 + * + */ + %> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + +Insert title here + + +환영합니다 + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/nlib/member/searchIdForm.jsp b/src/main/webapp/WEB-INF/jsp/nlib/member/searchIdForm.jsp index 954d5212..e49d6f01 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/member/searchIdForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/member/searchIdForm.jsp @@ -1,76 +1,76 @@ -<% -/** - *
    - * @Class Name : searchIdForm.jsp
    - * 
    - * @Description : ID 비밀번호 찾기
    - * 
    - * 
    - * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    - *
    - * 
    - * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 2021. 7. 12. JSYOO 최초 생성 - * - * - * @author 이씨플라자 * DIGITALSHIP JSYOO - * @since 2021. 7. 12. - * @version 1.0 - * - */ - %> -<%@ page language="java" contentType="text/html; charset=UTF-8" - pageEncoding="UTF-8"%> - - - - -Insert title here - - - - -

    아이디 찾기

    -
    -이름 -핸드폰 번호 - -
    -
    -

    비밀번호 찾기

    -ID -핸드폰 번호 - -
    - +<% +/** + *
    + * @Class Name : searchIdForm.jsp
    + * 
    + * @Description : ID 비밀번호 찾기
    + * 
    + * 
    + * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    + *
    + * 
    + * + * @ ------------ -------- --------------------------- + * @ 수정일 수정자 수정내용 + * @ ------------ -------- --------------------------- + * @ 2021. 7. 12. JSYOO 최초 생성 + * + * + * @author 이씨플라자 * DIGITALSHIP JSYOO + * @since 2021. 7. 12. + * @version 1.0 + * + */ + %> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + + +Insert title here + + + + +

    아이디 찾기

    +
    +이름 +핸드폰 번호 + +
    +
    +

    비밀번호 찾기

    +ID +핸드폰 번호 + +
    + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/nlib/member/searchIdResult.jsp b/src/main/webapp/WEB-INF/jsp/nlib/member/searchIdResult.jsp index 2e99c39e..6e37f1c5 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/member/searchIdResult.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/member/searchIdResult.jsp @@ -1,37 +1,37 @@ -<% -/** - *
    - * @Class Name : searchIdResult.jsp
    - * 
    - * @Description : 아이디 찾기 결과
    - * 
    - * 
    - * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    - *
    - * 
    - * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 2021. 7. 12. JSYOO 최초 생성 - * - * - * @author 이씨플라자 * DIGITALSHIP JSYOO - * @since 2021. 7. 12. - * @version 1.0 - * - */ - %> -<%@ page language="java" contentType="text/html; charset=UTF-8" - pageEncoding="UTF-8"%> - - - - -Insert title here - - -아이디찾기 결과페이지 - - +<% +/** + *
    + * @Class Name : searchIdResult.jsp
    + * 
    + * @Description : 아이디 찾기 결과
    + * 
    + * 
    + * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    + *
    + * 
    + * + * @ ------------ -------- --------------------------- + * @ 수정일 수정자 수정내용 + * @ ------------ -------- --------------------------- + * @ 2021. 7. 12. JSYOO 최초 생성 + * + * + * @author 이씨플라자 * DIGITALSHIP JSYOO + * @since 2021. 7. 12. + * @version 1.0 + * + */ + %> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + + +Insert title here + + +아이디찾기 결과페이지 + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/nlib/member/selectMemberJoiningInfo.jsp b/src/main/webapp/WEB-INF/jsp/nlib/member/selectMemberJoiningInfo.jsp index 19b90669..e516cb77 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/member/selectMemberJoiningInfo.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/member/selectMemberJoiningInfo.jsp @@ -1,52 +1,52 @@ -<% -/** - *
    - * @Class Name : selectMemberJoiningInfo.jsp
    - * 
    - * @Description : 회원가입 이용약관
    - * 
    - * 
    - * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    - *
    - * 
    - * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 2021. 7. 12. JSYOO 최초 생성 - * - * - * @author 이씨플라자 * DIGITALSHIP JSYOO - * @since 2021. 7. 12. - * @version 1.0 - * - */ - %> -<%@ page language="java" contentType="text/html; charset=UTF-8" - pageEncoding="UTF-8"%> - - - - - -Insert title here - - - -
    - -
    동의
    -

    -
    - + location.href="/nlib/member/snsCertForm.do"; + } + else{ + alert("약관에 동의해주세요"); + } +} + + + +
    + +
    동의
    +

    +
    + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/nlib/member/snsCertForm.jsp b/src/main/webapp/WEB-INF/jsp/nlib/member/snsCertForm.jsp index 33262ffb..b1d6a349 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/member/snsCertForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/member/snsCertForm.jsp @@ -1,221 +1,221 @@ -<% -/** - *
    - * @Class Name : snsCertForm.jsp
    - * 
    - * @Description : 회원가입 SNS 인증
    - * 
    - * 
    - * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    - *
    - * 
    - * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 2021. 7. 12. JSYOO 최초 생성 - * - * - * @author 이씨플라자 * DIGITALSHIP JSYOO - * @since 2021. 7. 12. - * @version 1.0 - * - */ - %> -<%@ page language="java" contentType="text/html; charset=UTF-8" - pageEncoding="UTF-8"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<% -/** - *
    - * @Class Name : snsCertForm.jsp
    - * 
    - * @Description : 회원가입시 sns인증
    - * 
    - * 
    - * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    - *
    - * 
    - * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 2021. 7. 12. JSYOO 최초 생성 - * - * - * @author 이씨플라자 * DIGITALSHIP JSYOO - * @since 2021. 7. 12. - * @version 1.0 - * - */ - %> - -<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> -<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> -<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> - - - -LoginTest - - - - - - - - - - -SNS 인증
    -
    -
    - - - - - -
    - - - - - - -
    - - - - - - - +<% +/** + *
    + * @Class Name : snsCertForm.jsp
    + * 
    + * @Description : 회원가입 SNS 인증
    + * 
    + * 
    + * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    + *
    + * 
    + * + * @ ------------ -------- --------------------------- + * @ 수정일 수정자 수정내용 + * @ ------------ -------- --------------------------- + * @ 2021. 7. 12. JSYOO 최초 생성 + * + * + * @author 이씨플라자 * DIGITALSHIP JSYOO + * @since 2021. 7. 12. + * @version 1.0 + * + */ + %> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<% +/** + *
    + * @Class Name : snsCertForm.jsp
    + * 
    + * @Description : 회원가입시 sns인증
    + * 
    + * 
    + * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    + *
    + * 
    + * + * @ ------------ -------- --------------------------- + * @ 수정일 수정자 수정내용 + * @ ------------ -------- --------------------------- + * @ 2021. 7. 12. JSYOO 최초 생성 + * + * + * @author 이씨플라자 * DIGITALSHIP JSYOO + * @since 2021. 7. 12. + * @version 1.0 + * + */ + %> + +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> + + + +LoginTest + + + + + + + + + + +SNS 인증
    +
    +
    + + + + + +
    + + + + + + +
    + + + + + + + diff --git a/src/main/webapp/WEB-INF/jsp/nlib/popup/jusoPopup.jsp b/src/main/webapp/WEB-INF/jsp/nlib/popup/jusoPopup.jsp index 3a70b273..ef841de3 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/popup/jusoPopup.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/popup/jusoPopup.jsp @@ -1,76 +1,76 @@ -<% -/** - *
    - * @Class Name : jusoPopup.jsp
    - * 
    - * @Description : 주소 API
    - * 
    - * 
    - * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    - *
    - * 
    - * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 2021. 7. 12. JSYOO 최초 생성 - * - * - * @author 이씨플라자 * DIGITALSHIP JSYOO - * @since 2021. 7. 12. - * @version 1.0 - * - */ - %> -<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> - - - - -Insert title here -<% - request.setCharacterEncoding("UTF-8"); //한글깨지면 주석제거 - //request.setCharacterEncoding("EUC-KR"); //해당시스템의 인코딩타입이 EUC-KR일경우에 - String inputYn = request.getParameter("inputYn"); - String zipNo = request.getParameter("zipNo"); - String roadAddrPart1 = request.getParameter("roadAddrPart1"); - String roadAddrPart2 = request.getParameter("roadAddrPart2"); - String addrDetail = request.getParameter("addrDetail"); - -%> - - - -
    - - - - - - -
    - +<% +/** + *
    + * @Class Name : jusoPopup.jsp
    + * 
    + * @Description : 주소 API
    + * 
    + * 
    + * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    + *
    + * 
    + * + * @ ------------ -------- --------------------------- + * @ 수정일 수정자 수정내용 + * @ ------------ -------- --------------------------- + * @ 2021. 7. 12. JSYOO 최초 생성 + * + * + * @author 이씨플라자 * DIGITALSHIP JSYOO + * @since 2021. 7. 12. + * @version 1.0 + * + */ + %> +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> + + + + +Insert title here +<% + request.setCharacterEncoding("UTF-8"); //한글깨지면 주석제거 + //request.setCharacterEncoding("EUC-KR"); //해당시스템의 인코딩타입이 EUC-KR일경우에 + String inputYn = request.getParameter("inputYn"); + String zipNo = request.getParameter("zipNo"); + String roadAddrPart1 = request.getParameter("roadAddrPart1"); + String roadAddrPart2 = request.getParameter("roadAddrPart2"); + String addrDetail = request.getParameter("addrDetail"); + +%> + + + +
    + + + + + + +
    + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/nlib/popup/naverLoginResultPopup.jsp b/src/main/webapp/WEB-INF/jsp/nlib/popup/naverLoginResultPopup.jsp index 7e3b1b27..cc7807ad 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/popup/naverLoginResultPopup.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/popup/naverLoginResultPopup.jsp @@ -1,50 +1,50 @@ -<% -/** - *
    - * @Class Name : naverLoginResultPopup.jsp
    - * 
    - * @Description : 로그인시 naver로그인 페이지
    - * 
    - * 
    - * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    - *
    - * 
    - * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 2021. 7. 12. JSYOO 최초 생성 - * - * - * @author 이씨플라자 * DIGITALSHIP JSYOO - * @since 2021. 7. 12. - * @version 1.0 - * - */ - %> -<%@ page language="java" contentType="text/html; charset=UTF-8" - pageEncoding="UTF-8"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> - - - - - - - - +<% +/** + *
    + * @Class Name : naverLoginResultPopup.jsp
    + * 
    + * @Description : 로그인시 naver로그인 페이지
    + * 
    + * 
    + * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    + *
    + * 
    + * + * @ ------------ -------- --------------------------- + * @ 수정일 수정자 수정내용 + * @ ------------ -------- --------------------------- + * @ 2021. 7. 12. JSYOO 최초 생성 + * + * + * @author 이씨플라자 * DIGITALSHIP JSYOO + * @since 2021. 7. 12. + * @version 1.0 + * + */ + %> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> + + + + + + + + diff --git a/src/main/webapp/WEB-INF/jsp/nlib/popup/naverSignResultPopup.jsp b/src/main/webapp/WEB-INF/jsp/nlib/popup/naverSignResultPopup.jsp index e4240692..9f009a7c 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/popup/naverSignResultPopup.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/popup/naverSignResultPopup.jsp @@ -1,56 +1,56 @@ -<% -/** - *
    - * @Class Name : naverSignResultPopup.jsp
    - * 
    - * @Description : 회원가입시 naver로그인 페이지
    - * 
    - * 
    - * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    - *
    - * 
    - * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 2021. 7. 12. JSYOO 최초 생성 - * - * - * @author 이씨플라자 * DIGITALSHIP JSYOO - * @since 2021. 7. 12. - * @version 1.0 - * - */ - %> -<%@ page language="java" contentType="text/html; charset=UTF-8" - pageEncoding="UTF-8"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> - - - - - - - - +<% +/** + *
    + * @Class Name : naverSignResultPopup.jsp
    + * 
    + * @Description : 회원가입시 naver로그인 페이지
    + * 
    + * 
    + * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    + *
    + * 
    + * + * @ ------------ -------- --------------------------- + * @ 수정일 수정자 수정내용 + * @ ------------ -------- --------------------------- + * @ 2021. 7. 12. JSYOO 최초 생성 + * + * + * @author 이씨플라자 * DIGITALSHIP JSYOO + * @since 2021. 7. 12. + * @version 1.0 + * + */ + %> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> + + + + + + + + diff --git a/src/main/webapp/WEB-INF/jsp/nlib/rent/listCancelRentItems.jsp b/src/main/webapp/WEB-INF/jsp/nlib/rent/listCancelRentItems.jsp index 47f3a3e8..04d264d9 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/rent/listCancelRentItems.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/rent/listCancelRentItems.jsp @@ -1,181 +1,181 @@ -<% -/** - *
    - * @Class Name : listCancelRentItems.jsp
    - * 
    - * @Description : 대출 취소목록을 조회한다.
    - * 
    - * 
    - * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    - *
    - * 
    - * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 2021. 7. 21. JSYOO 최초 생성 - * - * - * @author 이씨플라자 * DIGITALSHIP JSYOO - * @since 2021. 7. 21. - * @version 1.0 - * - */ - %> -<%@ page language="java" contentType="text/html; charset=UTF-8" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> -<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> -<%@ 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" %> - -대출 취소 - - - - -${pageTitle} - - - - - - - - - - -

    대출 취소

    - -
    - - - - - - - - - - - - -
    - -
    - - - - - +<% +/** + *
    + * @Class Name : listCancelRentItems.jsp
    + * 
    + * @Description : 대출 취소목록을 조회한다.
    + * 
    + * 
    + * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    + *
    + * 
    + * + * @ ------------ -------- --------------------------- + * @ 수정일 수정자 수정내용 + * @ ------------ -------- --------------------------- + * @ 2021. 7. 21. JSYOO 최초 생성 + * + * + * @author 이씨플라자 * DIGITALSHIP JSYOO + * @since 2021. 7. 21. + * @version 1.0 + * + */ + %> +<%@ page language="java" contentType="text/html; charset=UTF-8" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +<%@ 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" %> + +대출 취소 + + + + +${pageTitle} + + + + + + + + + + +

    대출 취소

    + +
    + + + + + + + + + + + + +
    + +
    + + + + + diff --git a/src/main/webapp/WEB-INF/jsp/nlib/rent/listRentItems.jsp b/src/main/webapp/WEB-INF/jsp/nlib/rent/listRentItems.jsp index a242832d..509f280c 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/rent/listRentItems.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/rent/listRentItems.jsp @@ -1,181 +1,181 @@ -<% -/** - *
    - * @Class Name : listRentItems.jsp
    - * 
    - * @Description : 대출 목록을 조회한다.
    - * 
    - * 
    - * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    - *
    - * 
    - * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 2021. 7. 21. JSYOO 최초 생성 - * - * - * @author 이씨플라자 * DIGITALSHIP JSYOO - * @since 2021. 7. 21. - * @version 1.0 - * - */ - %> -<%@ page language="java" contentType="text/html; charset=UTF-8" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> -<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> -<%@ 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" %> - -대출 목록 - - - - -${pageTitle} - - - - - - - - - - -

    대출 목록

    - -
    - - - - - - - - - - - - -
    - -
    - - - - - +<% +/** + *
    + * @Class Name : listRentItems.jsp
    + * 
    + * @Description : 대출 목록을 조회한다.
    + * 
    + * 
    + * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    + *
    + * 
    + * + * @ ------------ -------- --------------------------- + * @ 수정일 수정자 수정내용 + * @ ------------ -------- --------------------------- + * @ 2021. 7. 21. JSYOO 최초 생성 + * + * + * @author 이씨플라자 * DIGITALSHIP JSYOO + * @since 2021. 7. 21. + * @version 1.0 + * + */ + %> +<%@ page language="java" contentType="text/html; charset=UTF-8" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +<%@ 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" %> + +대출 목록 + + + + +${pageTitle} + + + + + + + + + + +

    대출 목록

    + +
    + + + + + + + + + + + + +
    + +
    + + + + + diff --git a/src/main/webapp/WEB-INF/jsp/nlib/rent/listReservations.jsp b/src/main/webapp/WEB-INF/jsp/nlib/rent/listReservations.jsp index 9df4bbdf..52ba516a 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/rent/listReservations.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/rent/listReservations.jsp @@ -1,181 +1,181 @@ -<% -/** - *
    - * @Class Name : listReserVations.jsp
    - * 
    - * @Description : 대출 예약 목록을 조회한다.
    - * 
    - * 
    - * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    - *
    - * 
    - * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 2021. 7. 21. JSYOO 최초 생성 - * - * - * @author 이씨플라자 * DIGITALSHIP JSYOO - * @since 2021. 7. 21. - * @version 1.0 - * - */ - %> -<%@ page language="java" contentType="text/html; charset=UTF-8" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> -<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> -<%@ 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" %> - -대출 예약 - - - - -${pageTitle} - - - - - - - - - - -

    대출 예약

    - -
    - - - - - - - - - - - - -
    - -
    - - - - - +<% +/** + *
    + * @Class Name : listReserVations.jsp
    + * 
    + * @Description : 대출 예약 목록을 조회한다.
    + * 
    + * 
    + * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    + *
    + * 
    + * + * @ ------------ -------- --------------------------- + * @ 수정일 수정자 수정내용 + * @ ------------ -------- --------------------------- + * @ 2021. 7. 21. JSYOO 최초 생성 + * + * + * @author 이씨플라자 * DIGITALSHIP JSYOO + * @since 2021. 7. 21. + * @version 1.0 + * + */ + %> +<%@ page language="java" contentType="text/html; charset=UTF-8" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +<%@ 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" %> + +대출 예약 + + + + +${pageTitle} + + + + + + + + + + +

    대출 예약

    + +
    + + + + + + + + + + + + +
    + +
    + + + + + diff --git a/src/main/webapp/WEB-INF/jsp/nlib/user/admin.jsp b/src/main/webapp/WEB-INF/jsp/nlib/user/admin.jsp index eee727ff..17c02276 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/user/admin.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/user/admin.jsp @@ -1,43 +1,43 @@ -<% -/** - *
    - * @Class Name : getSampleInfo.jsp
    - * 
    - * @Description : RESTful API 호출 샘플
    - * 
    - * 
    - * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    - *
    - * 
    - * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 2021. 6. 15. KNKIM 최초 생성 - * - * - * @author 이씨플라자 * DIGITALSHIP KNKIM - * @since 2021. 6. 15. - * @version 1.0 - * - */ - %> -<%@ page language="java" contentType="text/html; charset=UTF-8" %> - - 결과 - - - - -${pageTitle} - - - - - - -All - - - +<% +/** + *
    + * @Class Name : getSampleInfo.jsp
    + * 
    + * @Description : RESTful API 호출 샘플
    + * 
    + * 
    + * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    + *
    + * 
    + * + * @ ------------ -------- --------------------------- + * @ 수정일 수정자 수정내용 + * @ ------------ -------- --------------------------- + * @ 2021. 6. 15. KNKIM 최초 생성 + * + * + * @author 이씨플라자 * DIGITALSHIP KNKIM + * @since 2021. 6. 15. + * @version 1.0 + * + */ + %> +<%@ page language="java" contentType="text/html; charset=UTF-8" %> + - 결과 + + + + +${pageTitle} + + + + + + +All + + + diff --git a/src/main/webapp/WEB-INF/jsp/nlib/userInfo/getMyInfo.jsp b/src/main/webapp/WEB-INF/jsp/nlib/userInfo/getMyInfo.jsp index c3cb993d..f8c17bf3 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/userInfo/getMyInfo.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/userInfo/getMyInfo.jsp @@ -1,40 +1,40 @@ -<% -/** - *
    - * @Class Name : getMyInfo.jsp
    - * 
    - * @Description : 내 정보 조회
    - * 
    - * 
    - * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    - *
    - * 
    - * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 2021. 7. 12. JSYOO 최초 생성 - * - * - * @author 이씨플라자 * DIGITALSHIP JSYOO - * @since 2021. 7. 12. - * @version 1.0 - * - */ - %> -<%@ page language="java" contentType="text/html; charset=UTF-8" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> -<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> -<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> -<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags"%> - - - - -Insert title here - - -내 정보 수정 - +<% +/** + *
    + * @Class Name : getMyInfo.jsp
    + * 
    + * @Description : 내 정보 조회
    + * 
    + * 
    + * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    + *
    + * 
    + * + * @ ------------ -------- --------------------------- + * @ 수정일 수정자 수정내용 + * @ ------------ -------- --------------------------- + * @ 2021. 7. 12. JSYOO 최초 생성 + * + * + * @author 이씨플라자 * DIGITALSHIP JSYOO + * @since 2021. 7. 12. + * @version 1.0 + * + */ + %> +<%@ page language="java" contentType="text/html; charset=UTF-8" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> +<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags"%> + + + + +Insert title here + + +내 정보 수정 + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/nlib/userInfo/putMyInfo.jsp b/src/main/webapp/WEB-INF/jsp/nlib/userInfo/putMyInfo.jsp index 037aca19..9b9abb75 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/userInfo/putMyInfo.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/userInfo/putMyInfo.jsp @@ -1,254 +1,254 @@ -<% -/** - *
    - * @Class Name : putMyInfo.jsp
    - * 
    - * @Description : 내 정보 수정
    - * 
    - * 
    - * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    - *
    - * 
    - * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 2021. 7. 12. JSYOO 최초 생성 - * - * - * @author 이씨플라자 * DIGITALSHIP JSYOO - * @since 2021. 7. 12. - * @version 1.0 - * - */ - %> -<%@ page language="java" contentType="text/html; charset=UTF-8" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> -<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> -<%@ 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" %> - - - - - -Insert title here - - - - -
    -

    - 정보수정 -


    - -
    - - - - - - - - - - - - - - - - - -
    아이디 - required readonly > -
    이름 - required> -
    휴대전화 - > - -
    주소 - >
    - > > - -
    -
    - > - -
    -
    - - +<% +/** + *
    + * @Class Name : putMyInfo.jsp
    + * 
    + * @Description : 내 정보 수정
    + * 
    + * 
    + * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    + *
    + * 
    + * + * @ ------------ -------- --------------------------- + * @ 수정일 수정자 수정내용 + * @ ------------ -------- --------------------------- + * @ 2021. 7. 12. JSYOO 최초 생성 + * + * + * @author 이씨플라자 * DIGITALSHIP JSYOO + * @since 2021. 7. 12. + * @version 1.0 + * + */ + %> +<%@ page language="java" contentType="text/html; charset=UTF-8" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +<%@ 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" %> + + + + + +Insert title here + + + + +
    +

    + 정보수정 +


    + +
    + + + + + + + + + + + + + + + + + +
    아이디 + required readonly > +
    이름 + required> +
    휴대전화 + > + +
    주소 + >
    + > > + +
    +
    + > + +
    +
    + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/nlib/userInfo/pwCertMyInfo.jsp b/src/main/webapp/WEB-INF/jsp/nlib/userInfo/pwCertMyInfo.jsp index 15111d20..52b8bfae 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/userInfo/pwCertMyInfo.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/userInfo/pwCertMyInfo.jsp @@ -1,52 +1,52 @@ -<% -/** - *
    - * @Class Name : putMyInfo.jsp
    - * 
    - * @Description : 내 정보 수정
    - * 
    - * 
    - * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    - *
    - * 
    - * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 2021. 7. 12. JSYOO 최초 생성 - * - * - * @author 이씨플라자 * DIGITALSHIP JSYOO - * @since 2021. 7. 12. - * @version 1.0 - * - */ - %> -<%@ page language="java" contentType="text/html; charset=UTF-8" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> -<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> -<%@ 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" %> - - - - - -Insert title here - - - -

    비밀번호를 입력해주세요

    -
    - -
    - +<% +/** + *
    + * @Class Name : putMyInfo.jsp
    + * 
    + * @Description : 내 정보 수정
    + * 
    + * 
    + * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
    + *
    + * 
    + * + * @ ------------ -------- --------------------------- + * @ 수정일 수정자 수정내용 + * @ ------------ -------- --------------------------- + * @ 2021. 7. 12. JSYOO 최초 생성 + * + * + * @author 이씨플라자 * DIGITALSHIP JSYOO + * @since 2021. 7. 12. + * @version 1.0 + * + */ + %> +<%@ page language="java" contentType="text/html; charset=UTF-8" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +<%@ 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" %> + + + + + +Insert title here + + + +

    비밀번호를 입력해주세요

    +
    + +
    + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/tiles/inc/menu.jsp b/src/main/webapp/WEB-INF/tiles/inc/menu.jsp index c36fe470..4927b9a9 100644 --- a/src/main/webapp/WEB-INF/tiles/inc/menu.jsp +++ b/src/main/webapp/WEB-INF/tiles/inc/menu.jsp @@ -1,35 +1,35 @@ -<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> - - \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/tiles/tiles-layout.jsp b/src/main/webapp/WEB-INF/tiles/tiles-layout.jsp index fb377942..398944e5 100644 --- a/src/main/webapp/WEB-INF/tiles/tiles-layout.jsp +++ b/src/main/webapp/WEB-INF/tiles/tiles-layout.jsp @@ -1,53 +1,53 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> -<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> -<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> -<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles"%> - - - - - - - - - - - - - 온라인 자료대출관리 (N-LIB) - - - -
    - - -
    - - - -
    - -
    - - - - +<%@ page language="java" contentType="text/html; charset=UTF-8" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> +<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles"%> + + + + + + + + + + + + + 온라인 자료대출관리 (N-LIB) + + + +
    + + +
    + + + +
    + +
    + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/tiles/tiles-layout.xml b/src/main/webapp/WEB-INF/tiles/tiles-layout.xml index f47231ad..58e6df8f 100644 --- a/src/main/webapp/WEB-INF/tiles/tiles-layout.xml +++ b/src/main/webapp/WEB-INF/tiles/tiles-layout.xml @@ -1,40 +1,40 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index 94005e70..7c82d6bc 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -1,88 +1,88 @@ - - - nlib - - - encodingFilter - org.springframework.web.filter.CharacterEncodingFilter - - encoding - utf-8 - - - - encodingFilter - *.do - - - - HTMLTagFilter - egovframework.rte.ptl.mvc.filter.HTMLTagFilter - - - HTMLTagFilter - *.do - - - - - springSecurityFilterChain - org.springframework.web.filter.DelegatingFilterProxy - - - springSecurityFilterChain - /* - - - - contextConfigLocation - classpath*:egovframework/spring/context-*.xml - - - - org.springframework.web.context.ContextLoaderListener - - - - action - org.springframework.web.servlet.DispatcherServlet - - contextConfigLocation - /WEB-INF/config/egovframework/springmvc/dispatcher-servlet.xml - - 1 - - - - action - *.do - - - action - *.ajax - - - index.jsp - - - - BASIC - - - - java.lang.Throwable - /common/error.jsp - - - 404 - /common/error.jsp - - - 500 - /common/error.jsp - - - + + + nlib + + + encodingFilter + org.springframework.web.filter.CharacterEncodingFilter + + encoding + utf-8 + + + + encodingFilter + *.do + + + + HTMLTagFilter + egovframework.rte.ptl.mvc.filter.HTMLTagFilter + + + HTMLTagFilter + *.do + + + + + springSecurityFilterChain + org.springframework.web.filter.DelegatingFilterProxy + + + springSecurityFilterChain + /* + + + + contextConfigLocation + classpath*:egovframework/spring/context-*.xml + + + + org.springframework.web.context.ContextLoaderListener + + + + action + org.springframework.web.servlet.DispatcherServlet + + contextConfigLocation + /WEB-INF/config/egovframework/springmvc/dispatcher-servlet.xml + + 1 + + + + action + *.do + + + action + *.ajax + + + index.jsp + + + + BASIC + + + + java.lang.Throwable + /common/error.jsp + + + 404 + /common/error.jsp + + + 500 + /common/error.jsp + + + diff --git a/src/main/webapp/css/nlib.css b/src/main/webapp/css/nlib.css index 5911f98e..f69812f9 100644 --- a/src/main/webapp/css/nlib.css +++ b/src/main/webapp/css/nlib.css @@ -1,159 +1,159 @@ -/********************************************************************************/ -/* */ -/* Design RIAN */ -/* Date : 2007-03-21 */ -/* */ -/* */ -/********************************************************************************/ - -* {margin:0;padding:0;} - -h1 { - padding-bottom:20px; -} - -html { - height: 100%; - box-sizing: border-box; -} - -*, -*:before, -*:after { - box-sizing: inherit; -} - -body { - position: relative; - margin: 0; - padding-bottom: 6rem; - width: 100%; -} - -html, body { height: 100%; } - -#page-container { - padding-op: 150px; -} - -#content-wrap { - position: relative; - display: block; - padding: 20px; - top:120px; - padding-bottom: 100px; -} - -.gnb li { - float: left; - padding: 0px; - padding-right: 20px; -} - -.gnb li a { - color: #fff; - font-weight: 600; - font-size: 16px; -} - -.gnb-right { - padding-right: 40px; - position:relative; - top:-20px; -} - -.gnb-right li { - float: right; - padding: 0px; - padding-right: 20px; - color: orange; -} - -.gnb-right li a { - color: #333; - font-weight: bolder; - font-size: 14px; -} - -#header { - width: 100%; - height: 60px; - font-weight:bolder; - position: fixed; - background: #fff; - padding: 20px; - color: #000; - font-weight: 900; - font: 16px "Noto Sans KR", sans-serif; - z-index: 10000; -} - -#menu { - width: 100%; - height: 60px; /* Footer height */ - position: fixed; - top:60px; - font-weight:bold; - background: #2781C1; - padding: 20px; - z-index: 10000; - font: 16px "Noto Sans KR", sans-serif; -} - -#footer { - margin: 0; - padding: 1rem; - color: #AAAAAA; - background-color: #333333; - position: fixed; - width: 100%; - display: block; - text-align: center; - right: 0; - bottom: 0; - left: 0; - bottom: 0; -} - -#jsGrid { - margin-top: 20px; - margin-bottom: 10px; -} - -ul, ol, li { - list-style: none; -} - -a { - color: inherit; - text-decoration: none; - background-color: transparent; - font: 16px "Noto Sans KR", sans-serif; - color: blue; -} - -button { - floating: right; - cursor: pointer; -} - - -.float{ - height:40px; - float: right; - background-color:#ddd; - color:#000; - text-align:center; - box-shadow: 2px 2px 3px #999; - padding: 10px; - margin-right: 10px; - margin-top: 10px; -} - -.table_content table { - width: 100% !important; - margin-top: 10px; -} -.table_content table, th, td { - border: 1px solid #444444; -} +/********************************************************************************/ +/* */ +/* Design RIAN */ +/* Date : 2007-03-21 */ +/* */ +/* */ +/********************************************************************************/ + +* {margin:0;padding:0;} + +h1 { + padding-bottom:20px; +} + +html { + height: 100%; + box-sizing: border-box; +} + +*, +*:before, +*:after { + box-sizing: inherit; +} + +body { + position: relative; + margin: 0; + padding-bottom: 6rem; + width: 100%; +} + +html, body { height: 100%; } + +#page-container { + padding-op: 150px; +} + +#content-wrap { + position: relative; + display: block; + padding: 20px; + top:120px; + padding-bottom: 100px; +} + +.gnb li { + float: left; + padding: 0px; + padding-right: 20px; +} + +.gnb li a { + color: #fff; + font-weight: 600; + font-size: 16px; +} + +.gnb-right { + padding-right: 40px; + position:relative; + top:-20px; +} + +.gnb-right li { + float: right; + padding: 0px; + padding-right: 20px; + color: orange; +} + +.gnb-right li a { + color: #333; + font-weight: bolder; + font-size: 14px; +} + +#header { + width: 100%; + height: 60px; + font-weight:bolder; + position: fixed; + background: #fff; + padding: 20px; + color: #000; + font-weight: 900; + font: 16px "Noto Sans KR", sans-serif; + z-index: 10000; +} + +#menu { + width: 100%; + height: 60px; /* Footer height */ + position: fixed; + top:60px; + font-weight:bold; + background: #2781C1; + padding: 20px; + z-index: 10000; + font: 16px "Noto Sans KR", sans-serif; +} + +#footer { + margin: 0; + padding: 1rem; + color: #AAAAAA; + background-color: #333333; + position: fixed; + width: 100%; + display: block; + text-align: center; + right: 0; + bottom: 0; + left: 0; + bottom: 0; +} + +#jsGrid { + margin-top: 20px; + margin-bottom: 10px; +} + +ul, ol, li { + list-style: none; +} + +a { + color: inherit; + text-decoration: none; + background-color: transparent; + font: 16px "Noto Sans KR", sans-serif; + color: blue; +} + +button { + floating: right; + cursor: pointer; +} + + +.float{ + height:40px; + float: right; + background-color:#ddd; + color:#000; + text-align:center; + box-shadow: 2px 2px 3px #999; + padding: 10px; + margin-right: 10px; + margin-top: 10px; +} + +.table_content table { + width: 100% !important; + margin-top: 10px; +} +.table_content table, th, td { + border: 1px solid #444444; +} diff --git a/src/main/webapp/js/fileupload/dropzone.css b/src/main/webapp/js/fileupload/dropzone.css index 0a66fa98..c63017fb 100644 --- a/src/main/webapp/js/fileupload/dropzone.css +++ b/src/main/webapp/js/fileupload/dropzone.css @@ -1,394 +1,394 @@ -@-webkit-keyframes passing-through { - 0% { - opacity: 0; - -webkit-transform: translateY(40px); - -moz-transform: translateY(40px); - -ms-transform: translateY(40px); - -o-transform: translateY(40px); - transform: translateY(40px); } - 30%, 70% { - opacity: 1; - -webkit-transform: translateY(0px); - -moz-transform: translateY(0px); - -ms-transform: translateY(0px); - -o-transform: translateY(0px); - transform: translateY(0px); } - 100% { - opacity: 0; - -webkit-transform: translateY(-40px); - -moz-transform: translateY(-40px); - -ms-transform: translateY(-40px); - -o-transform: translateY(-40px); - transform: translateY(-40px); } } -@-moz-keyframes passing-through { - 0% { - opacity: 0; - -webkit-transform: translateY(40px); - -moz-transform: translateY(40px); - -ms-transform: translateY(40px); - -o-transform: translateY(40px); - transform: translateY(40px); } - 30%, 70% { - opacity: 1; - -webkit-transform: translateY(0px); - -moz-transform: translateY(0px); - -ms-transform: translateY(0px); - -o-transform: translateY(0px); - transform: translateY(0px); } - 100% { - opacity: 0; - -webkit-transform: translateY(-40px); - -moz-transform: translateY(-40px); - -ms-transform: translateY(-40px); - -o-transform: translateY(-40px); - transform: translateY(-40px); } } -@keyframes passing-through { - 0% { - opacity: 0; - -webkit-transform: translateY(40px); - -moz-transform: translateY(40px); - -ms-transform: translateY(40px); - -o-transform: translateY(40px); - transform: translateY(40px); } - 30%, 70% { - opacity: 1; - -webkit-transform: translateY(0px); - -moz-transform: translateY(0px); - -ms-transform: translateY(0px); - -o-transform: translateY(0px); - transform: translateY(0px); } - 100% { - opacity: 0; - -webkit-transform: translateY(-40px); - -moz-transform: translateY(-40px); - -ms-transform: translateY(-40px); - -o-transform: translateY(-40px); - transform: translateY(-40px); } } -@-webkit-keyframes slide-in { - 0% { - opacity: 0; - -webkit-transform: translateY(40px); - -moz-transform: translateY(40px); - -ms-transform: translateY(40px); - -o-transform: translateY(40px); - transform: translateY(40px); } - 30% { - opacity: 1; - -webkit-transform: translateY(0px); - -moz-transform: translateY(0px); - -ms-transform: translateY(0px); - -o-transform: translateY(0px); - transform: translateY(0px); } } -@-moz-keyframes slide-in { - 0% { - opacity: 0; - -webkit-transform: translateY(40px); - -moz-transform: translateY(40px); - -ms-transform: translateY(40px); - -o-transform: translateY(40px); - transform: translateY(40px); } - 30% { - opacity: 1; - -webkit-transform: translateY(0px); - -moz-transform: translateY(0px); - -ms-transform: translateY(0px); - -o-transform: translateY(0px); - transform: translateY(0px); } } -@keyframes slide-in { - 0% { - opacity: 0; - -webkit-transform: translateY(40px); - -moz-transform: translateY(40px); - -ms-transform: translateY(40px); - -o-transform: translateY(40px); - transform: translateY(40px); } - 30% { - opacity: 1; - -webkit-transform: translateY(0px); - -moz-transform: translateY(0px); - -ms-transform: translateY(0px); - -o-transform: translateY(0px); - transform: translateY(0px); } } -@-webkit-keyframes pulse { - 0% { - -webkit-transform: scale(1); - -moz-transform: scale(1); - -ms-transform: scale(1); - -o-transform: scale(1); - transform: scale(1); } - 10% { - -webkit-transform: scale(1.1); - -moz-transform: scale(1.1); - -ms-transform: scale(1.1); - -o-transform: scale(1.1); - transform: scale(1.1); } - 20% { - -webkit-transform: scale(1); - -moz-transform: scale(1); - -ms-transform: scale(1); - -o-transform: scale(1); - transform: scale(1); } } -@-moz-keyframes pulse { - 0% { - -webkit-transform: scale(1); - -moz-transform: scale(1); - -ms-transform: scale(1); - -o-transform: scale(1); - transform: scale(1); } - 10% { - -webkit-transform: scale(1.1); - -moz-transform: scale(1.1); - -ms-transform: scale(1.1); - -o-transform: scale(1.1); - transform: scale(1.1); } - 20% { - -webkit-transform: scale(1); - -moz-transform: scale(1); - -ms-transform: scale(1); - -o-transform: scale(1); - transform: scale(1); } } -@keyframes pulse { - 0% { - -webkit-transform: scale(1); - -moz-transform: scale(1); - -ms-transform: scale(1); - -o-transform: scale(1); - transform: scale(1); } - 10% { - -webkit-transform: scale(1.1); - -moz-transform: scale(1.1); - -ms-transform: scale(1.1); - -o-transform: scale(1.1); - transform: scale(1.1); } - 20% { - -webkit-transform: scale(1); - -moz-transform: scale(1); - -ms-transform: scale(1); - -o-transform: scale(1); - transform: scale(1); } } -.dropzone, .dropzone * { - box-sizing: border-box; } - -.dropzone { - min-height: 80px; /* NLIB */ - border: 2px solid rgba(0, 0, 0, 0.3); - background: white; - padding: 0px 10px; /* NLIB */ - } - .dropzone.dz-clickable { - cursor: pointer; } - .dropzone.dz-clickable * { - cursor: default; } - .dropzone.dz-clickable .dz-message, .dropzone.dz-clickable .dz-message * { - cursor: pointer; } - .dropzone.dz-started .dz-message { - display: none; } - .dropzone.dz-drag-hover { - border-style: solid; } - .dropzone.dz-drag-hover .dz-message { - opacity: 0.5; } - .dropzone .dz-message { - text-align: center; - margin: 1em 0; } - .dropzone .dz-message .dz-button { - background: none; - color: inherit; - border: none; - padding: 0; - font: inherit; - cursor: pointer; - outline: inherit; } - .dropzone .dz-preview { - position: relative; - display: inline-block; - vertical-align: top; - margin: 16px; - min-height: 60px; /* NLIB */ - } - .dropzone .dz-preview:hover { - z-index: 1000; } - .dropzone .dz-preview:hover .dz-details { - opacity: 1; } - .dropzone .dz-preview.dz-file-preview .dz-image { - border-radius: 20px; - background: #999; - background: linear-gradient(to bottom, #eee, #ddd); } - .dropzone .dz-preview.dz-file-preview .dz-details { - opacity: 1; } - .dropzone .dz-preview.dz-image-preview { - background: white; } - .dropzone .dz-preview.dz-image-preview .dz-details { - -webkit-transition: opacity 0.2s linear; - -moz-transition: opacity 0.2s linear; - -ms-transition: opacity 0.2s linear; - -o-transition: opacity 0.2s linear; - transition: opacity 0.2s linear; } - .dropzone .dz-preview .dz-remove { - font-size: 14px; - text-align: center; - display: block; - cursor: pointer; - border: none; } - .dropzone .dz-preview .dz-remove:hover { - text-decoration: underline; } - .dropzone .dz-preview:hover .dz-details { - opacity: 1; } - .dropzone .dz-preview .dz-details { - z-index: 20; - position: absolute; - top: 0; - left: 0; - opacity: 0; - font-size: 13px; - min-width: 100%; - max-width: 100%; - padding: 0em 1em; /* NLIB */ - text-align: center; - color: rgba(0, 0, 0, 0.9); - line-height: 150%; } - .dropzone .dz-preview .dz-details .dz-size { - margin-bottom: 1em; - font-size: 16px; } - .dropzone .dz-preview .dz-details .dz-filename { - white-space: nowrap; } - .dropzone .dz-preview .dz-details .dz-filename:hover span { - border: 1px solid rgba(200, 200, 200, 0.8); - background-color: rgba(255, 255, 255, 0.8); } - .dropzone .dz-preview .dz-details .dz-filename:not(:hover) { - overflow: hidden; - text-overflow: ellipsis; } - .dropzone .dz-preview .dz-details .dz-filename:not(:hover) span { - border: 1px solid transparent; } - .dropzone .dz-preview .dz-details .dz-filename span, .dropzone .dz-preview .dz-details .dz-size span { - background-color: rgba(255, 255, 255, 0.4); - padding: 0 0.4em; - border-radius: 3px; } - .dropzone .dz-preview:hover .dz-image img { - -webkit-transform: scale(1.05, 1.05); - -moz-transform: scale(1.05, 1.05); - -ms-transform: scale(1.05, 1.05); - -o-transform: scale(1.05, 1.05); - transform: scale(1.05, 1.05); - -webkit-filter: blur(8px); - filter: blur(8px); } - .dropzone .dz-preview .dz-image { - border-radius: 20px; - overflow: hidden; - width: 120px; - height: 60px; /* NLIB */ - position: relative; - display: block; - z-index: 10; } - .dropzone .dz-preview .dz-image img { - display: block; } - .dropzone .dz-preview.dz-success .dz-success-mark { - -webkit-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1); - -moz-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1); - -ms-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1); - -o-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1); - animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1); } - .dropzone .dz-preview.dz-error .dz-error-mark { - opacity: 1; - -webkit-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1); - -moz-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1); - -ms-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1); - -o-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1); - animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1); } - .dropzone .dz-preview .dz-success-mark, .dropzone .dz-preview .dz-error-mark { - pointer-events: none; - opacity: 0; - z-index: 500; - position: absolute; - display: block; - top: 50%; - left: 50%; - margin-left: -27px; - margin-top: -27px; } - .dropzone .dz-preview .dz-success-mark svg, .dropzone .dz-preview .dz-error-mark svg { - display: block; - width: 54px; - height: 54px; } - .dropzone .dz-preview.dz-processing .dz-progress { - opacity: 1; - -webkit-transition: all 0.2s linear; - -moz-transition: all 0.2s linear; - -ms-transition: all 0.2s linear; - -o-transition: all 0.2s linear; - transition: all 0.2s linear; } - .dropzone .dz-preview.dz-complete .dz-progress { - opacity: 0; - -webkit-transition: opacity 0.4s ease-in; - -moz-transition: opacity 0.4s ease-in; - -ms-transition: opacity 0.4s ease-in; - -o-transition: opacity 0.4s ease-in; - transition: opacity 0.4s ease-in; } - .dropzone .dz-preview:not(.dz-processing) .dz-progress { - -webkit-animation: pulse 6s ease infinite; - -moz-animation: pulse 6s ease infinite; - -ms-animation: pulse 6s ease infinite; - -o-animation: pulse 6s ease infinite; - animation: pulse 6s ease infinite; } - .dropzone .dz-preview .dz-progress { - opacity: 1; - z-index: 1000; - pointer-events: none; - position: absolute; - height: 16px; - left: 50%; - top: 50%; - margin-top: -8px; - width: 80px; - margin-left: -40px; - background: rgba(255, 255, 255, 0.9); - -webkit-transform: scale(1); - border-radius: 8px; - overflow: hidden; } - .dropzone .dz-preview .dz-progress .dz-upload { - background: #333; - background: linear-gradient(to bottom, #666, #444); - position: absolute; - top: 0; - left: 0; - bottom: 0; - width: 0; - -webkit-transition: width 300ms ease-in-out; - -moz-transition: width 300ms ease-in-out; - -ms-transition: width 300ms ease-in-out; - -o-transition: width 300ms ease-in-out; - transition: width 300ms ease-in-out; } - .dropzone .dz-preview.dz-error .dz-error-message { - display: block; } - .dropzone .dz-preview.dz-error:hover .dz-error-message { - opacity: 1; - pointer-events: auto; } - .dropzone .dz-preview .dz-error-message { - pointer-events: none; - z-index: 1000; - position: absolute; - display: block; - display: none; - opacity: 0; - -webkit-transition: opacity 0.3s ease; - -moz-transition: opacity 0.3s ease; - -ms-transition: opacity 0.3s ease; - -o-transition: opacity 0.3s ease; - transition: opacity 0.3s ease; - border-radius: 8px; - font-size: 13px; - top: 130px; - left: -10px; - width: 140px; - background: #be2626; - background: linear-gradient(to bottom, #be2626, #a92222); - padding: 0.5em 1.2em; - color: white; } - .dropzone .dz-preview .dz-error-message:after { - content: ''; - position: absolute; - top: -6px; - left: 64px; - width: 0; - height: 0; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-bottom: 6px solid #be2626; } +@-webkit-keyframes passing-through { + 0% { + opacity: 0; + -webkit-transform: translateY(40px); + -moz-transform: translateY(40px); + -ms-transform: translateY(40px); + -o-transform: translateY(40px); + transform: translateY(40px); } + 30%, 70% { + opacity: 1; + -webkit-transform: translateY(0px); + -moz-transform: translateY(0px); + -ms-transform: translateY(0px); + -o-transform: translateY(0px); + transform: translateY(0px); } + 100% { + opacity: 0; + -webkit-transform: translateY(-40px); + -moz-transform: translateY(-40px); + -ms-transform: translateY(-40px); + -o-transform: translateY(-40px); + transform: translateY(-40px); } } +@-moz-keyframes passing-through { + 0% { + opacity: 0; + -webkit-transform: translateY(40px); + -moz-transform: translateY(40px); + -ms-transform: translateY(40px); + -o-transform: translateY(40px); + transform: translateY(40px); } + 30%, 70% { + opacity: 1; + -webkit-transform: translateY(0px); + -moz-transform: translateY(0px); + -ms-transform: translateY(0px); + -o-transform: translateY(0px); + transform: translateY(0px); } + 100% { + opacity: 0; + -webkit-transform: translateY(-40px); + -moz-transform: translateY(-40px); + -ms-transform: translateY(-40px); + -o-transform: translateY(-40px); + transform: translateY(-40px); } } +@keyframes passing-through { + 0% { + opacity: 0; + -webkit-transform: translateY(40px); + -moz-transform: translateY(40px); + -ms-transform: translateY(40px); + -o-transform: translateY(40px); + transform: translateY(40px); } + 30%, 70% { + opacity: 1; + -webkit-transform: translateY(0px); + -moz-transform: translateY(0px); + -ms-transform: translateY(0px); + -o-transform: translateY(0px); + transform: translateY(0px); } + 100% { + opacity: 0; + -webkit-transform: translateY(-40px); + -moz-transform: translateY(-40px); + -ms-transform: translateY(-40px); + -o-transform: translateY(-40px); + transform: translateY(-40px); } } +@-webkit-keyframes slide-in { + 0% { + opacity: 0; + -webkit-transform: translateY(40px); + -moz-transform: translateY(40px); + -ms-transform: translateY(40px); + -o-transform: translateY(40px); + transform: translateY(40px); } + 30% { + opacity: 1; + -webkit-transform: translateY(0px); + -moz-transform: translateY(0px); + -ms-transform: translateY(0px); + -o-transform: translateY(0px); + transform: translateY(0px); } } +@-moz-keyframes slide-in { + 0% { + opacity: 0; + -webkit-transform: translateY(40px); + -moz-transform: translateY(40px); + -ms-transform: translateY(40px); + -o-transform: translateY(40px); + transform: translateY(40px); } + 30% { + opacity: 1; + -webkit-transform: translateY(0px); + -moz-transform: translateY(0px); + -ms-transform: translateY(0px); + -o-transform: translateY(0px); + transform: translateY(0px); } } +@keyframes slide-in { + 0% { + opacity: 0; + -webkit-transform: translateY(40px); + -moz-transform: translateY(40px); + -ms-transform: translateY(40px); + -o-transform: translateY(40px); + transform: translateY(40px); } + 30% { + opacity: 1; + -webkit-transform: translateY(0px); + -moz-transform: translateY(0px); + -ms-transform: translateY(0px); + -o-transform: translateY(0px); + transform: translateY(0px); } } +@-webkit-keyframes pulse { + 0% { + -webkit-transform: scale(1); + -moz-transform: scale(1); + -ms-transform: scale(1); + -o-transform: scale(1); + transform: scale(1); } + 10% { + -webkit-transform: scale(1.1); + -moz-transform: scale(1.1); + -ms-transform: scale(1.1); + -o-transform: scale(1.1); + transform: scale(1.1); } + 20% { + -webkit-transform: scale(1); + -moz-transform: scale(1); + -ms-transform: scale(1); + -o-transform: scale(1); + transform: scale(1); } } +@-moz-keyframes pulse { + 0% { + -webkit-transform: scale(1); + -moz-transform: scale(1); + -ms-transform: scale(1); + -o-transform: scale(1); + transform: scale(1); } + 10% { + -webkit-transform: scale(1.1); + -moz-transform: scale(1.1); + -ms-transform: scale(1.1); + -o-transform: scale(1.1); + transform: scale(1.1); } + 20% { + -webkit-transform: scale(1); + -moz-transform: scale(1); + -ms-transform: scale(1); + -o-transform: scale(1); + transform: scale(1); } } +@keyframes pulse { + 0% { + -webkit-transform: scale(1); + -moz-transform: scale(1); + -ms-transform: scale(1); + -o-transform: scale(1); + transform: scale(1); } + 10% { + -webkit-transform: scale(1.1); + -moz-transform: scale(1.1); + -ms-transform: scale(1.1); + -o-transform: scale(1.1); + transform: scale(1.1); } + 20% { + -webkit-transform: scale(1); + -moz-transform: scale(1); + -ms-transform: scale(1); + -o-transform: scale(1); + transform: scale(1); } } +.dropzone, .dropzone * { + box-sizing: border-box; } + +.dropzone { + min-height: 80px; /* NLIB */ + border: 2px solid rgba(0, 0, 0, 0.3); + background: white; + padding: 0px 10px; /* NLIB */ + } + .dropzone.dz-clickable { + cursor: pointer; } + .dropzone.dz-clickable * { + cursor: default; } + .dropzone.dz-clickable .dz-message, .dropzone.dz-clickable .dz-message * { + cursor: pointer; } + .dropzone.dz-started .dz-message { + display: none; } + .dropzone.dz-drag-hover { + border-style: solid; } + .dropzone.dz-drag-hover .dz-message { + opacity: 0.5; } + .dropzone .dz-message { + text-align: center; + margin: 1em 0; } + .dropzone .dz-message .dz-button { + background: none; + color: inherit; + border: none; + padding: 0; + font: inherit; + cursor: pointer; + outline: inherit; } + .dropzone .dz-preview { + position: relative; + display: inline-block; + vertical-align: top; + margin: 16px; + min-height: 60px; /* NLIB */ + } + .dropzone .dz-preview:hover { + z-index: 1000; } + .dropzone .dz-preview:hover .dz-details { + opacity: 1; } + .dropzone .dz-preview.dz-file-preview .dz-image { + border-radius: 20px; + background: #999; + background: linear-gradient(to bottom, #eee, #ddd); } + .dropzone .dz-preview.dz-file-preview .dz-details { + opacity: 1; } + .dropzone .dz-preview.dz-image-preview { + background: white; } + .dropzone .dz-preview.dz-image-preview .dz-details { + -webkit-transition: opacity 0.2s linear; + -moz-transition: opacity 0.2s linear; + -ms-transition: opacity 0.2s linear; + -o-transition: opacity 0.2s linear; + transition: opacity 0.2s linear; } + .dropzone .dz-preview .dz-remove { + font-size: 14px; + text-align: center; + display: block; + cursor: pointer; + border: none; } + .dropzone .dz-preview .dz-remove:hover { + text-decoration: underline; } + .dropzone .dz-preview:hover .dz-details { + opacity: 1; } + .dropzone .dz-preview .dz-details { + z-index: 20; + position: absolute; + top: 0; + left: 0; + opacity: 0; + font-size: 13px; + min-width: 100%; + max-width: 100%; + padding: 0em 1em; /* NLIB */ + text-align: center; + color: rgba(0, 0, 0, 0.9); + line-height: 150%; } + .dropzone .dz-preview .dz-details .dz-size { + margin-bottom: 1em; + font-size: 16px; } + .dropzone .dz-preview .dz-details .dz-filename { + white-space: nowrap; } + .dropzone .dz-preview .dz-details .dz-filename:hover span { + border: 1px solid rgba(200, 200, 200, 0.8); + background-color: rgba(255, 255, 255, 0.8); } + .dropzone .dz-preview .dz-details .dz-filename:not(:hover) { + overflow: hidden; + text-overflow: ellipsis; } + .dropzone .dz-preview .dz-details .dz-filename:not(:hover) span { + border: 1px solid transparent; } + .dropzone .dz-preview .dz-details .dz-filename span, .dropzone .dz-preview .dz-details .dz-size span { + background-color: rgba(255, 255, 255, 0.4); + padding: 0 0.4em; + border-radius: 3px; } + .dropzone .dz-preview:hover .dz-image img { + -webkit-transform: scale(1.05, 1.05); + -moz-transform: scale(1.05, 1.05); + -ms-transform: scale(1.05, 1.05); + -o-transform: scale(1.05, 1.05); + transform: scale(1.05, 1.05); + -webkit-filter: blur(8px); + filter: blur(8px); } + .dropzone .dz-preview .dz-image { + border-radius: 20px; + overflow: hidden; + width: 120px; + height: 60px; /* NLIB */ + position: relative; + display: block; + z-index: 10; } + .dropzone .dz-preview .dz-image img { + display: block; } + .dropzone .dz-preview.dz-success .dz-success-mark { + -webkit-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1); + -moz-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1); + -ms-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1); + -o-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1); + animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1); } + .dropzone .dz-preview.dz-error .dz-error-mark { + opacity: 1; + -webkit-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1); + -moz-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1); + -ms-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1); + -o-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1); + animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1); } + .dropzone .dz-preview .dz-success-mark, .dropzone .dz-preview .dz-error-mark { + pointer-events: none; + opacity: 0; + z-index: 500; + position: absolute; + display: block; + top: 50%; + left: 50%; + margin-left: -27px; + margin-top: -27px; } + .dropzone .dz-preview .dz-success-mark svg, .dropzone .dz-preview .dz-error-mark svg { + display: block; + width: 54px; + height: 54px; } + .dropzone .dz-preview.dz-processing .dz-progress { + opacity: 1; + -webkit-transition: all 0.2s linear; + -moz-transition: all 0.2s linear; + -ms-transition: all 0.2s linear; + -o-transition: all 0.2s linear; + transition: all 0.2s linear; } + .dropzone .dz-preview.dz-complete .dz-progress { + opacity: 0; + -webkit-transition: opacity 0.4s ease-in; + -moz-transition: opacity 0.4s ease-in; + -ms-transition: opacity 0.4s ease-in; + -o-transition: opacity 0.4s ease-in; + transition: opacity 0.4s ease-in; } + .dropzone .dz-preview:not(.dz-processing) .dz-progress { + -webkit-animation: pulse 6s ease infinite; + -moz-animation: pulse 6s ease infinite; + -ms-animation: pulse 6s ease infinite; + -o-animation: pulse 6s ease infinite; + animation: pulse 6s ease infinite; } + .dropzone .dz-preview .dz-progress { + opacity: 1; + z-index: 1000; + pointer-events: none; + position: absolute; + height: 16px; + left: 50%; + top: 50%; + margin-top: -8px; + width: 80px; + margin-left: -40px; + background: rgba(255, 255, 255, 0.9); + -webkit-transform: scale(1); + border-radius: 8px; + overflow: hidden; } + .dropzone .dz-preview .dz-progress .dz-upload { + background: #333; + background: linear-gradient(to bottom, #666, #444); + position: absolute; + top: 0; + left: 0; + bottom: 0; + width: 0; + -webkit-transition: width 300ms ease-in-out; + -moz-transition: width 300ms ease-in-out; + -ms-transition: width 300ms ease-in-out; + -o-transition: width 300ms ease-in-out; + transition: width 300ms ease-in-out; } + .dropzone .dz-preview.dz-error .dz-error-message { + display: block; } + .dropzone .dz-preview.dz-error:hover .dz-error-message { + opacity: 1; + pointer-events: auto; } + .dropzone .dz-preview .dz-error-message { + pointer-events: none; + z-index: 1000; + position: absolute; + display: block; + display: none; + opacity: 0; + -webkit-transition: opacity 0.3s ease; + -moz-transition: opacity 0.3s ease; + -ms-transition: opacity 0.3s ease; + -o-transition: opacity 0.3s ease; + transition: opacity 0.3s ease; + border-radius: 8px; + font-size: 13px; + top: 130px; + left: -10px; + width: 140px; + background: #be2626; + background: linear-gradient(to bottom, #be2626, #a92222); + padding: 0.5em 1.2em; + color: white; } + .dropzone .dz-preview .dz-error-message:after { + content: ''; + position: absolute; + top: -6px; + left: 64px; + width: 0; + height: 0; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-bottom: 6px solid #be2626; } diff --git a/src/main/webapp/js/fileupload/dropzone.js b/src/main/webapp/js/fileupload/dropzone.js index 53bacd19..c8a34081 100644 --- a/src/main/webapp/js/fileupload/dropzone.js +++ b/src/main/webapp/js/fileupload/dropzone.js @@ -1,1754 +1,1754 @@ - -/* - * - * More info at [www.dropzonejs.com](http://www.dropzonejs.com) - * - * Copyright (c) 2012, Matias Meno - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * - */ - -(function() { - var Dropzone, Emitter, camelize, contentLoaded, detectVerticalSquash, drawImageIOSFix, noop, without, - __slice = [].slice, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; - - noop = function() {}; - - Emitter = (function() { - function Emitter() {} - - Emitter.prototype.addEventListener = Emitter.prototype.on; - - Emitter.prototype.on = function(event, fn) { - this._callbacks = this._callbacks || {}; - if (!this._callbacks[event]) { - this._callbacks[event] = []; - } - this._callbacks[event].push(fn); - return this; - }; - - Emitter.prototype.emit = function() { - var args, callback, callbacks, event, _i, _len; - event = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : []; - this._callbacks = this._callbacks || {}; - callbacks = this._callbacks[event]; - if (callbacks) { - for (_i = 0, _len = callbacks.length; _i < _len; _i++) { - callback = callbacks[_i]; - callback.apply(this, args); - } - } - return this; - }; - - Emitter.prototype.removeListener = Emitter.prototype.off; - - Emitter.prototype.removeAllListeners = Emitter.prototype.off; - - Emitter.prototype.removeEventListener = Emitter.prototype.off; - - Emitter.prototype.off = function(event, fn) { - var callback, callbacks, i, _i, _len; - if (!this._callbacks || arguments.length === 0) { - this._callbacks = {}; - return this; - } - callbacks = this._callbacks[event]; - if (!callbacks) { - return this; - } - if (arguments.length === 1) { - delete this._callbacks[event]; - return this; - } - for (i = _i = 0, _len = callbacks.length; _i < _len; i = ++_i) { - callback = callbacks[i]; - if (callback === fn) { - callbacks.splice(i, 1); - break; - } - } - return this; - }; - - return Emitter; - - })(); - - Dropzone = (function(_super) { - var extend, resolveOption; - - __extends(Dropzone, _super); - - Dropzone.prototype.Emitter = Emitter; - - - /* - This is a list of all available events you can register on a dropzone object. - - You can register an event handler like this: - - 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.defaultOptions = { - url: null, - method: "post", - withCredentials: false, - parallelUploads: 2, - uploadMultiple: false, - maxFilesize: 256, - paramName: "file", - createImageThumbnails: true, - maxThumbnailFilesize: 10, - thumbnailWidth: 120, - //thumbnailHeight: 120, - thumbnailHeight: 60, // NLIB - filesizeBase: 1000, - maxFiles: null, - params: {}, - clickable: true, - ignoreHiddenFiles: true, - // acceptedFiles: null, - acceptedFiles: "image/*", // NLIB - acceptedMimeTypes: null, - //autoProcessQueue: true, - autoProcessQueue: false, // NLIB - autoQueue: true, - //addRemoveLinks: false, - addRemoveLinks: true, // NLIB - previewsContainer: null, - capture: null, - dictDefaultMessage: "Drop files here to upload", - dictFallbackMessage: "파일 드래그앤드랍을 지원하지 않는 브라우저입니다.", // "Your browser does not support drag'n'drop file uploads.", - 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.", - dictInvalidFileType: "You can't upload files of this type.", - dictResponseError: "Server responded with {{statusCode}} code.", - dictCancelUpload: "Cancel upload", - dictCancelUploadConfirmation: "Are you sure you want to cancel this upload?", - //dictRemoveFile: "Remove file", - dictRemoveFile: "취소", // NLIB - dictRemoveFileConfirmation: null, - dictMaxFilesExceeded: "You can not upload any more files.", - accept: function(file, done) { - return done(); - }, - init: function() { - return noop; - }, - forceFallback: false, - fallback: function() { - var child, messageElement, span, _i, _len, _ref; - this.element.className = "" + this.element.className + " dz-browser-not-supported"; - _ref = this.element.getElementsByTagName("div"); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - child = _ref[_i]; - if (/(^| )dz-message($| )/.test(child.className)) { - messageElement = child; - child.className = "dz-message"; - continue; - } - } - if (!messageElement) { - messageElement = Dropzone.createElement("
    "); - this.element.appendChild(messageElement); - } - span = messageElement.getElementsByTagName("span")[0]; - if (span) { - if (span.textContent != null) { - span.textContent = this.options.dictFallbackMessage; - } else if (span.innerText != null) { - span.innerText = this.options.dictFallbackMessage; - } - } - return this.element.appendChild(this.getFallbackForm()); - }, - resize: function(file) { - var info, srcRatio, trgRatio; - info = { - srcX: 0, - srcY: 0, - srcWidth: file.width, - srcHeight: file.height - }; - srcRatio = file.width / file.height; - info.optWidth = this.options.thumbnailWidth; - info.optHeight = this.options.thumbnailHeight; - if ((info.optWidth == null) && (info.optHeight == null)) { - info.optWidth = info.srcWidth; - info.optHeight = info.srcHeight; - } else if (info.optWidth == null) { - info.optWidth = srcRatio * info.optHeight; - } else if (info.optHeight == null) { - info.optHeight = (1 / srcRatio) * info.optWidth; - } - trgRatio = info.optWidth / info.optHeight; - if (file.height < info.optHeight || file.width < info.optWidth) { - info.trgHeight = info.srcHeight; - info.trgWidth = info.srcWidth; - } else { - if (srcRatio > trgRatio) { - info.srcHeight = file.height; - info.srcWidth = info.srcHeight * trgRatio; - } else { - info.srcWidth = file.width; - info.srcHeight = info.srcWidth / trgRatio; - } - } - info.srcX = (file.width - info.srcWidth) / 2; - info.srcY = (file.height - info.srcHeight) / 2; - return info; - }, - - /* - Those functions register themselves to the events on init and handle all - the user interface specific stuff. Overwriting them won't break the upload - but can break the way it's displayed. - You can overwrite them if you don't like the default behavior. If you just - want to add an additional event handler, register it on the dropzone object - and don't overwrite those options. - */ - drop: function(e) { - return this.element.classList.remove("dz-drag-hover"); - }, - dragstart: noop, - dragend: function(e) { - return this.element.classList.remove("dz-drag-hover"); - }, - dragenter: function(e) { - return this.element.classList.add("dz-drag-hover"); - }, - dragover: function(e) { - return this.element.classList.add("dz-drag-hover"); - }, - dragleave: function(e) { - return this.element.classList.remove("dz-drag-hover"); - }, - paste: noop, - reset: function() { - return this.element.classList.remove("dz-started"); - }, - addedfile: function(file) { - var node, removeFileEvent, removeLink, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _results; - if (this.element === this.previewsContainer) { - this.element.classList.add("dz-started"); - } - if (this.previewsContainer) { - file.previewElement = Dropzone.createElement(this.options.previewTemplate.trim()); - file.previewTemplate = file.previewElement; - this.previewsContainer.appendChild(file.previewElement); - _ref = file.previewElement.querySelectorAll("[data-dz-name]"); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - node = _ref[_i]; - node.textContent = file.name; - } - _ref1 = file.previewElement.querySelectorAll("[data-dz-size]"); - for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { - node = _ref1[_j]; - node.innerHTML = this.filesize(file.size); - } - if (this.options.addRemoveLinks) { - file._removeLink = Dropzone.createElement("" + this.options.dictRemoveFile + ""); - file.previewElement.appendChild(file._removeLink); - } - removeFileEvent = (function(_this) { - return function(e) { - e.preventDefault(); - e.stopPropagation(); - if (file.status === Dropzone.UPLOADING) { - return Dropzone.confirm(_this.options.dictCancelUploadConfirmation, function() { - return _this.removeFile(file); - }); - } else { - if (_this.options.dictRemoveFileConfirmation) { - return Dropzone.confirm(_this.options.dictRemoveFileConfirmation, function() { - return _this.removeFile(file); - }); - } else { - return _this.removeFile(file); - } - } - }; - })(this); - _ref2 = file.previewElement.querySelectorAll("[data-dz-remove]"); - _results = []; - for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) { - removeLink = _ref2[_k]; - _results.push(removeLink.addEventListener("click", removeFileEvent)); - } - return _results; - } - }, - removedfile: function(file) { - var _ref; - if (file.previewElement) { - if ((_ref = file.previewElement) != null) { - _ref.parentNode.removeChild(file.previewElement); - } - } - return this._updateMaxFilesReachedClass(); - }, - thumbnail: function(file, dataUrl) { - var thumbnailElement, _i, _len, _ref; - if (file.previewElement) { - file.previewElement.classList.remove("dz-file-preview"); - _ref = file.previewElement.querySelectorAll("[data-dz-thumbnail]"); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - thumbnailElement = _ref[_i]; - thumbnailElement.alt = file.name; - thumbnailElement.src = dataUrl; - } - return setTimeout(((function(_this) { - return function() { - return file.previewElement.classList.add("dz-image-preview"); - }; - })(this)), 1); - } - }, - error: function(file, message) { - var node, _i, _len, _ref, _results; - if (file.previewElement) { - file.previewElement.classList.add("dz-error"); - if (typeof message !== "String" && message.error) { - message = message.error; - } - _ref = file.previewElement.querySelectorAll("[data-dz-errormessage]"); - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - node = _ref[_i]; - _results.push(node.textContent = message); - } - return _results; - } - }, - errormultiple: noop, - processing: function(file) { - if (file.previewElement) { - file.previewElement.classList.add("dz-processing"); - if (file._removeLink) { - return file._removeLink.textContent = this.options.dictCancelUpload; - } - } - }, - processingmultiple: noop, - uploadprogress: function(file, progress, bytesSent) { - var node, _i, _len, _ref, _results; - if (file.previewElement) { - _ref = file.previewElement.querySelectorAll("[data-dz-uploadprogress]"); - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - node = _ref[_i]; - if (node.nodeName === 'PROGRESS') { - _results.push(node.value = progress); - } else { - _results.push(node.style.width = "" + progress + "%"); - } - } - return _results; - } - }, - totaluploadprogress: noop, - sending: noop, - sendingmultiple: noop, - success: function(file) { - if (file.previewElement) { - return file.previewElement.classList.add("dz-success"); - } - }, - successmultiple: noop, - canceled: function(file) { - return this.emit("error", file, "Upload canceled."); - }, - canceledmultiple: noop, - complete: function(file) { - if (file._removeLink) { - file._removeLink.textContent = this.options.dictRemoveFile; - } - if (file.previewElement) { - return file.previewElement.classList.add("dz-complete"); - } - }, - completemultiple: noop, - maxfilesexceeded: noop, - 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
    " - }; - - extend = function() { - var key, object, objects, target, val, _i, _len; - target = arguments[0], objects = 2 <= arguments.length ? __slice.call(arguments, 1) : []; - for (_i = 0, _len = objects.length; _i < _len; _i++) { - object = objects[_i]; - for (key in object) { - val = object[key]; - target[key] = val; - } - } - return target; - }; - - function Dropzone(element, options) { - var elementOptions, fallback, _ref; - this.element = element; - this.version = Dropzone.version; - this.defaultOptions.previewTemplate = this.defaultOptions.previewTemplate.replace(/\n*/g, ""); - this.clickableElements = []; - this.listeners = []; - this.files = []; - if (typeof this.element === "string") { - this.element = document.querySelector(this.element); - } - if (!(this.element && (this.element.nodeType != null))) { - throw new Error("Invalid dropzone element."); - } - if (this.element.dropzone) { - throw new Error("Dropzone already attached."); - } - Dropzone.instances.push(this); - this.element.dropzone = this; - elementOptions = (_ref = Dropzone.optionsForElement(this.element)) != null ? _ref : {}; - this.options = extend({}, this.defaultOptions, elementOptions, options != null ? options : {}); - if (this.options.forceFallback || !Dropzone.isBrowserSupported()) { - return this.options.fallback.call(this); - } - if (this.options.url == null) { - this.options.url = this.element.getAttribute("action"); - } - if (!this.options.url) { - throw new Error("No URL provided."); - } - if (this.options.acceptedFiles && this.options.acceptedMimeTypes) { - throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated."); - } - if (this.options.acceptedMimeTypes) { - this.options.acceptedFiles = this.options.acceptedMimeTypes; - delete this.options.acceptedMimeTypes; - } - this.options.method = this.options.method.toUpperCase(); - if ((fallback = this.getExistingFallback()) && fallback.parentNode) { - fallback.parentNode.removeChild(fallback); - } - if (this.options.previewsContainer !== false) { - if (this.options.previewsContainer) { - this.previewsContainer = Dropzone.getElement(this.options.previewsContainer, "previewsContainer"); - } else { - this.previewsContainer = this.element; - } - } - if (this.options.clickable) { - if (this.options.clickable === true) { - this.clickableElements = [this.element]; - } else { - this.clickableElements = Dropzone.getElements(this.options.clickable, "clickable"); - } - } - this.init(); - } - - Dropzone.prototype.getAcceptedFiles = function() { - var file, _i, _len, _ref, _results; - _ref = this.files; - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - file = _ref[_i]; - if (file.accepted) { - _results.push(file); - } - } - return _results; - }; - - Dropzone.prototype.getRejectedFiles = function() { - var file, _i, _len, _ref, _results; - _ref = this.files; - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - file = _ref[_i]; - if (!file.accepted) { - _results.push(file); - } - } - return _results; - }; - - Dropzone.prototype.getFilesWithStatus = function(status) { - var file, _i, _len, _ref, _results; - _ref = this.files; - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - file = _ref[_i]; - if (file.status === status) { - _results.push(file); - } - } - return _results; - }; - - Dropzone.prototype.getQueuedFiles = function() { - return this.getFilesWithStatus(Dropzone.QUEUED); - }; - - Dropzone.prototype.getUploadingFiles = function() { - return this.getFilesWithStatus(Dropzone.UPLOADING); - }; - - Dropzone.prototype.getAddedFiles = function() { - return this.getFilesWithStatus(Dropzone.ADDED); - }; - - Dropzone.prototype.getActiveFiles = function() { - var file, _i, _len, _ref, _results; - _ref = this.files; - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - file = _ref[_i]; - if (file.status === Dropzone.UPLOADING || file.status === Dropzone.QUEUED) { - _results.push(file); - } - } - return _results; - }; - - Dropzone.prototype.init = function() { - var eventName, noPropagation, setupHiddenFileInput, _i, _len, _ref, _ref1; - if (this.element.tagName === "form") { - this.element.setAttribute("enctype", "multipart/form-data"); - } - if (this.element.classList.contains("dropzone") && !this.element.querySelector(".dz-message")) { - this.element.appendChild(Dropzone.createElement("
    " + this.options.dictDefaultMessage + "
    ")); - } - if (this.clickableElements.length) { - setupHiddenFileInput = (function(_this) { - return function() { - if (_this.hiddenFileInput) { - document.body.removeChild(_this.hiddenFileInput); - } - _this.hiddenFileInput = document.createElement("input"); - _this.hiddenFileInput.setAttribute("type", "file"); - if ((_this.options.maxFiles == null) || _this.options.maxFiles > 1) { - _this.hiddenFileInput.setAttribute("multiple", "multiple"); - } - _this.hiddenFileInput.className = "dz-hidden-input"; - if (_this.options.acceptedFiles != null) { - _this.hiddenFileInput.setAttribute("accept", _this.options.acceptedFiles); - } - if (_this.options.capture != null) { - _this.hiddenFileInput.setAttribute("capture", _this.options.capture); - } - _this.hiddenFileInput.style.visibility = "hidden"; - _this.hiddenFileInput.style.position = "absolute"; - _this.hiddenFileInput.style.top = "0"; - _this.hiddenFileInput.style.left = "0"; - _this.hiddenFileInput.style.height = "0"; - _this.hiddenFileInput.style.width = "0"; - document.body.appendChild(_this.hiddenFileInput); - return _this.hiddenFileInput.addEventListener("change", function() { - var file, files, _i, _len; - files = _this.hiddenFileInput.files; - if (files.length) { - for (_i = 0, _len = files.length; _i < _len; _i++) { - file = files[_i]; - _this.addFile(file); - } - } - _this.emit("addedfiles", files); - return setupHiddenFileInput(); - }); - }; - })(this); - setupHiddenFileInput(); - } - this.URL = (_ref = window.URL) != null ? _ref : window.webkitURL; - _ref1 = this.events; - for (_i = 0, _len = _ref1.length; _i < _len; _i++) { - eventName = _ref1[_i]; - this.on(eventName, this.options[eventName]); - } - this.on("uploadprogress", (function(_this) { - return function() { - return _this.updateTotalUploadProgress(); - }; - })(this)); - this.on("removedfile", (function(_this) { - return function() { - return _this.updateTotalUploadProgress(); - }; - })(this)); - this.on("canceled", (function(_this) { - return function(file) { - return _this.emit("complete", file); - }; - })(this)); - this.on("complete", (function(_this) { - return function(file) { - if (_this.getAddedFiles().length === 0 && _this.getUploadingFiles().length === 0 && _this.getQueuedFiles().length === 0) { - return setTimeout((function() { - return _this.emit("queuecomplete"); - }), 0); - } - }; - })(this)); - noPropagation = function(e) { - e.stopPropagation(); - if (e.preventDefault) { - return e.preventDefault(); - } else { - return e.returnValue = false; - } - }; - this.listeners = [ - { - element: this.element, - events: { - "dragstart": (function(_this) { - return function(e) { - return _this.emit("dragstart", e); - }; - })(this), - "dragenter": (function(_this) { - return function(e) { - noPropagation(e); - return _this.emit("dragenter", e); - }; - })(this), - "dragover": (function(_this) { - return function(e) { - var efct; - try { - efct = e.dataTransfer.effectAllowed; - } catch (_error) {} - e.dataTransfer.dropEffect = 'move' === efct || 'linkMove' === efct ? 'move' : 'copy'; - noPropagation(e); - return _this.emit("dragover", e); - }; - })(this), - "dragleave": (function(_this) { - return function(e) { - return _this.emit("dragleave", e); - }; - })(this), - "drop": (function(_this) { - return function(e) { - noPropagation(e); - return _this.drop(e); - }; - })(this), - "dragend": (function(_this) { - return function(e) { - return _this.emit("dragend", e); - }; - })(this) - } - } - ]; - this.clickableElements.forEach((function(_this) { - return function(clickableElement) { - return _this.listeners.push({ - element: clickableElement, - events: { - "click": function(evt) { - if ((clickableElement !== _this.element) || (evt.target === _this.element || Dropzone.elementInside(evt.target, _this.element.querySelector(".dz-message")))) { - _this.hiddenFileInput.click(); - } - return true; - } - } - }); - }; - })(this)); - this.enable(); - return this.options.init.call(this); - }; - - Dropzone.prototype.destroy = function() { - var _ref; - this.disable(); - this.removeAllFiles(true); - if ((_ref = this.hiddenFileInput) != null ? _ref.parentNode : void 0) { - this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput); - this.hiddenFileInput = null; - } - delete this.element.dropzone; - return Dropzone.instances.splice(Dropzone.instances.indexOf(this), 1); - }; - - Dropzone.prototype.updateTotalUploadProgress = function() { - var activeFiles, file, totalBytes, totalBytesSent, totalUploadProgress, _i, _len, _ref; - totalBytesSent = 0; - totalBytes = 0; - activeFiles = this.getActiveFiles(); - if (activeFiles.length) { - _ref = this.getActiveFiles(); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - file = _ref[_i]; - totalBytesSent += file.upload.bytesSent; - totalBytes += file.upload.total; - } - totalUploadProgress = 100 * totalBytesSent / totalBytes; - } else { - totalUploadProgress = 100; - } - return this.emit("totaluploadprogress", totalUploadProgress, totalBytes, totalBytesSent); - }; - - Dropzone.prototype._getParamName = function(n) { - if (typeof this.options.paramName === "function") { - return this.options.paramName(n); - } else { - return "" + this.options.paramName + (this.options.uploadMultiple ? "[" + n + "]" : ""); - } - }; - - Dropzone.prototype.getFallbackForm = function() { - var existingFallback, fields, fieldsString, form; - if (existingFallback = this.getExistingFallback()) { - return existingFallback; - } - fieldsString = "
    "; - if (this.options.dictFallbackText) { - fieldsString += "

    " + this.options.dictFallbackText + "

    "; - } - fieldsString += "
    "; - fields = Dropzone.createElement(fieldsString); - if (this.element.tagName !== "FORM") { - form = Dropzone.createElement("
    "); - form.appendChild(fields); - } else { - this.element.setAttribute("enctype", "multipart/form-data"); - this.element.setAttribute("method", this.options.method); - } - return form != null ? form : fields; - }; - - Dropzone.prototype.getExistingFallback = function() { - var fallback, getFallback, tagName, _i, _len, _ref; - getFallback = function(elements) { - var el, _i, _len; - for (_i = 0, _len = elements.length; _i < _len; _i++) { - el = elements[_i]; - if (/(^| )fallback($| )/.test(el.className)) { - return el; - } - } - }; - _ref = ["div", "form"]; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - tagName = _ref[_i]; - if (fallback = getFallback(this.element.getElementsByTagName(tagName))) { - return fallback; - } - } - }; - - Dropzone.prototype.setupEventListeners = function() { - var elementListeners, event, listener, _i, _len, _ref, _results; - _ref = this.listeners; - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - elementListeners = _ref[_i]; - _results.push((function() { - var _ref1, _results1; - _ref1 = elementListeners.events; - _results1 = []; - for (event in _ref1) { - listener = _ref1[event]; - _results1.push(elementListeners.element.addEventListener(event, listener, false)); - } - return _results1; - })()); - } - return _results; - }; - - Dropzone.prototype.removeEventListeners = function() { - var elementListeners, event, listener, _i, _len, _ref, _results; - _ref = this.listeners; - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - elementListeners = _ref[_i]; - _results.push((function() { - var _ref1, _results1; - _ref1 = elementListeners.events; - _results1 = []; - for (event in _ref1) { - listener = _ref1[event]; - _results1.push(elementListeners.element.removeEventListener(event, listener, false)); - } - return _results1; - })()); - } - return _results; - }; - - Dropzone.prototype.disable = function() { - var file, _i, _len, _ref, _results; - this.clickableElements.forEach(function(element) { - return element.classList.remove("dz-clickable"); - }); - this.removeEventListeners(); - _ref = this.files; - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - file = _ref[_i]; - _results.push(this.cancelUpload(file)); - } - return _results; - }; - - Dropzone.prototype.enable = function() { - this.clickableElements.forEach(function(element) { - return element.classList.add("dz-clickable"); - }); - return this.setupEventListeners(); - }; - - Dropzone.prototype.filesize = function(size) { - var cutoff, i, selectedSize, selectedUnit, unit, units, _i, _len; - selectedSize = 0; - selectedUnit = "b"; - if (size > 0) { - units = ['TB', 'GB', 'MB', 'KB', 'b']; - for (i = _i = 0, _len = units.length; _i < _len; i = ++_i) { - unit = units[i]; - cutoff = Math.pow(this.options.filesizeBase, 4 - i) / 10; - if (size >= cutoff) { - selectedSize = size / Math.pow(this.options.filesizeBase, 4 - i); - selectedUnit = unit; - break; - } - } - selectedSize = Math.round(10 * selectedSize) / 10; - } - return "" + selectedSize + " " + selectedUnit; - }; - - Dropzone.prototype._updateMaxFilesReachedClass = function() { - if ((this.options.maxFiles != null) && this.getAcceptedFiles().length >= this.options.maxFiles) { - if (this.getAcceptedFiles().length === this.options.maxFiles) { - this.emit('maxfilesreached', this.files); - } - return this.element.classList.add("dz-max-files-reached"); - } else { - return this.element.classList.remove("dz-max-files-reached"); - } - }; - - Dropzone.prototype.drop = function(e) { - var files, items; - if (!e.dataTransfer) { - return; - } - this.emit("drop", e); - files = e.dataTransfer.files; - this.emit("addedfiles", files); - if (files.length) { - items = e.dataTransfer.items; - if (items && items.length && (items[0].webkitGetAsEntry != null)) { - this._addFilesFromItems(items); - } else { - this.handleFiles(files); - } - } - }; - - Dropzone.prototype.paste = function(e) { - var items, _ref; - if ((e != null ? (_ref = e.clipboardData) != null ? _ref.items : void 0 : void 0) == null) { - return; - } - this.emit("paste", e); - items = e.clipboardData.items; - if (items.length) { - return this._addFilesFromItems(items); - } - }; - - Dropzone.prototype.handleFiles = function(files) { - var file, _i, _len, _results; - _results = []; - for (_i = 0, _len = files.length; _i < _len; _i++) { - file = files[_i]; - _results.push(this.addFile(file)); - } - return _results; - }; - - Dropzone.prototype._addFilesFromItems = function(items) { - var entry, item, _i, _len, _results; - _results = []; - for (_i = 0, _len = items.length; _i < _len; _i++) { - item = items[_i]; - if ((item.webkitGetAsEntry != null) && (entry = item.webkitGetAsEntry())) { - if (entry.isFile) { - _results.push(this.addFile(item.getAsFile())); - } else if (entry.isDirectory) { - _results.push(this._addFilesFromDirectory(entry, entry.name)); - } else { - _results.push(void 0); - } - } else if (item.getAsFile != null) { - if ((item.kind == null) || item.kind === "file") { - _results.push(this.addFile(item.getAsFile())); - } else { - _results.push(void 0); - } - } else { - _results.push(void 0); - } - } - return _results; - }; - - Dropzone.prototype._addFilesFromDirectory = function(directory, path) { - var dirReader, entriesReader; - dirReader = directory.createReader(); - entriesReader = (function(_this) { - return function(entries) { - var entry, _i, _len; - for (_i = 0, _len = entries.length; _i < _len; _i++) { - entry = entries[_i]; - if (entry.isFile) { - entry.file(function(file) { - if (_this.options.ignoreHiddenFiles && file.name.substring(0, 1) === '.') { - return; - } - file.fullPath = "" + path + "/" + file.name; - return _this.addFile(file); - }); - } else if (entry.isDirectory) { - _this._addFilesFromDirectory(entry, "" + path + "/" + entry.name); - } - } - }; - })(this); - return dirReader.readEntries(entriesReader, function(error) { - return typeof console !== "undefined" && console !== null ? typeof console.log === "function" ? console.log(error) : void 0 : void 0; - }); - }; - - Dropzone.prototype.accept = function(file, done) { - if (file.size > this.options.maxFilesize * 1024 * 1024) { - return done(this.options.dictFileTooBig.replace("{{filesize}}", Math.round(file.size / 1024 / 10.24) / 100).replace("{{maxFilesize}}", this.options.maxFilesize)); - } else if (!Dropzone.isValidFile(file, this.options.acceptedFiles)) { - return done(this.options.dictInvalidFileType); - } else if ((this.options.maxFiles != null) && this.getAcceptedFiles().length >= this.options.maxFiles) { - done(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}", this.options.maxFiles)); - return this.emit("maxfilesexceeded", file); - } else { - return this.options.accept.call(this, file, done); - } - }; - - Dropzone.prototype.addFile = function(file) { - file.upload = { - progress: 0, - total: file.size, - bytesSent: 0 - }; - this.files.push(file); - file.status = Dropzone.ADDED; - this.emit("addedfile", file); - this._enqueueThumbnail(file); - return this.accept(file, (function(_this) { - return function(error) { - if (error) { - file.accepted = false; - _this._errorProcessing([file], error); - } else { - file.accepted = true; - if (_this.options.autoQueue) { - _this.enqueueFile(file); - } - } - return _this._updateMaxFilesReachedClass(); - }; - })(this)); - }; - - Dropzone.prototype.enqueueFiles = function(files) { - var file, _i, _len; - for (_i = 0, _len = files.length; _i < _len; _i++) { - file = files[_i]; - this.enqueueFile(file); - } - return null; - }; - - Dropzone.prototype.enqueueFile = function(file) { - if (file.status === Dropzone.ADDED && file.accepted === true) { - file.status = Dropzone.QUEUED; - if (this.options.autoProcessQueue) { - return setTimeout(((function(_this) { - return function() { - return _this.processQueue(); - }; - })(this)), 0); - } - } else { - throw new Error("This file can't be queued because it has already been processed or was rejected."); - } - }; - - Dropzone.prototype._thumbnailQueue = []; - - Dropzone.prototype._processingThumbnail = false; - - Dropzone.prototype._enqueueThumbnail = function(file) { - if (this.options.createImageThumbnails && file.type.match(/image.*/) && file.size <= this.options.maxThumbnailFilesize * 1024 * 1024) { - this._thumbnailQueue.push(file); - return setTimeout(((function(_this) { - return function() { - return _this._processThumbnailQueue(); - }; - })(this)), 0); - } - }; - - Dropzone.prototype._processThumbnailQueue = function() { - if (this._processingThumbnail || this._thumbnailQueue.length === 0) { - return; - } - this._processingThumbnail = true; - return this.createThumbnail(this._thumbnailQueue.shift(), (function(_this) { - return function() { - _this._processingThumbnail = false; - return _this._processThumbnailQueue(); - }; - })(this)); - }; - - Dropzone.prototype.removeFile = function(file) { - if (file.status === Dropzone.UPLOADING) { - this.cancelUpload(file); - } - this.files = without(this.files, file); - this.emit("removedfile", file); - if (this.files.length === 0) { - return this.emit("reset"); - } - }; - - Dropzone.prototype.removeAllFiles = function(cancelIfNecessary) { - var file, _i, _len, _ref; - if (cancelIfNecessary == null) { - cancelIfNecessary = false; - } - _ref = this.files.slice(); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - file = _ref[_i]; - if (file.status !== Dropzone.UPLOADING || cancelIfNecessary) { - this.removeFile(file); - } - } - return null; - }; - - Dropzone.prototype.createThumbnail = function(file, callback) { - var fileReader; - fileReader = new FileReader; - fileReader.onload = (function(_this) { - return function() { - if (file.type === "image/svg+xml") { - _this.emit("thumbnail", file, fileReader.result); - if (callback != null) { - callback(); - } - return; - } - return _this.createThumbnailFromUrl(file, fileReader.result, callback); - }; - })(this); - return fileReader.readAsDataURL(file); - }; - - Dropzone.prototype.createThumbnailFromUrl = function(file, imageUrl, callback) { - var img; - img = document.createElement("img"); - img.onload = (function(_this) { - return function() { - var canvas, ctx, resizeInfo, thumbnail, _ref, _ref1, _ref2, _ref3; - file.width = img.width; - file.height = img.height; - resizeInfo = _this.options.resize.call(_this, file); - if (resizeInfo.trgWidth == null) { - resizeInfo.trgWidth = resizeInfo.optWidth; - } - if (resizeInfo.trgHeight == null) { - resizeInfo.trgHeight = resizeInfo.optHeight; - } - canvas = document.createElement("canvas"); - ctx = canvas.getContext("2d"); - canvas.width = resizeInfo.trgWidth; - canvas.height = resizeInfo.trgHeight; - drawImageIOSFix(ctx, img, (_ref = resizeInfo.srcX) != null ? _ref : 0, (_ref1 = resizeInfo.srcY) != null ? _ref1 : 0, resizeInfo.srcWidth, resizeInfo.srcHeight, (_ref2 = resizeInfo.trgX) != null ? _ref2 : 0, (_ref3 = resizeInfo.trgY) != null ? _ref3 : 0, resizeInfo.trgWidth, resizeInfo.trgHeight); - thumbnail = canvas.toDataURL("image/png"); - _this.emit("thumbnail", file, thumbnail); - if (callback != null) { - return callback(); - } - }; - })(this); - if (callback != null) { - img.onerror = callback; - } - return img.src = imageUrl; - }; - - Dropzone.prototype.processQueue = function() { - var i, parallelUploads, processingLength, queuedFiles; - parallelUploads = this.options.parallelUploads; - processingLength = this.getUploadingFiles().length; - i = processingLength; - if (processingLength >= parallelUploads) { - return; - } - queuedFiles = this.getQueuedFiles(); - if (!(queuedFiles.length > 0)) { - return; - } - if (this.options.uploadMultiple) { - return this.processFiles(queuedFiles.slice(0, parallelUploads - processingLength)); - } else { - while (i < parallelUploads) { - if (!queuedFiles.length) { - return; - } - this.processFile(queuedFiles.shift()); - i++; - } - } - }; - - Dropzone.prototype.processFile = function(file) { - return this.processFiles([file]); - }; - - Dropzone.prototype.processFiles = function(files) { - var file, _i, _len; - for (_i = 0, _len = files.length; _i < _len; _i++) { - file = files[_i]; - file.processing = true; - file.status = Dropzone.UPLOADING; - this.emit("processing", file); - } - if (this.options.uploadMultiple) { - this.emit("processingmultiple", files); - } - return this.uploadFiles(files); - }; - - Dropzone.prototype._getFilesWithXhr = function(xhr) { - var file, files; - return files = (function() { - var _i, _len, _ref, _results; - _ref = this.files; - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - file = _ref[_i]; - if (file.xhr === xhr) { - _results.push(file); - } - } - return _results; - }).call(this); - }; - - Dropzone.prototype.cancelUpload = function(file) { - var groupedFile, groupedFiles, _i, _j, _len, _len1, _ref; - if (file.status === Dropzone.UPLOADING) { - groupedFiles = this._getFilesWithXhr(file.xhr); - for (_i = 0, _len = groupedFiles.length; _i < _len; _i++) { - groupedFile = groupedFiles[_i]; - groupedFile.status = Dropzone.CANCELED; - } - file.xhr.abort(); - for (_j = 0, _len1 = groupedFiles.length; _j < _len1; _j++) { - groupedFile = groupedFiles[_j]; - this.emit("canceled", groupedFile); - } - if (this.options.uploadMultiple) { - this.emit("canceledmultiple", groupedFiles); - } - } else if ((_ref = file.status) === Dropzone.ADDED || _ref === Dropzone.QUEUED) { - file.status = Dropzone.CANCELED; - this.emit("canceled", file); - if (this.options.uploadMultiple) { - this.emit("canceledmultiple", [file]); - } - } - if (this.options.autoProcessQueue) { - return this.processQueue(); - } - }; - - resolveOption = function() { - var args, option; - option = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : []; - if (typeof option === 'function') { - return option.apply(this, args); - } - return option; - }; - - Dropzone.prototype.uploadFile = function(file) { - return this.uploadFiles([file]); - }; - - Dropzone.prototype.uploadFiles = function(files) { - var file, formData, handleError, headerName, headerValue, headers, i, input, inputName, inputType, key, method, option, progressObj, response, updateProgress, url, value, xhr, _i, _j, _k, _l, _len, _len1, _len2, _len3, _m, _ref, _ref1, _ref2, _ref3, _ref4, _ref5; - xhr = new XMLHttpRequest(); - for (_i = 0, _len = files.length; _i < _len; _i++) { - file = files[_i]; - file.xhr = xhr; - } - method = resolveOption(this.options.method, files); - url = resolveOption(this.options.url, files); - xhr.open(method, url, true); - xhr.withCredentials = !!this.options.withCredentials; - response = null; - handleError = (function(_this) { - return function() { - var _j, _len1, _results; - _results = []; - for (_j = 0, _len1 = files.length; _j < _len1; _j++) { - file = files[_j]; - _results.push(_this._errorProcessing(files, response || _this.options.dictResponseError.replace("{{statusCode}}", xhr.status), xhr)); - } - return _results; - }; - })(this); - updateProgress = (function(_this) { - return function(e) { - var allFilesFinished, progress, _j, _k, _l, _len1, _len2, _len3, _results; - if (e != null) { - progress = 100 * e.loaded / e.total; - for (_j = 0, _len1 = files.length; _j < _len1; _j++) { - file = files[_j]; - file.upload = { - progress: progress, - total: e.total, - bytesSent: e.loaded - }; - } - } else { - allFilesFinished = true; - progress = 100; - for (_k = 0, _len2 = files.length; _k < _len2; _k++) { - file = files[_k]; - if (!(file.upload.progress === 100 && file.upload.bytesSent === file.upload.total)) { - allFilesFinished = false; - } - file.upload.progress = progress; - file.upload.bytesSent = file.upload.total; - } - if (allFilesFinished) { - return; - } - } - _results = []; - for (_l = 0, _len3 = files.length; _l < _len3; _l++) { - file = files[_l]; - _results.push(_this.emit("uploadprogress", file, progress, file.upload.bytesSent)); - } - return _results; - }; - })(this); - xhr.onload = (function(_this) { - return function(e) { - var _ref; - if (files[0].status === Dropzone.CANCELED) { - return; - } - if (xhr.readyState !== 4) { - return; - } - response = xhr.responseText; - if (xhr.getResponseHeader("content-type") && ~xhr.getResponseHeader("content-type").indexOf("application/json")) { - try { - response = JSON.parse(response); - } catch (_error) { - e = _error; - response = "Invalid JSON response from server."; - } - } - updateProgress(); - if (!((200 <= (_ref = xhr.status) && _ref < 300))) { - return handleError(); - } else { - return _this._finished(files, response, e); - } - }; - })(this); - xhr.onerror = (function(_this) { - return function() { - if (files[0].status === Dropzone.CANCELED) { - return; - } - return handleError(); - }; - })(this); - progressObj = (_ref = xhr.upload) != null ? _ref : xhr; - progressObj.onprogress = updateProgress; - headers = { - "Accept": "application/json", - "Cache-Control": "no-cache", - "X-Requested-With": "XMLHttpRequest" - }; - if (this.options.headers) { - extend(headers, this.options.headers); - } - for (headerName in headers) { - headerValue = headers[headerName]; - if (headerValue) { - xhr.setRequestHeader(headerName, headerValue); - } - } - formData = new FormData(); - if (this.options.params) { - _ref1 = this.options.params; - for (key in _ref1) { - value = _ref1[key]; - formData.append(key, value); - } - } - for (_j = 0, _len1 = files.length; _j < _len1; _j++) { - file = files[_j]; - this.emit("sending", file, xhr, formData); - } - if (this.options.uploadMultiple) { - this.emit("sendingmultiple", files, xhr, formData); - } - if (this.element.tagName === "FORM") { - _ref2 = this.element.querySelectorAll("input, textarea, select, button"); - for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) { - input = _ref2[_k]; - inputName = input.getAttribute("name"); - inputType = input.getAttribute("type"); - if (input.tagName === "SELECT" && input.hasAttribute("multiple")) { - _ref3 = input.options; - for (_l = 0, _len3 = _ref3.length; _l < _len3; _l++) { - option = _ref3[_l]; - if (option.selected) { - formData.append(inputName, option.value); - } - } - } else if (!inputType || ((_ref4 = inputType.toLowerCase()) !== "checkbox" && _ref4 !== "radio") || input.checked) { - formData.append(inputName, input.value); - } - } - } - for (i = _m = 0, _ref5 = files.length - 1; 0 <= _ref5 ? _m <= _ref5 : _m >= _ref5; i = 0 <= _ref5 ? ++_m : --_m) { - formData.append(this._getParamName(i), files[i], files[i].name); - } - return this.submitRequest(xhr, formData, files); - }; - - Dropzone.prototype.submitRequest = function(xhr, formData, files) { - return xhr.send(formData); - }; - - Dropzone.prototype._finished = function(files, responseText, e) { - var file, _i, _len; - for (_i = 0, _len = files.length; _i < _len; _i++) { - file = files[_i]; - file.status = Dropzone.SUCCESS; - this.emit("success", file, responseText, e); - this.emit("complete", file); - } - if (this.options.uploadMultiple) { - this.emit("successmultiple", files, responseText, e); - this.emit("completemultiple", files); - } - if (this.options.autoProcessQueue) { - return this.processQueue(); - } - }; - - Dropzone.prototype._errorProcessing = function(files, message, xhr) { - var file, _i, _len; - for (_i = 0, _len = files.length; _i < _len; _i++) { - file = files[_i]; - file.status = Dropzone.ERROR; - this.emit("error", file, message, xhr); - this.emit("complete", file); - } - if (this.options.uploadMultiple) { - this.emit("errormultiple", files, message, xhr); - this.emit("completemultiple", files); - } - if (this.options.autoProcessQueue) { - return this.processQueue(); - } - }; - - return Dropzone; - - })(Emitter); - - Dropzone.version = "4.1.0"; - - Dropzone.options = {}; - - Dropzone.optionsForElement = function(element) { - if (element.getAttribute("id")) { - return Dropzone.options[camelize(element.getAttribute("id"))]; - } else { - return void 0; - } - }; - - Dropzone.instances = []; - - Dropzone.forElement = function(element) { - if (typeof element === "string") { - element = document.querySelector(element); - } - if ((element != null ? element.dropzone : void 0) == null) { - throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone."); - } - return element.dropzone; - }; - - //Dropzone.autoDiscover = true; - Dropzone.autoDiscover = false; // NLIB - - Dropzone.discover = function() { - var checkElements, dropzone, dropzones, _i, _len, _results; - if (document.querySelectorAll) { - dropzones = document.querySelectorAll(".dropzone"); - } else { - dropzones = []; - checkElements = function(elements) { - var el, _i, _len, _results; - _results = []; - for (_i = 0, _len = elements.length; _i < _len; _i++) { - el = elements[_i]; - if (/(^| )dropzone($| )/.test(el.className)) { - _results.push(dropzones.push(el)); - } else { - _results.push(void 0); - } - } - return _results; - }; - checkElements(document.getElementsByTagName("div")); - checkElements(document.getElementsByTagName("form")); - } - _results = []; - for (_i = 0, _len = dropzones.length; _i < _len; _i++) { - dropzone = dropzones[_i]; - if (Dropzone.optionsForElement(dropzone) !== false) { - _results.push(new Dropzone(dropzone)); - } else { - _results.push(void 0); - } - } - return _results; - }; - - Dropzone.blacklistedBrowsers = [/opera.*Macintosh.*version\/12/i]; - - Dropzone.isBrowserSupported = function() { - var capableBrowser, regex, _i, _len, _ref; - capableBrowser = true; - if (window.File && window.FileReader && window.FileList && window.Blob && window.FormData && document.querySelector) { - if (!("classList" in document.createElement("a"))) { - capableBrowser = false; - } else { - _ref = Dropzone.blacklistedBrowsers; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - regex = _ref[_i]; - if (regex.test(navigator.userAgent)) { - capableBrowser = false; - continue; - } - } - } - } else { - capableBrowser = false; - } - return capableBrowser; - }; - - without = function(list, rejectedItem) { - var item, _i, _len, _results; - _results = []; - for (_i = 0, _len = list.length; _i < _len; _i++) { - item = list[_i]; - if (item !== rejectedItem) { - _results.push(item); - } - } - return _results; - }; - - camelize = function(str) { - return str.replace(/[\-_](\w)/g, function(match) { - return match.charAt(1).toUpperCase(); - }); - }; - - Dropzone.createElement = function(string) { - var div; - div = document.createElement("div"); - div.innerHTML = string; - return div.childNodes[0]; - }; - - Dropzone.elementInside = function(element, container) { - if (element === container) { - return true; - } - while (element = element.parentNode) { - if (element === container) { - return true; - } - } - return false; - }; - - Dropzone.getElement = function(el, name) { - var element; - if (typeof el === "string") { - element = document.querySelector(el); - } else if (el.nodeType != null) { - element = el; - } - if (element == null) { - throw new Error("Invalid `" + name + "` option provided. Please provide a CSS selector or a plain HTML element."); - } - return element; - }; - - Dropzone.getElements = function(els, name) { - var e, el, elements, _i, _j, _len, _len1, _ref; - if (els instanceof Array) { - elements = []; - try { - for (_i = 0, _len = els.length; _i < _len; _i++) { - el = els[_i]; - elements.push(this.getElement(el, name)); - } - } catch (_error) { - e = _error; - elements = null; - } - } else if (typeof els === "string") { - elements = []; - _ref = document.querySelectorAll(els); - for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) { - el = _ref[_j]; - elements.push(el); - } - } else if (els.nodeType != null) { - elements = [els]; - } - if (!((elements != null) && elements.length)) { - throw new Error("Invalid `" + name + "` option provided. Please provide a CSS selector, a plain HTML element or a list of those."); - } - return elements; - }; - - Dropzone.confirm = function(question, accepted, rejected) { - if (window.confirm(question)) { - return accepted(); - } else if (rejected != null) { - return rejected(); - } - }; - - Dropzone.isValidFile = function(file, acceptedFiles) { - var baseMimeType, mimeType, validType, _i, _len; - if (!acceptedFiles) { - return true; - } - acceptedFiles = acceptedFiles.split(","); - mimeType = file.type; - baseMimeType = mimeType.replace(/\/.*$/, ""); - for (_i = 0, _len = acceptedFiles.length; _i < _len; _i++) { - validType = acceptedFiles[_i]; - validType = validType.trim(); - if (validType.charAt(0) === ".") { - if (file.name.toLowerCase().indexOf(validType.toLowerCase(), file.name.length - validType.length) !== -1) { - return true; - } - } else if (/\/\*$/.test(validType)) { - if (baseMimeType === validType.replace(/\/.*$/, "")) { - return true; - } - } else { - if (mimeType === validType) { - return true; - } - } - } - return false; - }; - - if (typeof jQuery !== "undefined" && jQuery !== null) { - jQuery.fn.dropzone = function(options) { - return this.each(function() { - return new Dropzone(this, options); - }); - }; - } - - if (typeof module !== "undefined" && module !== null) { - module.exports = Dropzone; - } else { - window.Dropzone = Dropzone; - } - - Dropzone.ADDED = "added"; - - Dropzone.QUEUED = "queued"; - - Dropzone.ACCEPTED = Dropzone.QUEUED; - - Dropzone.UPLOADING = "uploading"; - - Dropzone.PROCESSING = Dropzone.UPLOADING; - - Dropzone.CANCELED = "canceled"; - - Dropzone.ERROR = "error"; - - Dropzone.SUCCESS = "success"; - - - /* - - Bugfix for iOS 6 and 7 - Source: http://stackoverflow.com/questions/11929099/html5-canvas-drawimage-ratio-bug-ios - based on the work of https://github.com/stomita/ios-imagefile-megapixel - */ - - detectVerticalSquash = function(img) { - var alpha, canvas, ctx, data, ey, ih, iw, py, ratio, sy; - iw = img.naturalWidth; - ih = img.naturalHeight; - canvas = document.createElement("canvas"); - canvas.width = 1; - canvas.height = ih; - ctx = canvas.getContext("2d"); - ctx.drawImage(img, 0, 0); - data = ctx.getImageData(0, 0, 1, ih).data; - sy = 0; - ey = ih; - py = ih; - while (py > sy) { - alpha = data[(py - 1) * 4 + 3]; - if (alpha === 0) { - ey = py; - } else { - sy = py; - } - py = (ey + sy) >> 1; - } - ratio = py / ih; - if (ratio === 0) { - return 1; - } else { - return ratio; - } - }; - - drawImageIOSFix = function(ctx, img, sx, sy, sw, sh, dx, dy, dw, dh) { - var vertSquashRatio; - vertSquashRatio = detectVerticalSquash(img); - return ctx.drawImage(img, sx, sy, sw, sh, dx, dy, dw, dh / vertSquashRatio); - }; - - - /* - * contentloaded.js - * - * Author: Diego Perini (diego.perini at gmail.com) - * Summary: cross-browser wrapper for DOMContentLoaded - * Updated: 20101020 - * License: MIT - * Version: 1.2 - * - * URL: - * http://javascript.nwbox.com/ContentLoaded/ - * http://javascript.nwbox.com/ContentLoaded/MIT-LICENSE - */ - - contentLoaded = function(win, fn) { - var add, doc, done, init, poll, pre, rem, root, top; - done = false; - top = true; - doc = win.document; - root = doc.documentElement; - add = (doc.addEventListener ? "addEventListener" : "attachEvent"); - rem = (doc.addEventListener ? "removeEventListener" : "detachEvent"); - pre = (doc.addEventListener ? "" : "on"); - init = function(e) { - if (e.type === "readystatechange" && doc.readyState !== "complete") { - return; - } - (e.type === "load" ? win : doc)[rem](pre + e.type, init, false); - if (!done && (done = true)) { - return fn.call(win, e.type || e); - } - }; - poll = function() { - var e; - try { - root.doScroll("left"); - } catch (_error) { - e = _error; - setTimeout(poll, 50); - return; - } - return init("poll"); - }; - if (doc.readyState !== "complete") { - if (doc.createEventObject && root.doScroll) { - try { - top = !win.frameElement; - } catch (_error) {} - if (top) { - poll(); - } - } - doc[add](pre + "DOMContentLoaded", init, false); - doc[add](pre + "readystatechange", init, false); - return win[add](pre + "load", init, false); - } - }; - - Dropzone._autoDiscoverFunction = function() { - if (Dropzone.autoDiscover) { - return Dropzone.discover(); - } - }; - - contentLoaded(window, Dropzone._autoDiscoverFunction); - -}).call(this); + +/* + * + * More info at [www.dropzonejs.com](http://www.dropzonejs.com) + * + * Copyright (c) 2012, Matias Meno + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + */ + +(function() { + var Dropzone, Emitter, camelize, contentLoaded, detectVerticalSquash, drawImageIOSFix, noop, without, + __slice = [].slice, + __hasProp = {}.hasOwnProperty, + __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; + + noop = function() {}; + + Emitter = (function() { + function Emitter() {} + + Emitter.prototype.addEventListener = Emitter.prototype.on; + + Emitter.prototype.on = function(event, fn) { + this._callbacks = this._callbacks || {}; + if (!this._callbacks[event]) { + this._callbacks[event] = []; + } + this._callbacks[event].push(fn); + return this; + }; + + Emitter.prototype.emit = function() { + var args, callback, callbacks, event, _i, _len; + event = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : []; + this._callbacks = this._callbacks || {}; + callbacks = this._callbacks[event]; + if (callbacks) { + for (_i = 0, _len = callbacks.length; _i < _len; _i++) { + callback = callbacks[_i]; + callback.apply(this, args); + } + } + return this; + }; + + Emitter.prototype.removeListener = Emitter.prototype.off; + + Emitter.prototype.removeAllListeners = Emitter.prototype.off; + + Emitter.prototype.removeEventListener = Emitter.prototype.off; + + Emitter.prototype.off = function(event, fn) { + var callback, callbacks, i, _i, _len; + if (!this._callbacks || arguments.length === 0) { + this._callbacks = {}; + return this; + } + callbacks = this._callbacks[event]; + if (!callbacks) { + return this; + } + if (arguments.length === 1) { + delete this._callbacks[event]; + return this; + } + for (i = _i = 0, _len = callbacks.length; _i < _len; i = ++_i) { + callback = callbacks[i]; + if (callback === fn) { + callbacks.splice(i, 1); + break; + } + } + return this; + }; + + return Emitter; + + })(); + + Dropzone = (function(_super) { + var extend, resolveOption; + + __extends(Dropzone, _super); + + Dropzone.prototype.Emitter = Emitter; + + + /* + This is a list of all available events you can register on a dropzone object. + + You can register an event handler like this: + + 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.defaultOptions = { + url: null, + method: "post", + withCredentials: false, + parallelUploads: 2, + uploadMultiple: false, + maxFilesize: 256, + paramName: "file", + createImageThumbnails: true, + maxThumbnailFilesize: 10, + thumbnailWidth: 120, + //thumbnailHeight: 120, + thumbnailHeight: 60, // NLIB + filesizeBase: 1000, + maxFiles: null, + params: {}, + clickable: true, + ignoreHiddenFiles: true, + // acceptedFiles: null, + acceptedFiles: "image/*", // NLIB + acceptedMimeTypes: null, + //autoProcessQueue: true, + autoProcessQueue: false, // NLIB + autoQueue: true, + //addRemoveLinks: false, + addRemoveLinks: true, // NLIB + previewsContainer: null, + capture: null, + dictDefaultMessage: "Drop files here to upload", + dictFallbackMessage: "파일 드래그앤드랍을 지원하지 않는 브라우저입니다.", // "Your browser does not support drag'n'drop file uploads.", + 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.", + dictInvalidFileType: "You can't upload files of this type.", + dictResponseError: "Server responded with {{statusCode}} code.", + dictCancelUpload: "Cancel upload", + dictCancelUploadConfirmation: "Are you sure you want to cancel this upload?", + //dictRemoveFile: "Remove file", + dictRemoveFile: "취소", // NLIB + dictRemoveFileConfirmation: null, + dictMaxFilesExceeded: "You can not upload any more files.", + accept: function(file, done) { + return done(); + }, + init: function() { + return noop; + }, + forceFallback: false, + fallback: function() { + var child, messageElement, span, _i, _len, _ref; + this.element.className = "" + this.element.className + " dz-browser-not-supported"; + _ref = this.element.getElementsByTagName("div"); + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (/(^| )dz-message($| )/.test(child.className)) { + messageElement = child; + child.className = "dz-message"; + continue; + } + } + if (!messageElement) { + messageElement = Dropzone.createElement("
    "); + this.element.appendChild(messageElement); + } + span = messageElement.getElementsByTagName("span")[0]; + if (span) { + if (span.textContent != null) { + span.textContent = this.options.dictFallbackMessage; + } else if (span.innerText != null) { + span.innerText = this.options.dictFallbackMessage; + } + } + return this.element.appendChild(this.getFallbackForm()); + }, + resize: function(file) { + var info, srcRatio, trgRatio; + info = { + srcX: 0, + srcY: 0, + srcWidth: file.width, + srcHeight: file.height + }; + srcRatio = file.width / file.height; + info.optWidth = this.options.thumbnailWidth; + info.optHeight = this.options.thumbnailHeight; + if ((info.optWidth == null) && (info.optHeight == null)) { + info.optWidth = info.srcWidth; + info.optHeight = info.srcHeight; + } else if (info.optWidth == null) { + info.optWidth = srcRatio * info.optHeight; + } else if (info.optHeight == null) { + info.optHeight = (1 / srcRatio) * info.optWidth; + } + trgRatio = info.optWidth / info.optHeight; + if (file.height < info.optHeight || file.width < info.optWidth) { + info.trgHeight = info.srcHeight; + info.trgWidth = info.srcWidth; + } else { + if (srcRatio > trgRatio) { + info.srcHeight = file.height; + info.srcWidth = info.srcHeight * trgRatio; + } else { + info.srcWidth = file.width; + info.srcHeight = info.srcWidth / trgRatio; + } + } + info.srcX = (file.width - info.srcWidth) / 2; + info.srcY = (file.height - info.srcHeight) / 2; + return info; + }, + + /* + Those functions register themselves to the events on init and handle all + the user interface specific stuff. Overwriting them won't break the upload + but can break the way it's displayed. + You can overwrite them if you don't like the default behavior. If you just + want to add an additional event handler, register it on the dropzone object + and don't overwrite those options. + */ + drop: function(e) { + return this.element.classList.remove("dz-drag-hover"); + }, + dragstart: noop, + dragend: function(e) { + return this.element.classList.remove("dz-drag-hover"); + }, + dragenter: function(e) { + return this.element.classList.add("dz-drag-hover"); + }, + dragover: function(e) { + return this.element.classList.add("dz-drag-hover"); + }, + dragleave: function(e) { + return this.element.classList.remove("dz-drag-hover"); + }, + paste: noop, + reset: function() { + return this.element.classList.remove("dz-started"); + }, + addedfile: function(file) { + var node, removeFileEvent, removeLink, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _results; + if (this.element === this.previewsContainer) { + this.element.classList.add("dz-started"); + } + if (this.previewsContainer) { + file.previewElement = Dropzone.createElement(this.options.previewTemplate.trim()); + file.previewTemplate = file.previewElement; + this.previewsContainer.appendChild(file.previewElement); + _ref = file.previewElement.querySelectorAll("[data-dz-name]"); + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + node = _ref[_i]; + node.textContent = file.name; + } + _ref1 = file.previewElement.querySelectorAll("[data-dz-size]"); + for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { + node = _ref1[_j]; + node.innerHTML = this.filesize(file.size); + } + if (this.options.addRemoveLinks) { + file._removeLink = Dropzone.createElement("" + this.options.dictRemoveFile + ""); + file.previewElement.appendChild(file._removeLink); + } + removeFileEvent = (function(_this) { + return function(e) { + e.preventDefault(); + e.stopPropagation(); + if (file.status === Dropzone.UPLOADING) { + return Dropzone.confirm(_this.options.dictCancelUploadConfirmation, function() { + return _this.removeFile(file); + }); + } else { + if (_this.options.dictRemoveFileConfirmation) { + return Dropzone.confirm(_this.options.dictRemoveFileConfirmation, function() { + return _this.removeFile(file); + }); + } else { + return _this.removeFile(file); + } + } + }; + })(this); + _ref2 = file.previewElement.querySelectorAll("[data-dz-remove]"); + _results = []; + for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) { + removeLink = _ref2[_k]; + _results.push(removeLink.addEventListener("click", removeFileEvent)); + } + return _results; + } + }, + removedfile: function(file) { + var _ref; + if (file.previewElement) { + if ((_ref = file.previewElement) != null) { + _ref.parentNode.removeChild(file.previewElement); + } + } + return this._updateMaxFilesReachedClass(); + }, + thumbnail: function(file, dataUrl) { + var thumbnailElement, _i, _len, _ref; + if (file.previewElement) { + file.previewElement.classList.remove("dz-file-preview"); + _ref = file.previewElement.querySelectorAll("[data-dz-thumbnail]"); + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + thumbnailElement = _ref[_i]; + thumbnailElement.alt = file.name; + thumbnailElement.src = dataUrl; + } + return setTimeout(((function(_this) { + return function() { + return file.previewElement.classList.add("dz-image-preview"); + }; + })(this)), 1); + } + }, + error: function(file, message) { + var node, _i, _len, _ref, _results; + if (file.previewElement) { + file.previewElement.classList.add("dz-error"); + if (typeof message !== "String" && message.error) { + message = message.error; + } + _ref = file.previewElement.querySelectorAll("[data-dz-errormessage]"); + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + node = _ref[_i]; + _results.push(node.textContent = message); + } + return _results; + } + }, + errormultiple: noop, + processing: function(file) { + if (file.previewElement) { + file.previewElement.classList.add("dz-processing"); + if (file._removeLink) { + return file._removeLink.textContent = this.options.dictCancelUpload; + } + } + }, + processingmultiple: noop, + uploadprogress: function(file, progress, bytesSent) { + var node, _i, _len, _ref, _results; + if (file.previewElement) { + _ref = file.previewElement.querySelectorAll("[data-dz-uploadprogress]"); + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + node = _ref[_i]; + if (node.nodeName === 'PROGRESS') { + _results.push(node.value = progress); + } else { + _results.push(node.style.width = "" + progress + "%"); + } + } + return _results; + } + }, + totaluploadprogress: noop, + sending: noop, + sendingmultiple: noop, + success: function(file) { + if (file.previewElement) { + return file.previewElement.classList.add("dz-success"); + } + }, + successmultiple: noop, + canceled: function(file) { + return this.emit("error", file, "Upload canceled."); + }, + canceledmultiple: noop, + complete: function(file) { + if (file._removeLink) { + file._removeLink.textContent = this.options.dictRemoveFile; + } + if (file.previewElement) { + return file.previewElement.classList.add("dz-complete"); + } + }, + completemultiple: noop, + maxfilesexceeded: noop, + 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
    " + }; + + extend = function() { + var key, object, objects, target, val, _i, _len; + target = arguments[0], objects = 2 <= arguments.length ? __slice.call(arguments, 1) : []; + for (_i = 0, _len = objects.length; _i < _len; _i++) { + object = objects[_i]; + for (key in object) { + val = object[key]; + target[key] = val; + } + } + return target; + }; + + function Dropzone(element, options) { + var elementOptions, fallback, _ref; + this.element = element; + this.version = Dropzone.version; + this.defaultOptions.previewTemplate = this.defaultOptions.previewTemplate.replace(/\n*/g, ""); + this.clickableElements = []; + this.listeners = []; + this.files = []; + if (typeof this.element === "string") { + this.element = document.querySelector(this.element); + } + if (!(this.element && (this.element.nodeType != null))) { + throw new Error("Invalid dropzone element."); + } + if (this.element.dropzone) { + throw new Error("Dropzone already attached."); + } + Dropzone.instances.push(this); + this.element.dropzone = this; + elementOptions = (_ref = Dropzone.optionsForElement(this.element)) != null ? _ref : {}; + this.options = extend({}, this.defaultOptions, elementOptions, options != null ? options : {}); + if (this.options.forceFallback || !Dropzone.isBrowserSupported()) { + return this.options.fallback.call(this); + } + if (this.options.url == null) { + this.options.url = this.element.getAttribute("action"); + } + if (!this.options.url) { + throw new Error("No URL provided."); + } + if (this.options.acceptedFiles && this.options.acceptedMimeTypes) { + throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated."); + } + if (this.options.acceptedMimeTypes) { + this.options.acceptedFiles = this.options.acceptedMimeTypes; + delete this.options.acceptedMimeTypes; + } + this.options.method = this.options.method.toUpperCase(); + if ((fallback = this.getExistingFallback()) && fallback.parentNode) { + fallback.parentNode.removeChild(fallback); + } + if (this.options.previewsContainer !== false) { + if (this.options.previewsContainer) { + this.previewsContainer = Dropzone.getElement(this.options.previewsContainer, "previewsContainer"); + } else { + this.previewsContainer = this.element; + } + } + if (this.options.clickable) { + if (this.options.clickable === true) { + this.clickableElements = [this.element]; + } else { + this.clickableElements = Dropzone.getElements(this.options.clickable, "clickable"); + } + } + this.init(); + } + + Dropzone.prototype.getAcceptedFiles = function() { + var file, _i, _len, _ref, _results; + _ref = this.files; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + file = _ref[_i]; + if (file.accepted) { + _results.push(file); + } + } + return _results; + }; + + Dropzone.prototype.getRejectedFiles = function() { + var file, _i, _len, _ref, _results; + _ref = this.files; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + file = _ref[_i]; + if (!file.accepted) { + _results.push(file); + } + } + return _results; + }; + + Dropzone.prototype.getFilesWithStatus = function(status) { + var file, _i, _len, _ref, _results; + _ref = this.files; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + file = _ref[_i]; + if (file.status === status) { + _results.push(file); + } + } + return _results; + }; + + Dropzone.prototype.getQueuedFiles = function() { + return this.getFilesWithStatus(Dropzone.QUEUED); + }; + + Dropzone.prototype.getUploadingFiles = function() { + return this.getFilesWithStatus(Dropzone.UPLOADING); + }; + + Dropzone.prototype.getAddedFiles = function() { + return this.getFilesWithStatus(Dropzone.ADDED); + }; + + Dropzone.prototype.getActiveFiles = function() { + var file, _i, _len, _ref, _results; + _ref = this.files; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + file = _ref[_i]; + if (file.status === Dropzone.UPLOADING || file.status === Dropzone.QUEUED) { + _results.push(file); + } + } + return _results; + }; + + Dropzone.prototype.init = function() { + var eventName, noPropagation, setupHiddenFileInput, _i, _len, _ref, _ref1; + if (this.element.tagName === "form") { + this.element.setAttribute("enctype", "multipart/form-data"); + } + if (this.element.classList.contains("dropzone") && !this.element.querySelector(".dz-message")) { + this.element.appendChild(Dropzone.createElement("
    " + this.options.dictDefaultMessage + "
    ")); + } + if (this.clickableElements.length) { + setupHiddenFileInput = (function(_this) { + return function() { + if (_this.hiddenFileInput) { + document.body.removeChild(_this.hiddenFileInput); + } + _this.hiddenFileInput = document.createElement("input"); + _this.hiddenFileInput.setAttribute("type", "file"); + if ((_this.options.maxFiles == null) || _this.options.maxFiles > 1) { + _this.hiddenFileInput.setAttribute("multiple", "multiple"); + } + _this.hiddenFileInput.className = "dz-hidden-input"; + if (_this.options.acceptedFiles != null) { + _this.hiddenFileInput.setAttribute("accept", _this.options.acceptedFiles); + } + if (_this.options.capture != null) { + _this.hiddenFileInput.setAttribute("capture", _this.options.capture); + } + _this.hiddenFileInput.style.visibility = "hidden"; + _this.hiddenFileInput.style.position = "absolute"; + _this.hiddenFileInput.style.top = "0"; + _this.hiddenFileInput.style.left = "0"; + _this.hiddenFileInput.style.height = "0"; + _this.hiddenFileInput.style.width = "0"; + document.body.appendChild(_this.hiddenFileInput); + return _this.hiddenFileInput.addEventListener("change", function() { + var file, files, _i, _len; + files = _this.hiddenFileInput.files; + if (files.length) { + for (_i = 0, _len = files.length; _i < _len; _i++) { + file = files[_i]; + _this.addFile(file); + } + } + _this.emit("addedfiles", files); + return setupHiddenFileInput(); + }); + }; + })(this); + setupHiddenFileInput(); + } + this.URL = (_ref = window.URL) != null ? _ref : window.webkitURL; + _ref1 = this.events; + for (_i = 0, _len = _ref1.length; _i < _len; _i++) { + eventName = _ref1[_i]; + this.on(eventName, this.options[eventName]); + } + this.on("uploadprogress", (function(_this) { + return function() { + return _this.updateTotalUploadProgress(); + }; + })(this)); + this.on("removedfile", (function(_this) { + return function() { + return _this.updateTotalUploadProgress(); + }; + })(this)); + this.on("canceled", (function(_this) { + return function(file) { + return _this.emit("complete", file); + }; + })(this)); + this.on("complete", (function(_this) { + return function(file) { + if (_this.getAddedFiles().length === 0 && _this.getUploadingFiles().length === 0 && _this.getQueuedFiles().length === 0) { + return setTimeout((function() { + return _this.emit("queuecomplete"); + }), 0); + } + }; + })(this)); + noPropagation = function(e) { + e.stopPropagation(); + if (e.preventDefault) { + return e.preventDefault(); + } else { + return e.returnValue = false; + } + }; + this.listeners = [ + { + element: this.element, + events: { + "dragstart": (function(_this) { + return function(e) { + return _this.emit("dragstart", e); + }; + })(this), + "dragenter": (function(_this) { + return function(e) { + noPropagation(e); + return _this.emit("dragenter", e); + }; + })(this), + "dragover": (function(_this) { + return function(e) { + var efct; + try { + efct = e.dataTransfer.effectAllowed; + } catch (_error) {} + e.dataTransfer.dropEffect = 'move' === efct || 'linkMove' === efct ? 'move' : 'copy'; + noPropagation(e); + return _this.emit("dragover", e); + }; + })(this), + "dragleave": (function(_this) { + return function(e) { + return _this.emit("dragleave", e); + }; + })(this), + "drop": (function(_this) { + return function(e) { + noPropagation(e); + return _this.drop(e); + }; + })(this), + "dragend": (function(_this) { + return function(e) { + return _this.emit("dragend", e); + }; + })(this) + } + } + ]; + this.clickableElements.forEach((function(_this) { + return function(clickableElement) { + return _this.listeners.push({ + element: clickableElement, + events: { + "click": function(evt) { + if ((clickableElement !== _this.element) || (evt.target === _this.element || Dropzone.elementInside(evt.target, _this.element.querySelector(".dz-message")))) { + _this.hiddenFileInput.click(); + } + return true; + } + } + }); + }; + })(this)); + this.enable(); + return this.options.init.call(this); + }; + + Dropzone.prototype.destroy = function() { + var _ref; + this.disable(); + this.removeAllFiles(true); + if ((_ref = this.hiddenFileInput) != null ? _ref.parentNode : void 0) { + this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput); + this.hiddenFileInput = null; + } + delete this.element.dropzone; + return Dropzone.instances.splice(Dropzone.instances.indexOf(this), 1); + }; + + Dropzone.prototype.updateTotalUploadProgress = function() { + var activeFiles, file, totalBytes, totalBytesSent, totalUploadProgress, _i, _len, _ref; + totalBytesSent = 0; + totalBytes = 0; + activeFiles = this.getActiveFiles(); + if (activeFiles.length) { + _ref = this.getActiveFiles(); + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + file = _ref[_i]; + totalBytesSent += file.upload.bytesSent; + totalBytes += file.upload.total; + } + totalUploadProgress = 100 * totalBytesSent / totalBytes; + } else { + totalUploadProgress = 100; + } + return this.emit("totaluploadprogress", totalUploadProgress, totalBytes, totalBytesSent); + }; + + Dropzone.prototype._getParamName = function(n) { + if (typeof this.options.paramName === "function") { + return this.options.paramName(n); + } else { + return "" + this.options.paramName + (this.options.uploadMultiple ? "[" + n + "]" : ""); + } + }; + + Dropzone.prototype.getFallbackForm = function() { + var existingFallback, fields, fieldsString, form; + if (existingFallback = this.getExistingFallback()) { + return existingFallback; + } + fieldsString = "
    "; + if (this.options.dictFallbackText) { + fieldsString += "

    " + this.options.dictFallbackText + "

    "; + } + fieldsString += "
    "; + fields = Dropzone.createElement(fieldsString); + if (this.element.tagName !== "FORM") { + form = Dropzone.createElement("
    "); + form.appendChild(fields); + } else { + this.element.setAttribute("enctype", "multipart/form-data"); + this.element.setAttribute("method", this.options.method); + } + return form != null ? form : fields; + }; + + Dropzone.prototype.getExistingFallback = function() { + var fallback, getFallback, tagName, _i, _len, _ref; + getFallback = function(elements) { + var el, _i, _len; + for (_i = 0, _len = elements.length; _i < _len; _i++) { + el = elements[_i]; + if (/(^| )fallback($| )/.test(el.className)) { + return el; + } + } + }; + _ref = ["div", "form"]; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + tagName = _ref[_i]; + if (fallback = getFallback(this.element.getElementsByTagName(tagName))) { + return fallback; + } + } + }; + + Dropzone.prototype.setupEventListeners = function() { + var elementListeners, event, listener, _i, _len, _ref, _results; + _ref = this.listeners; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + elementListeners = _ref[_i]; + _results.push((function() { + var _ref1, _results1; + _ref1 = elementListeners.events; + _results1 = []; + for (event in _ref1) { + listener = _ref1[event]; + _results1.push(elementListeners.element.addEventListener(event, listener, false)); + } + return _results1; + })()); + } + return _results; + }; + + Dropzone.prototype.removeEventListeners = function() { + var elementListeners, event, listener, _i, _len, _ref, _results; + _ref = this.listeners; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + elementListeners = _ref[_i]; + _results.push((function() { + var _ref1, _results1; + _ref1 = elementListeners.events; + _results1 = []; + for (event in _ref1) { + listener = _ref1[event]; + _results1.push(elementListeners.element.removeEventListener(event, listener, false)); + } + return _results1; + })()); + } + return _results; + }; + + Dropzone.prototype.disable = function() { + var file, _i, _len, _ref, _results; + this.clickableElements.forEach(function(element) { + return element.classList.remove("dz-clickable"); + }); + this.removeEventListeners(); + _ref = this.files; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + file = _ref[_i]; + _results.push(this.cancelUpload(file)); + } + return _results; + }; + + Dropzone.prototype.enable = function() { + this.clickableElements.forEach(function(element) { + return element.classList.add("dz-clickable"); + }); + return this.setupEventListeners(); + }; + + Dropzone.prototype.filesize = function(size) { + var cutoff, i, selectedSize, selectedUnit, unit, units, _i, _len; + selectedSize = 0; + selectedUnit = "b"; + if (size > 0) { + units = ['TB', 'GB', 'MB', 'KB', 'b']; + for (i = _i = 0, _len = units.length; _i < _len; i = ++_i) { + unit = units[i]; + cutoff = Math.pow(this.options.filesizeBase, 4 - i) / 10; + if (size >= cutoff) { + selectedSize = size / Math.pow(this.options.filesizeBase, 4 - i); + selectedUnit = unit; + break; + } + } + selectedSize = Math.round(10 * selectedSize) / 10; + } + return "" + selectedSize + " " + selectedUnit; + }; + + Dropzone.prototype._updateMaxFilesReachedClass = function() { + if ((this.options.maxFiles != null) && this.getAcceptedFiles().length >= this.options.maxFiles) { + if (this.getAcceptedFiles().length === this.options.maxFiles) { + this.emit('maxfilesreached', this.files); + } + return this.element.classList.add("dz-max-files-reached"); + } else { + return this.element.classList.remove("dz-max-files-reached"); + } + }; + + Dropzone.prototype.drop = function(e) { + var files, items; + if (!e.dataTransfer) { + return; + } + this.emit("drop", e); + files = e.dataTransfer.files; + this.emit("addedfiles", files); + if (files.length) { + items = e.dataTransfer.items; + if (items && items.length && (items[0].webkitGetAsEntry != null)) { + this._addFilesFromItems(items); + } else { + this.handleFiles(files); + } + } + }; + + Dropzone.prototype.paste = function(e) { + var items, _ref; + if ((e != null ? (_ref = e.clipboardData) != null ? _ref.items : void 0 : void 0) == null) { + return; + } + this.emit("paste", e); + items = e.clipboardData.items; + if (items.length) { + return this._addFilesFromItems(items); + } + }; + + Dropzone.prototype.handleFiles = function(files) { + var file, _i, _len, _results; + _results = []; + for (_i = 0, _len = files.length; _i < _len; _i++) { + file = files[_i]; + _results.push(this.addFile(file)); + } + return _results; + }; + + Dropzone.prototype._addFilesFromItems = function(items) { + var entry, item, _i, _len, _results; + _results = []; + for (_i = 0, _len = items.length; _i < _len; _i++) { + item = items[_i]; + if ((item.webkitGetAsEntry != null) && (entry = item.webkitGetAsEntry())) { + if (entry.isFile) { + _results.push(this.addFile(item.getAsFile())); + } else if (entry.isDirectory) { + _results.push(this._addFilesFromDirectory(entry, entry.name)); + } else { + _results.push(void 0); + } + } else if (item.getAsFile != null) { + if ((item.kind == null) || item.kind === "file") { + _results.push(this.addFile(item.getAsFile())); + } else { + _results.push(void 0); + } + } else { + _results.push(void 0); + } + } + return _results; + }; + + Dropzone.prototype._addFilesFromDirectory = function(directory, path) { + var dirReader, entriesReader; + dirReader = directory.createReader(); + entriesReader = (function(_this) { + return function(entries) { + var entry, _i, _len; + for (_i = 0, _len = entries.length; _i < _len; _i++) { + entry = entries[_i]; + if (entry.isFile) { + entry.file(function(file) { + if (_this.options.ignoreHiddenFiles && file.name.substring(0, 1) === '.') { + return; + } + file.fullPath = "" + path + "/" + file.name; + return _this.addFile(file); + }); + } else if (entry.isDirectory) { + _this._addFilesFromDirectory(entry, "" + path + "/" + entry.name); + } + } + }; + })(this); + return dirReader.readEntries(entriesReader, function(error) { + return typeof console !== "undefined" && console !== null ? typeof console.log === "function" ? console.log(error) : void 0 : void 0; + }); + }; + + Dropzone.prototype.accept = function(file, done) { + if (file.size > this.options.maxFilesize * 1024 * 1024) { + return done(this.options.dictFileTooBig.replace("{{filesize}}", Math.round(file.size / 1024 / 10.24) / 100).replace("{{maxFilesize}}", this.options.maxFilesize)); + } else if (!Dropzone.isValidFile(file, this.options.acceptedFiles)) { + return done(this.options.dictInvalidFileType); + } else if ((this.options.maxFiles != null) && this.getAcceptedFiles().length >= this.options.maxFiles) { + done(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}", this.options.maxFiles)); + return this.emit("maxfilesexceeded", file); + } else { + return this.options.accept.call(this, file, done); + } + }; + + Dropzone.prototype.addFile = function(file) { + file.upload = { + progress: 0, + total: file.size, + bytesSent: 0 + }; + this.files.push(file); + file.status = Dropzone.ADDED; + this.emit("addedfile", file); + this._enqueueThumbnail(file); + return this.accept(file, (function(_this) { + return function(error) { + if (error) { + file.accepted = false; + _this._errorProcessing([file], error); + } else { + file.accepted = true; + if (_this.options.autoQueue) { + _this.enqueueFile(file); + } + } + return _this._updateMaxFilesReachedClass(); + }; + })(this)); + }; + + Dropzone.prototype.enqueueFiles = function(files) { + var file, _i, _len; + for (_i = 0, _len = files.length; _i < _len; _i++) { + file = files[_i]; + this.enqueueFile(file); + } + return null; + }; + + Dropzone.prototype.enqueueFile = function(file) { + if (file.status === Dropzone.ADDED && file.accepted === true) { + file.status = Dropzone.QUEUED; + if (this.options.autoProcessQueue) { + return setTimeout(((function(_this) { + return function() { + return _this.processQueue(); + }; + })(this)), 0); + } + } else { + throw new Error("This file can't be queued because it has already been processed or was rejected."); + } + }; + + Dropzone.prototype._thumbnailQueue = []; + + Dropzone.prototype._processingThumbnail = false; + + Dropzone.prototype._enqueueThumbnail = function(file) { + if (this.options.createImageThumbnails && file.type.match(/image.*/) && file.size <= this.options.maxThumbnailFilesize * 1024 * 1024) { + this._thumbnailQueue.push(file); + return setTimeout(((function(_this) { + return function() { + return _this._processThumbnailQueue(); + }; + })(this)), 0); + } + }; + + Dropzone.prototype._processThumbnailQueue = function() { + if (this._processingThumbnail || this._thumbnailQueue.length === 0) { + return; + } + this._processingThumbnail = true; + return this.createThumbnail(this._thumbnailQueue.shift(), (function(_this) { + return function() { + _this._processingThumbnail = false; + return _this._processThumbnailQueue(); + }; + })(this)); + }; + + Dropzone.prototype.removeFile = function(file) { + if (file.status === Dropzone.UPLOADING) { + this.cancelUpload(file); + } + this.files = without(this.files, file); + this.emit("removedfile", file); + if (this.files.length === 0) { + return this.emit("reset"); + } + }; + + Dropzone.prototype.removeAllFiles = function(cancelIfNecessary) { + var file, _i, _len, _ref; + if (cancelIfNecessary == null) { + cancelIfNecessary = false; + } + _ref = this.files.slice(); + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + file = _ref[_i]; + if (file.status !== Dropzone.UPLOADING || cancelIfNecessary) { + this.removeFile(file); + } + } + return null; + }; + + Dropzone.prototype.createThumbnail = function(file, callback) { + var fileReader; + fileReader = new FileReader; + fileReader.onload = (function(_this) { + return function() { + if (file.type === "image/svg+xml") { + _this.emit("thumbnail", file, fileReader.result); + if (callback != null) { + callback(); + } + return; + } + return _this.createThumbnailFromUrl(file, fileReader.result, callback); + }; + })(this); + return fileReader.readAsDataURL(file); + }; + + Dropzone.prototype.createThumbnailFromUrl = function(file, imageUrl, callback) { + var img; + img = document.createElement("img"); + img.onload = (function(_this) { + return function() { + var canvas, ctx, resizeInfo, thumbnail, _ref, _ref1, _ref2, _ref3; + file.width = img.width; + file.height = img.height; + resizeInfo = _this.options.resize.call(_this, file); + if (resizeInfo.trgWidth == null) { + resizeInfo.trgWidth = resizeInfo.optWidth; + } + if (resizeInfo.trgHeight == null) { + resizeInfo.trgHeight = resizeInfo.optHeight; + } + canvas = document.createElement("canvas"); + ctx = canvas.getContext("2d"); + canvas.width = resizeInfo.trgWidth; + canvas.height = resizeInfo.trgHeight; + drawImageIOSFix(ctx, img, (_ref = resizeInfo.srcX) != null ? _ref : 0, (_ref1 = resizeInfo.srcY) != null ? _ref1 : 0, resizeInfo.srcWidth, resizeInfo.srcHeight, (_ref2 = resizeInfo.trgX) != null ? _ref2 : 0, (_ref3 = resizeInfo.trgY) != null ? _ref3 : 0, resizeInfo.trgWidth, resizeInfo.trgHeight); + thumbnail = canvas.toDataURL("image/png"); + _this.emit("thumbnail", file, thumbnail); + if (callback != null) { + return callback(); + } + }; + })(this); + if (callback != null) { + img.onerror = callback; + } + return img.src = imageUrl; + }; + + Dropzone.prototype.processQueue = function() { + var i, parallelUploads, processingLength, queuedFiles; + parallelUploads = this.options.parallelUploads; + processingLength = this.getUploadingFiles().length; + i = processingLength; + if (processingLength >= parallelUploads) { + return; + } + queuedFiles = this.getQueuedFiles(); + if (!(queuedFiles.length > 0)) { + return; + } + if (this.options.uploadMultiple) { + return this.processFiles(queuedFiles.slice(0, parallelUploads - processingLength)); + } else { + while (i < parallelUploads) { + if (!queuedFiles.length) { + return; + } + this.processFile(queuedFiles.shift()); + i++; + } + } + }; + + Dropzone.prototype.processFile = function(file) { + return this.processFiles([file]); + }; + + Dropzone.prototype.processFiles = function(files) { + var file, _i, _len; + for (_i = 0, _len = files.length; _i < _len; _i++) { + file = files[_i]; + file.processing = true; + file.status = Dropzone.UPLOADING; + this.emit("processing", file); + } + if (this.options.uploadMultiple) { + this.emit("processingmultiple", files); + } + return this.uploadFiles(files); + }; + + Dropzone.prototype._getFilesWithXhr = function(xhr) { + var file, files; + return files = (function() { + var _i, _len, _ref, _results; + _ref = this.files; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + file = _ref[_i]; + if (file.xhr === xhr) { + _results.push(file); + } + } + return _results; + }).call(this); + }; + + Dropzone.prototype.cancelUpload = function(file) { + var groupedFile, groupedFiles, _i, _j, _len, _len1, _ref; + if (file.status === Dropzone.UPLOADING) { + groupedFiles = this._getFilesWithXhr(file.xhr); + for (_i = 0, _len = groupedFiles.length; _i < _len; _i++) { + groupedFile = groupedFiles[_i]; + groupedFile.status = Dropzone.CANCELED; + } + file.xhr.abort(); + for (_j = 0, _len1 = groupedFiles.length; _j < _len1; _j++) { + groupedFile = groupedFiles[_j]; + this.emit("canceled", groupedFile); + } + if (this.options.uploadMultiple) { + this.emit("canceledmultiple", groupedFiles); + } + } else if ((_ref = file.status) === Dropzone.ADDED || _ref === Dropzone.QUEUED) { + file.status = Dropzone.CANCELED; + this.emit("canceled", file); + if (this.options.uploadMultiple) { + this.emit("canceledmultiple", [file]); + } + } + if (this.options.autoProcessQueue) { + return this.processQueue(); + } + }; + + resolveOption = function() { + var args, option; + option = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : []; + if (typeof option === 'function') { + return option.apply(this, args); + } + return option; + }; + + Dropzone.prototype.uploadFile = function(file) { + return this.uploadFiles([file]); + }; + + Dropzone.prototype.uploadFiles = function(files) { + var file, formData, handleError, headerName, headerValue, headers, i, input, inputName, inputType, key, method, option, progressObj, response, updateProgress, url, value, xhr, _i, _j, _k, _l, _len, _len1, _len2, _len3, _m, _ref, _ref1, _ref2, _ref3, _ref4, _ref5; + xhr = new XMLHttpRequest(); + for (_i = 0, _len = files.length; _i < _len; _i++) { + file = files[_i]; + file.xhr = xhr; + } + method = resolveOption(this.options.method, files); + url = resolveOption(this.options.url, files); + xhr.open(method, url, true); + xhr.withCredentials = !!this.options.withCredentials; + response = null; + handleError = (function(_this) { + return function() { + var _j, _len1, _results; + _results = []; + for (_j = 0, _len1 = files.length; _j < _len1; _j++) { + file = files[_j]; + _results.push(_this._errorProcessing(files, response || _this.options.dictResponseError.replace("{{statusCode}}", xhr.status), xhr)); + } + return _results; + }; + })(this); + updateProgress = (function(_this) { + return function(e) { + var allFilesFinished, progress, _j, _k, _l, _len1, _len2, _len3, _results; + if (e != null) { + progress = 100 * e.loaded / e.total; + for (_j = 0, _len1 = files.length; _j < _len1; _j++) { + file = files[_j]; + file.upload = { + progress: progress, + total: e.total, + bytesSent: e.loaded + }; + } + } else { + allFilesFinished = true; + progress = 100; + for (_k = 0, _len2 = files.length; _k < _len2; _k++) { + file = files[_k]; + if (!(file.upload.progress === 100 && file.upload.bytesSent === file.upload.total)) { + allFilesFinished = false; + } + file.upload.progress = progress; + file.upload.bytesSent = file.upload.total; + } + if (allFilesFinished) { + return; + } + } + _results = []; + for (_l = 0, _len3 = files.length; _l < _len3; _l++) { + file = files[_l]; + _results.push(_this.emit("uploadprogress", file, progress, file.upload.bytesSent)); + } + return _results; + }; + })(this); + xhr.onload = (function(_this) { + return function(e) { + var _ref; + if (files[0].status === Dropzone.CANCELED) { + return; + } + if (xhr.readyState !== 4) { + return; + } + response = xhr.responseText; + if (xhr.getResponseHeader("content-type") && ~xhr.getResponseHeader("content-type").indexOf("application/json")) { + try { + response = JSON.parse(response); + } catch (_error) { + e = _error; + response = "Invalid JSON response from server."; + } + } + updateProgress(); + if (!((200 <= (_ref = xhr.status) && _ref < 300))) { + return handleError(); + } else { + return _this._finished(files, response, e); + } + }; + })(this); + xhr.onerror = (function(_this) { + return function() { + if (files[0].status === Dropzone.CANCELED) { + return; + } + return handleError(); + }; + })(this); + progressObj = (_ref = xhr.upload) != null ? _ref : xhr; + progressObj.onprogress = updateProgress; + headers = { + "Accept": "application/json", + "Cache-Control": "no-cache", + "X-Requested-With": "XMLHttpRequest" + }; + if (this.options.headers) { + extend(headers, this.options.headers); + } + for (headerName in headers) { + headerValue = headers[headerName]; + if (headerValue) { + xhr.setRequestHeader(headerName, headerValue); + } + } + formData = new FormData(); + if (this.options.params) { + _ref1 = this.options.params; + for (key in _ref1) { + value = _ref1[key]; + formData.append(key, value); + } + } + for (_j = 0, _len1 = files.length; _j < _len1; _j++) { + file = files[_j]; + this.emit("sending", file, xhr, formData); + } + if (this.options.uploadMultiple) { + this.emit("sendingmultiple", files, xhr, formData); + } + if (this.element.tagName === "FORM") { + _ref2 = this.element.querySelectorAll("input, textarea, select, button"); + for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) { + input = _ref2[_k]; + inputName = input.getAttribute("name"); + inputType = input.getAttribute("type"); + if (input.tagName === "SELECT" && input.hasAttribute("multiple")) { + _ref3 = input.options; + for (_l = 0, _len3 = _ref3.length; _l < _len3; _l++) { + option = _ref3[_l]; + if (option.selected) { + formData.append(inputName, option.value); + } + } + } else if (!inputType || ((_ref4 = inputType.toLowerCase()) !== "checkbox" && _ref4 !== "radio") || input.checked) { + formData.append(inputName, input.value); + } + } + } + for (i = _m = 0, _ref5 = files.length - 1; 0 <= _ref5 ? _m <= _ref5 : _m >= _ref5; i = 0 <= _ref5 ? ++_m : --_m) { + formData.append(this._getParamName(i), files[i], files[i].name); + } + return this.submitRequest(xhr, formData, files); + }; + + Dropzone.prototype.submitRequest = function(xhr, formData, files) { + return xhr.send(formData); + }; + + Dropzone.prototype._finished = function(files, responseText, e) { + var file, _i, _len; + for (_i = 0, _len = files.length; _i < _len; _i++) { + file = files[_i]; + file.status = Dropzone.SUCCESS; + this.emit("success", file, responseText, e); + this.emit("complete", file); + } + if (this.options.uploadMultiple) { + this.emit("successmultiple", files, responseText, e); + this.emit("completemultiple", files); + } + if (this.options.autoProcessQueue) { + return this.processQueue(); + } + }; + + Dropzone.prototype._errorProcessing = function(files, message, xhr) { + var file, _i, _len; + for (_i = 0, _len = files.length; _i < _len; _i++) { + file = files[_i]; + file.status = Dropzone.ERROR; + this.emit("error", file, message, xhr); + this.emit("complete", file); + } + if (this.options.uploadMultiple) { + this.emit("errormultiple", files, message, xhr); + this.emit("completemultiple", files); + } + if (this.options.autoProcessQueue) { + return this.processQueue(); + } + }; + + return Dropzone; + + })(Emitter); + + Dropzone.version = "4.1.0"; + + Dropzone.options = {}; + + Dropzone.optionsForElement = function(element) { + if (element.getAttribute("id")) { + return Dropzone.options[camelize(element.getAttribute("id"))]; + } else { + return void 0; + } + }; + + Dropzone.instances = []; + + Dropzone.forElement = function(element) { + if (typeof element === "string") { + element = document.querySelector(element); + } + if ((element != null ? element.dropzone : void 0) == null) { + throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone."); + } + return element.dropzone; + }; + + //Dropzone.autoDiscover = true; + Dropzone.autoDiscover = false; // NLIB + + Dropzone.discover = function() { + var checkElements, dropzone, dropzones, _i, _len, _results; + if (document.querySelectorAll) { + dropzones = document.querySelectorAll(".dropzone"); + } else { + dropzones = []; + checkElements = function(elements) { + var el, _i, _len, _results; + _results = []; + for (_i = 0, _len = elements.length; _i < _len; _i++) { + el = elements[_i]; + if (/(^| )dropzone($| )/.test(el.className)) { + _results.push(dropzones.push(el)); + } else { + _results.push(void 0); + } + } + return _results; + }; + checkElements(document.getElementsByTagName("div")); + checkElements(document.getElementsByTagName("form")); + } + _results = []; + for (_i = 0, _len = dropzones.length; _i < _len; _i++) { + dropzone = dropzones[_i]; + if (Dropzone.optionsForElement(dropzone) !== false) { + _results.push(new Dropzone(dropzone)); + } else { + _results.push(void 0); + } + } + return _results; + }; + + Dropzone.blacklistedBrowsers = [/opera.*Macintosh.*version\/12/i]; + + Dropzone.isBrowserSupported = function() { + var capableBrowser, regex, _i, _len, _ref; + capableBrowser = true; + if (window.File && window.FileReader && window.FileList && window.Blob && window.FormData && document.querySelector) { + if (!("classList" in document.createElement("a"))) { + capableBrowser = false; + } else { + _ref = Dropzone.blacklistedBrowsers; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + regex = _ref[_i]; + if (regex.test(navigator.userAgent)) { + capableBrowser = false; + continue; + } + } + } + } else { + capableBrowser = false; + } + return capableBrowser; + }; + + without = function(list, rejectedItem) { + var item, _i, _len, _results; + _results = []; + for (_i = 0, _len = list.length; _i < _len; _i++) { + item = list[_i]; + if (item !== rejectedItem) { + _results.push(item); + } + } + return _results; + }; + + camelize = function(str) { + return str.replace(/[\-_](\w)/g, function(match) { + return match.charAt(1).toUpperCase(); + }); + }; + + Dropzone.createElement = function(string) { + var div; + div = document.createElement("div"); + div.innerHTML = string; + return div.childNodes[0]; + }; + + Dropzone.elementInside = function(element, container) { + if (element === container) { + return true; + } + while (element = element.parentNode) { + if (element === container) { + return true; + } + } + return false; + }; + + Dropzone.getElement = function(el, name) { + var element; + if (typeof el === "string") { + element = document.querySelector(el); + } else if (el.nodeType != null) { + element = el; + } + if (element == null) { + throw new Error("Invalid `" + name + "` option provided. Please provide a CSS selector or a plain HTML element."); + } + return element; + }; + + Dropzone.getElements = function(els, name) { + var e, el, elements, _i, _j, _len, _len1, _ref; + if (els instanceof Array) { + elements = []; + try { + for (_i = 0, _len = els.length; _i < _len; _i++) { + el = els[_i]; + elements.push(this.getElement(el, name)); + } + } catch (_error) { + e = _error; + elements = null; + } + } else if (typeof els === "string") { + elements = []; + _ref = document.querySelectorAll(els); + for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) { + el = _ref[_j]; + elements.push(el); + } + } else if (els.nodeType != null) { + elements = [els]; + } + if (!((elements != null) && elements.length)) { + throw new Error("Invalid `" + name + "` option provided. Please provide a CSS selector, a plain HTML element or a list of those."); + } + return elements; + }; + + Dropzone.confirm = function(question, accepted, rejected) { + if (window.confirm(question)) { + return accepted(); + } else if (rejected != null) { + return rejected(); + } + }; + + Dropzone.isValidFile = function(file, acceptedFiles) { + var baseMimeType, mimeType, validType, _i, _len; + if (!acceptedFiles) { + return true; + } + acceptedFiles = acceptedFiles.split(","); + mimeType = file.type; + baseMimeType = mimeType.replace(/\/.*$/, ""); + for (_i = 0, _len = acceptedFiles.length; _i < _len; _i++) { + validType = acceptedFiles[_i]; + validType = validType.trim(); + if (validType.charAt(0) === ".") { + if (file.name.toLowerCase().indexOf(validType.toLowerCase(), file.name.length - validType.length) !== -1) { + return true; + } + } else if (/\/\*$/.test(validType)) { + if (baseMimeType === validType.replace(/\/.*$/, "")) { + return true; + } + } else { + if (mimeType === validType) { + return true; + } + } + } + return false; + }; + + if (typeof jQuery !== "undefined" && jQuery !== null) { + jQuery.fn.dropzone = function(options) { + return this.each(function() { + return new Dropzone(this, options); + }); + }; + } + + if (typeof module !== "undefined" && module !== null) { + module.exports = Dropzone; + } else { + window.Dropzone = Dropzone; + } + + Dropzone.ADDED = "added"; + + Dropzone.QUEUED = "queued"; + + Dropzone.ACCEPTED = Dropzone.QUEUED; + + Dropzone.UPLOADING = "uploading"; + + Dropzone.PROCESSING = Dropzone.UPLOADING; + + Dropzone.CANCELED = "canceled"; + + Dropzone.ERROR = "error"; + + Dropzone.SUCCESS = "success"; + + + /* + + Bugfix for iOS 6 and 7 + Source: http://stackoverflow.com/questions/11929099/html5-canvas-drawimage-ratio-bug-ios + based on the work of https://github.com/stomita/ios-imagefile-megapixel + */ + + detectVerticalSquash = function(img) { + var alpha, canvas, ctx, data, ey, ih, iw, py, ratio, sy; + iw = img.naturalWidth; + ih = img.naturalHeight; + canvas = document.createElement("canvas"); + canvas.width = 1; + canvas.height = ih; + ctx = canvas.getContext("2d"); + ctx.drawImage(img, 0, 0); + data = ctx.getImageData(0, 0, 1, ih).data; + sy = 0; + ey = ih; + py = ih; + while (py > sy) { + alpha = data[(py - 1) * 4 + 3]; + if (alpha === 0) { + ey = py; + } else { + sy = py; + } + py = (ey + sy) >> 1; + } + ratio = py / ih; + if (ratio === 0) { + return 1; + } else { + return ratio; + } + }; + + drawImageIOSFix = function(ctx, img, sx, sy, sw, sh, dx, dy, dw, dh) { + var vertSquashRatio; + vertSquashRatio = detectVerticalSquash(img); + return ctx.drawImage(img, sx, sy, sw, sh, dx, dy, dw, dh / vertSquashRatio); + }; + + + /* + * contentloaded.js + * + * Author: Diego Perini (diego.perini at gmail.com) + * Summary: cross-browser wrapper for DOMContentLoaded + * Updated: 20101020 + * License: MIT + * Version: 1.2 + * + * URL: + * http://javascript.nwbox.com/ContentLoaded/ + * http://javascript.nwbox.com/ContentLoaded/MIT-LICENSE + */ + + contentLoaded = function(win, fn) { + var add, doc, done, init, poll, pre, rem, root, top; + done = false; + top = true; + doc = win.document; + root = doc.documentElement; + add = (doc.addEventListener ? "addEventListener" : "attachEvent"); + rem = (doc.addEventListener ? "removeEventListener" : "detachEvent"); + pre = (doc.addEventListener ? "" : "on"); + init = function(e) { + if (e.type === "readystatechange" && doc.readyState !== "complete") { + return; + } + (e.type === "load" ? win : doc)[rem](pre + e.type, init, false); + if (!done && (done = true)) { + return fn.call(win, e.type || e); + } + }; + poll = function() { + var e; + try { + root.doScroll("left"); + } catch (_error) { + e = _error; + setTimeout(poll, 50); + return; + } + return init("poll"); + }; + if (doc.readyState !== "complete") { + if (doc.createEventObject && root.doScroll) { + try { + top = !win.frameElement; + } catch (_error) {} + if (top) { + poll(); + } + } + doc[add](pre + "DOMContentLoaded", init, false); + doc[add](pre + "readystatechange", init, false); + return win[add](pre + "load", init, false); + } + }; + + Dropzone._autoDiscoverFunction = function() { + if (Dropzone.autoDiscover) { + return Dropzone.discover(); + } + }; + + contentLoaded(window, Dropzone._autoDiscoverFunction); + +}).call(this); diff --git a/src/main/webapp/js/fileupload/org/dropzone.css b/src/main/webapp/js/fileupload/org/dropzone.css index bcbbe3c3..1560e72d 100644 --- a/src/main/webapp/js/fileupload/org/dropzone.css +++ b/src/main/webapp/js/fileupload/org/dropzone.css @@ -1,392 +1,392 @@ -@-webkit-keyframes passing-through { - 0% { - opacity: 0; - -webkit-transform: translateY(40px); - -moz-transform: translateY(40px); - -ms-transform: translateY(40px); - -o-transform: translateY(40px); - transform: translateY(40px); } - 30%, 70% { - opacity: 1; - -webkit-transform: translateY(0px); - -moz-transform: translateY(0px); - -ms-transform: translateY(0px); - -o-transform: translateY(0px); - transform: translateY(0px); } - 100% { - opacity: 0; - -webkit-transform: translateY(-40px); - -moz-transform: translateY(-40px); - -ms-transform: translateY(-40px); - -o-transform: translateY(-40px); - transform: translateY(-40px); } } -@-moz-keyframes passing-through { - 0% { - opacity: 0; - -webkit-transform: translateY(40px); - -moz-transform: translateY(40px); - -ms-transform: translateY(40px); - -o-transform: translateY(40px); - transform: translateY(40px); } - 30%, 70% { - opacity: 1; - -webkit-transform: translateY(0px); - -moz-transform: translateY(0px); - -ms-transform: translateY(0px); - -o-transform: translateY(0px); - transform: translateY(0px); } - 100% { - opacity: 0; - -webkit-transform: translateY(-40px); - -moz-transform: translateY(-40px); - -ms-transform: translateY(-40px); - -o-transform: translateY(-40px); - transform: translateY(-40px); } } -@keyframes passing-through { - 0% { - opacity: 0; - -webkit-transform: translateY(40px); - -moz-transform: translateY(40px); - -ms-transform: translateY(40px); - -o-transform: translateY(40px); - transform: translateY(40px); } - 30%, 70% { - opacity: 1; - -webkit-transform: translateY(0px); - -moz-transform: translateY(0px); - -ms-transform: translateY(0px); - -o-transform: translateY(0px); - transform: translateY(0px); } - 100% { - opacity: 0; - -webkit-transform: translateY(-40px); - -moz-transform: translateY(-40px); - -ms-transform: translateY(-40px); - -o-transform: translateY(-40px); - transform: translateY(-40px); } } -@-webkit-keyframes slide-in { - 0% { - opacity: 0; - -webkit-transform: translateY(40px); - -moz-transform: translateY(40px); - -ms-transform: translateY(40px); - -o-transform: translateY(40px); - transform: translateY(40px); } - 30% { - opacity: 1; - -webkit-transform: translateY(0px); - -moz-transform: translateY(0px); - -ms-transform: translateY(0px); - -o-transform: translateY(0px); - transform: translateY(0px); } } -@-moz-keyframes slide-in { - 0% { - opacity: 0; - -webkit-transform: translateY(40px); - -moz-transform: translateY(40px); - -ms-transform: translateY(40px); - -o-transform: translateY(40px); - transform: translateY(40px); } - 30% { - opacity: 1; - -webkit-transform: translateY(0px); - -moz-transform: translateY(0px); - -ms-transform: translateY(0px); - -o-transform: translateY(0px); - transform: translateY(0px); } } -@keyframes slide-in { - 0% { - opacity: 0; - -webkit-transform: translateY(40px); - -moz-transform: translateY(40px); - -ms-transform: translateY(40px); - -o-transform: translateY(40px); - transform: translateY(40px); } - 30% { - opacity: 1; - -webkit-transform: translateY(0px); - -moz-transform: translateY(0px); - -ms-transform: translateY(0px); - -o-transform: translateY(0px); - transform: translateY(0px); } } -@-webkit-keyframes pulse { - 0% { - -webkit-transform: scale(1); - -moz-transform: scale(1); - -ms-transform: scale(1); - -o-transform: scale(1); - transform: scale(1); } - 10% { - -webkit-transform: scale(1.1); - -moz-transform: scale(1.1); - -ms-transform: scale(1.1); - -o-transform: scale(1.1); - transform: scale(1.1); } - 20% { - -webkit-transform: scale(1); - -moz-transform: scale(1); - -ms-transform: scale(1); - -o-transform: scale(1); - transform: scale(1); } } -@-moz-keyframes pulse { - 0% { - -webkit-transform: scale(1); - -moz-transform: scale(1); - -ms-transform: scale(1); - -o-transform: scale(1); - transform: scale(1); } - 10% { - -webkit-transform: scale(1.1); - -moz-transform: scale(1.1); - -ms-transform: scale(1.1); - -o-transform: scale(1.1); - transform: scale(1.1); } - 20% { - -webkit-transform: scale(1); - -moz-transform: scale(1); - -ms-transform: scale(1); - -o-transform: scale(1); - transform: scale(1); } } -@keyframes pulse { - 0% { - -webkit-transform: scale(1); - -moz-transform: scale(1); - -ms-transform: scale(1); - -o-transform: scale(1); - transform: scale(1); } - 10% { - -webkit-transform: scale(1.1); - -moz-transform: scale(1.1); - -ms-transform: scale(1.1); - -o-transform: scale(1.1); - transform: scale(1.1); } - 20% { - -webkit-transform: scale(1); - -moz-transform: scale(1); - -ms-transform: scale(1); - -o-transform: scale(1); - transform: scale(1); } } -.dropzone, .dropzone * { - box-sizing: border-box; } - -.dropzone { - min-height: 150px; - border: 2px solid rgba(0, 0, 0, 0.3); - background: white; - padding: 54px 54px; } - .dropzone.dz-clickable { - cursor: pointer; } - .dropzone.dz-clickable * { - cursor: default; } - .dropzone.dz-clickable .dz-message, .dropzone.dz-clickable .dz-message * { - cursor: pointer; } - .dropzone.dz-started .dz-message { - display: none; } - .dropzone.dz-drag-hover { - border-style: solid; } - .dropzone.dz-drag-hover .dz-message { - opacity: 0.5; } - .dropzone .dz-message { - text-align: center; - margin: 2em 0; } - .dropzone .dz-message .dz-button { - background: none; - color: inherit; - border: none; - padding: 0; - font: inherit; - cursor: pointer; - outline: inherit; } - .dropzone .dz-preview { - position: relative; - display: inline-block; - vertical-align: top; - margin: 16px; - min-height: 100px; } - .dropzone .dz-preview:hover { - z-index: 1000; } - .dropzone .dz-preview:hover .dz-details { - opacity: 1; } - .dropzone .dz-preview.dz-file-preview .dz-image { - border-radius: 20px; - background: #999; - background: linear-gradient(to bottom, #eee, #ddd); } - .dropzone .dz-preview.dz-file-preview .dz-details { - opacity: 1; } - .dropzone .dz-preview.dz-image-preview { - background: white; } - .dropzone .dz-preview.dz-image-preview .dz-details { - -webkit-transition: opacity 0.2s linear; - -moz-transition: opacity 0.2s linear; - -ms-transition: opacity 0.2s linear; - -o-transition: opacity 0.2s linear; - transition: opacity 0.2s linear; } - .dropzone .dz-preview .dz-remove { - font-size: 14px; - text-align: center; - display: block; - cursor: pointer; - border: none; } - .dropzone .dz-preview .dz-remove:hover { - text-decoration: underline; } - .dropzone .dz-preview:hover .dz-details { - opacity: 1; } - .dropzone .dz-preview .dz-details { - z-index: 20; - position: absolute; - top: 0; - left: 0; - opacity: 0; - font-size: 13px; - min-width: 100%; - max-width: 100%; - padding: 2em 1em; - text-align: center; - color: rgba(0, 0, 0, 0.9); - line-height: 150%; } - .dropzone .dz-preview .dz-details .dz-size { - margin-bottom: 1em; - font-size: 16px; } - .dropzone .dz-preview .dz-details .dz-filename { - white-space: nowrap; } - .dropzone .dz-preview .dz-details .dz-filename:hover span { - border: 1px solid rgba(200, 200, 200, 0.8); - background-color: rgba(255, 255, 255, 0.8); } - .dropzone .dz-preview .dz-details .dz-filename:not(:hover) { - overflow: hidden; - text-overflow: ellipsis; } - .dropzone .dz-preview .dz-details .dz-filename:not(:hover) span { - border: 1px solid transparent; } - .dropzone .dz-preview .dz-details .dz-filename span, .dropzone .dz-preview .dz-details .dz-size span { - background-color: rgba(255, 255, 255, 0.4); - padding: 0 0.4em; - border-radius: 3px; } - .dropzone .dz-preview:hover .dz-image img { - -webkit-transform: scale(1.05, 1.05); - -moz-transform: scale(1.05, 1.05); - -ms-transform: scale(1.05, 1.05); - -o-transform: scale(1.05, 1.05); - transform: scale(1.05, 1.05); - -webkit-filter: blur(8px); - filter: blur(8px); } - .dropzone .dz-preview .dz-image { - border-radius: 20px; - overflow: hidden; - width: 120px; - height: 120px; - position: relative; - display: block; - z-index: 10; } - .dropzone .dz-preview .dz-image img { - display: block; } - .dropzone .dz-preview.dz-success .dz-success-mark { - -webkit-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1); - -moz-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1); - -ms-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1); - -o-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1); - animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1); } - .dropzone .dz-preview.dz-error .dz-error-mark { - opacity: 1; - -webkit-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1); - -moz-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1); - -ms-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1); - -o-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1); - animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1); } - .dropzone .dz-preview .dz-success-mark, .dropzone .dz-preview .dz-error-mark { - pointer-events: none; - opacity: 0; - z-index: 500; - position: absolute; - display: block; - top: 50%; - left: 50%; - margin-left: -27px; - margin-top: -27px; } - .dropzone .dz-preview .dz-success-mark svg, .dropzone .dz-preview .dz-error-mark svg { - display: block; - width: 54px; - height: 54px; } - .dropzone .dz-preview.dz-processing .dz-progress { - opacity: 1; - -webkit-transition: all 0.2s linear; - -moz-transition: all 0.2s linear; - -ms-transition: all 0.2s linear; - -o-transition: all 0.2s linear; - transition: all 0.2s linear; } - .dropzone .dz-preview.dz-complete .dz-progress { - opacity: 0; - -webkit-transition: opacity 0.4s ease-in; - -moz-transition: opacity 0.4s ease-in; - -ms-transition: opacity 0.4s ease-in; - -o-transition: opacity 0.4s ease-in; - transition: opacity 0.4s ease-in; } - .dropzone .dz-preview:not(.dz-processing) .dz-progress { - -webkit-animation: pulse 6s ease infinite; - -moz-animation: pulse 6s ease infinite; - -ms-animation: pulse 6s ease infinite; - -o-animation: pulse 6s ease infinite; - animation: pulse 6s ease infinite; } - .dropzone .dz-preview .dz-progress { - opacity: 1; - z-index: 1000; - pointer-events: none; - position: absolute; - height: 16px; - left: 50%; - top: 50%; - margin-top: -8px; - width: 80px; - margin-left: -40px; - background: rgba(255, 255, 255, 0.9); - -webkit-transform: scale(1); - border-radius: 8px; - overflow: hidden; } - .dropzone .dz-preview .dz-progress .dz-upload { - background: #333; - background: linear-gradient(to bottom, #666, #444); - position: absolute; - top: 0; - left: 0; - bottom: 0; - width: 0; - -webkit-transition: width 300ms ease-in-out; - -moz-transition: width 300ms ease-in-out; - -ms-transition: width 300ms ease-in-out; - -o-transition: width 300ms ease-in-out; - transition: width 300ms ease-in-out; } - .dropzone .dz-preview.dz-error .dz-error-message { - display: block; } - .dropzone .dz-preview.dz-error:hover .dz-error-message { - opacity: 1; - pointer-events: auto; } - .dropzone .dz-preview .dz-error-message { - pointer-events: none; - z-index: 1000; - position: absolute; - display: block; - display: none; - opacity: 0; - -webkit-transition: opacity 0.3s ease; - -moz-transition: opacity 0.3s ease; - -ms-transition: opacity 0.3s ease; - -o-transition: opacity 0.3s ease; - transition: opacity 0.3s ease; - border-radius: 8px; - font-size: 13px; - top: 130px; - left: -10px; - width: 140px; - background: #be2626; - background: linear-gradient(to bottom, #be2626, #a92222); - padding: 0.5em 1.2em; - color: white; } - .dropzone .dz-preview .dz-error-message:after { - content: ''; - position: absolute; - top: -6px; - left: 64px; - width: 0; - height: 0; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-bottom: 6px solid #be2626; } +@-webkit-keyframes passing-through { + 0% { + opacity: 0; + -webkit-transform: translateY(40px); + -moz-transform: translateY(40px); + -ms-transform: translateY(40px); + -o-transform: translateY(40px); + transform: translateY(40px); } + 30%, 70% { + opacity: 1; + -webkit-transform: translateY(0px); + -moz-transform: translateY(0px); + -ms-transform: translateY(0px); + -o-transform: translateY(0px); + transform: translateY(0px); } + 100% { + opacity: 0; + -webkit-transform: translateY(-40px); + -moz-transform: translateY(-40px); + -ms-transform: translateY(-40px); + -o-transform: translateY(-40px); + transform: translateY(-40px); } } +@-moz-keyframes passing-through { + 0% { + opacity: 0; + -webkit-transform: translateY(40px); + -moz-transform: translateY(40px); + -ms-transform: translateY(40px); + -o-transform: translateY(40px); + transform: translateY(40px); } + 30%, 70% { + opacity: 1; + -webkit-transform: translateY(0px); + -moz-transform: translateY(0px); + -ms-transform: translateY(0px); + -o-transform: translateY(0px); + transform: translateY(0px); } + 100% { + opacity: 0; + -webkit-transform: translateY(-40px); + -moz-transform: translateY(-40px); + -ms-transform: translateY(-40px); + -o-transform: translateY(-40px); + transform: translateY(-40px); } } +@keyframes passing-through { + 0% { + opacity: 0; + -webkit-transform: translateY(40px); + -moz-transform: translateY(40px); + -ms-transform: translateY(40px); + -o-transform: translateY(40px); + transform: translateY(40px); } + 30%, 70% { + opacity: 1; + -webkit-transform: translateY(0px); + -moz-transform: translateY(0px); + -ms-transform: translateY(0px); + -o-transform: translateY(0px); + transform: translateY(0px); } + 100% { + opacity: 0; + -webkit-transform: translateY(-40px); + -moz-transform: translateY(-40px); + -ms-transform: translateY(-40px); + -o-transform: translateY(-40px); + transform: translateY(-40px); } } +@-webkit-keyframes slide-in { + 0% { + opacity: 0; + -webkit-transform: translateY(40px); + -moz-transform: translateY(40px); + -ms-transform: translateY(40px); + -o-transform: translateY(40px); + transform: translateY(40px); } + 30% { + opacity: 1; + -webkit-transform: translateY(0px); + -moz-transform: translateY(0px); + -ms-transform: translateY(0px); + -o-transform: translateY(0px); + transform: translateY(0px); } } +@-moz-keyframes slide-in { + 0% { + opacity: 0; + -webkit-transform: translateY(40px); + -moz-transform: translateY(40px); + -ms-transform: translateY(40px); + -o-transform: translateY(40px); + transform: translateY(40px); } + 30% { + opacity: 1; + -webkit-transform: translateY(0px); + -moz-transform: translateY(0px); + -ms-transform: translateY(0px); + -o-transform: translateY(0px); + transform: translateY(0px); } } +@keyframes slide-in { + 0% { + opacity: 0; + -webkit-transform: translateY(40px); + -moz-transform: translateY(40px); + -ms-transform: translateY(40px); + -o-transform: translateY(40px); + transform: translateY(40px); } + 30% { + opacity: 1; + -webkit-transform: translateY(0px); + -moz-transform: translateY(0px); + -ms-transform: translateY(0px); + -o-transform: translateY(0px); + transform: translateY(0px); } } +@-webkit-keyframes pulse { + 0% { + -webkit-transform: scale(1); + -moz-transform: scale(1); + -ms-transform: scale(1); + -o-transform: scale(1); + transform: scale(1); } + 10% { + -webkit-transform: scale(1.1); + -moz-transform: scale(1.1); + -ms-transform: scale(1.1); + -o-transform: scale(1.1); + transform: scale(1.1); } + 20% { + -webkit-transform: scale(1); + -moz-transform: scale(1); + -ms-transform: scale(1); + -o-transform: scale(1); + transform: scale(1); } } +@-moz-keyframes pulse { + 0% { + -webkit-transform: scale(1); + -moz-transform: scale(1); + -ms-transform: scale(1); + -o-transform: scale(1); + transform: scale(1); } + 10% { + -webkit-transform: scale(1.1); + -moz-transform: scale(1.1); + -ms-transform: scale(1.1); + -o-transform: scale(1.1); + transform: scale(1.1); } + 20% { + -webkit-transform: scale(1); + -moz-transform: scale(1); + -ms-transform: scale(1); + -o-transform: scale(1); + transform: scale(1); } } +@keyframes pulse { + 0% { + -webkit-transform: scale(1); + -moz-transform: scale(1); + -ms-transform: scale(1); + -o-transform: scale(1); + transform: scale(1); } + 10% { + -webkit-transform: scale(1.1); + -moz-transform: scale(1.1); + -ms-transform: scale(1.1); + -o-transform: scale(1.1); + transform: scale(1.1); } + 20% { + -webkit-transform: scale(1); + -moz-transform: scale(1); + -ms-transform: scale(1); + -o-transform: scale(1); + transform: scale(1); } } +.dropzone, .dropzone * { + box-sizing: border-box; } + +.dropzone { + min-height: 150px; + border: 2px solid rgba(0, 0, 0, 0.3); + background: white; + padding: 54px 54px; } + .dropzone.dz-clickable { + cursor: pointer; } + .dropzone.dz-clickable * { + cursor: default; } + .dropzone.dz-clickable .dz-message, .dropzone.dz-clickable .dz-message * { + cursor: pointer; } + .dropzone.dz-started .dz-message { + display: none; } + .dropzone.dz-drag-hover { + border-style: solid; } + .dropzone.dz-drag-hover .dz-message { + opacity: 0.5; } + .dropzone .dz-message { + text-align: center; + margin: 2em 0; } + .dropzone .dz-message .dz-button { + background: none; + color: inherit; + border: none; + padding: 0; + font: inherit; + cursor: pointer; + outline: inherit; } + .dropzone .dz-preview { + position: relative; + display: inline-block; + vertical-align: top; + margin: 16px; + min-height: 100px; } + .dropzone .dz-preview:hover { + z-index: 1000; } + .dropzone .dz-preview:hover .dz-details { + opacity: 1; } + .dropzone .dz-preview.dz-file-preview .dz-image { + border-radius: 20px; + background: #999; + background: linear-gradient(to bottom, #eee, #ddd); } + .dropzone .dz-preview.dz-file-preview .dz-details { + opacity: 1; } + .dropzone .dz-preview.dz-image-preview { + background: white; } + .dropzone .dz-preview.dz-image-preview .dz-details { + -webkit-transition: opacity 0.2s linear; + -moz-transition: opacity 0.2s linear; + -ms-transition: opacity 0.2s linear; + -o-transition: opacity 0.2s linear; + transition: opacity 0.2s linear; } + .dropzone .dz-preview .dz-remove { + font-size: 14px; + text-align: center; + display: block; + cursor: pointer; + border: none; } + .dropzone .dz-preview .dz-remove:hover { + text-decoration: underline; } + .dropzone .dz-preview:hover .dz-details { + opacity: 1; } + .dropzone .dz-preview .dz-details { + z-index: 20; + position: absolute; + top: 0; + left: 0; + opacity: 0; + font-size: 13px; + min-width: 100%; + max-width: 100%; + padding: 2em 1em; + text-align: center; + color: rgba(0, 0, 0, 0.9); + line-height: 150%; } + .dropzone .dz-preview .dz-details .dz-size { + margin-bottom: 1em; + font-size: 16px; } + .dropzone .dz-preview .dz-details .dz-filename { + white-space: nowrap; } + .dropzone .dz-preview .dz-details .dz-filename:hover span { + border: 1px solid rgba(200, 200, 200, 0.8); + background-color: rgba(255, 255, 255, 0.8); } + .dropzone .dz-preview .dz-details .dz-filename:not(:hover) { + overflow: hidden; + text-overflow: ellipsis; } + .dropzone .dz-preview .dz-details .dz-filename:not(:hover) span { + border: 1px solid transparent; } + .dropzone .dz-preview .dz-details .dz-filename span, .dropzone .dz-preview .dz-details .dz-size span { + background-color: rgba(255, 255, 255, 0.4); + padding: 0 0.4em; + border-radius: 3px; } + .dropzone .dz-preview:hover .dz-image img { + -webkit-transform: scale(1.05, 1.05); + -moz-transform: scale(1.05, 1.05); + -ms-transform: scale(1.05, 1.05); + -o-transform: scale(1.05, 1.05); + transform: scale(1.05, 1.05); + -webkit-filter: blur(8px); + filter: blur(8px); } + .dropzone .dz-preview .dz-image { + border-radius: 20px; + overflow: hidden; + width: 120px; + height: 120px; + position: relative; + display: block; + z-index: 10; } + .dropzone .dz-preview .dz-image img { + display: block; } + .dropzone .dz-preview.dz-success .dz-success-mark { + -webkit-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1); + -moz-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1); + -ms-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1); + -o-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1); + animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1); } + .dropzone .dz-preview.dz-error .dz-error-mark { + opacity: 1; + -webkit-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1); + -moz-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1); + -ms-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1); + -o-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1); + animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1); } + .dropzone .dz-preview .dz-success-mark, .dropzone .dz-preview .dz-error-mark { + pointer-events: none; + opacity: 0; + z-index: 500; + position: absolute; + display: block; + top: 50%; + left: 50%; + margin-left: -27px; + margin-top: -27px; } + .dropzone .dz-preview .dz-success-mark svg, .dropzone .dz-preview .dz-error-mark svg { + display: block; + width: 54px; + height: 54px; } + .dropzone .dz-preview.dz-processing .dz-progress { + opacity: 1; + -webkit-transition: all 0.2s linear; + -moz-transition: all 0.2s linear; + -ms-transition: all 0.2s linear; + -o-transition: all 0.2s linear; + transition: all 0.2s linear; } + .dropzone .dz-preview.dz-complete .dz-progress { + opacity: 0; + -webkit-transition: opacity 0.4s ease-in; + -moz-transition: opacity 0.4s ease-in; + -ms-transition: opacity 0.4s ease-in; + -o-transition: opacity 0.4s ease-in; + transition: opacity 0.4s ease-in; } + .dropzone .dz-preview:not(.dz-processing) .dz-progress { + -webkit-animation: pulse 6s ease infinite; + -moz-animation: pulse 6s ease infinite; + -ms-animation: pulse 6s ease infinite; + -o-animation: pulse 6s ease infinite; + animation: pulse 6s ease infinite; } + .dropzone .dz-preview .dz-progress { + opacity: 1; + z-index: 1000; + pointer-events: none; + position: absolute; + height: 16px; + left: 50%; + top: 50%; + margin-top: -8px; + width: 80px; + margin-left: -40px; + background: rgba(255, 255, 255, 0.9); + -webkit-transform: scale(1); + border-radius: 8px; + overflow: hidden; } + .dropzone .dz-preview .dz-progress .dz-upload { + background: #333; + background: linear-gradient(to bottom, #666, #444); + position: absolute; + top: 0; + left: 0; + bottom: 0; + width: 0; + -webkit-transition: width 300ms ease-in-out; + -moz-transition: width 300ms ease-in-out; + -ms-transition: width 300ms ease-in-out; + -o-transition: width 300ms ease-in-out; + transition: width 300ms ease-in-out; } + .dropzone .dz-preview.dz-error .dz-error-message { + display: block; } + .dropzone .dz-preview.dz-error:hover .dz-error-message { + opacity: 1; + pointer-events: auto; } + .dropzone .dz-preview .dz-error-message { + pointer-events: none; + z-index: 1000; + position: absolute; + display: block; + display: none; + opacity: 0; + -webkit-transition: opacity 0.3s ease; + -moz-transition: opacity 0.3s ease; + -ms-transition: opacity 0.3s ease; + -o-transition: opacity 0.3s ease; + transition: opacity 0.3s ease; + border-radius: 8px; + font-size: 13px; + top: 130px; + left: -10px; + width: 140px; + background: #be2626; + background: linear-gradient(to bottom, #be2626, #a92222); + padding: 0.5em 1.2em; + color: white; } + .dropzone .dz-preview .dz-error-message:after { + content: ''; + position: absolute; + top: -6px; + left: 64px; + width: 0; + height: 0; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-bottom: 6px solid #be2626; } diff --git a/src/main/webapp/js/fileupload/org/dropzone.js b/src/main/webapp/js/fileupload/org/dropzone.js index b4ea76ad..3b683551 100644 --- a/src/main/webapp/js/fileupload/org/dropzone.js +++ b/src/main/webapp/js/fileupload/org/dropzone.js @@ -1,1748 +1,1748 @@ - -/* - * - * More info at [www.dropzonejs.com](http://www.dropzonejs.com) - * - * Copyright (c) 2012, Matias Meno - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * - */ - -(function() { - var Dropzone, Emitter, camelize, contentLoaded, detectVerticalSquash, drawImageIOSFix, noop, without, - __slice = [].slice, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; - - noop = function() {}; - - Emitter = (function() { - function Emitter() {} - - Emitter.prototype.addEventListener = Emitter.prototype.on; - - Emitter.prototype.on = function(event, fn) { - this._callbacks = this._callbacks || {}; - if (!this._callbacks[event]) { - this._callbacks[event] = []; - } - this._callbacks[event].push(fn); - return this; - }; - - Emitter.prototype.emit = function() { - var args, callback, callbacks, event, _i, _len; - event = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : []; - this._callbacks = this._callbacks || {}; - callbacks = this._callbacks[event]; - if (callbacks) { - for (_i = 0, _len = callbacks.length; _i < _len; _i++) { - callback = callbacks[_i]; - callback.apply(this, args); - } - } - return this; - }; - - Emitter.prototype.removeListener = Emitter.prototype.off; - - Emitter.prototype.removeAllListeners = Emitter.prototype.off; - - Emitter.prototype.removeEventListener = Emitter.prototype.off; - - Emitter.prototype.off = function(event, fn) { - var callback, callbacks, i, _i, _len; - if (!this._callbacks || arguments.length === 0) { - this._callbacks = {}; - return this; - } - callbacks = this._callbacks[event]; - if (!callbacks) { - return this; - } - if (arguments.length === 1) { - delete this._callbacks[event]; - return this; - } - for (i = _i = 0, _len = callbacks.length; _i < _len; i = ++_i) { - callback = callbacks[i]; - if (callback === fn) { - callbacks.splice(i, 1); - break; - } - } - return this; - }; - - return Emitter; - - })(); - - Dropzone = (function(_super) { - var extend, resolveOption; - - __extends(Dropzone, _super); - - Dropzone.prototype.Emitter = Emitter; - - - /* - This is a list of all available events you can register on a dropzone object. - - You can register an event handler like this: - - 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.defaultOptions = { - url: null, - method: "post", - withCredentials: false, - parallelUploads: 2, - uploadMultiple: false, - maxFilesize: 256, - paramName: "file", - createImageThumbnails: true, - maxThumbnailFilesize: 10, - thumbnailWidth: 120, - thumbnailHeight: 120, - filesizeBase: 1000, - maxFiles: null, - params: {}, - clickable: true, - ignoreHiddenFiles: true, - acceptedFiles: null, - acceptedMimeTypes: null, - autoProcessQueue: true, - autoQueue: true, - addRemoveLinks: false, - previewsContainer: null, - capture: null, - dictDefaultMessage: "Drop files here to upload", - dictFallbackMessage: "Your browser does not support drag'n'drop file uploads.", - dictFallbackText: "Please use the fallback form below to upload your files like in the olden days.", - dictFileTooBig: "File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.", - dictInvalidFileType: "You can't upload files of this type.", - dictResponseError: "Server responded with {{statusCode}} code.", - dictCancelUpload: "Cancel upload", - dictCancelUploadConfirmation: "Are you sure you want to cancel this upload?", - dictRemoveFile: "Remove file", - dictRemoveFileConfirmation: null, - dictMaxFilesExceeded: "You can not upload any more files.", - accept: function(file, done) { - return done(); - }, - init: function() { - return noop; - }, - forceFallback: false, - fallback: function() { - var child, messageElement, span, _i, _len, _ref; - this.element.className = "" + this.element.className + " dz-browser-not-supported"; - _ref = this.element.getElementsByTagName("div"); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - child = _ref[_i]; - if (/(^| )dz-message($| )/.test(child.className)) { - messageElement = child; - child.className = "dz-message"; - continue; - } - } - if (!messageElement) { - messageElement = Dropzone.createElement("
    "); - this.element.appendChild(messageElement); - } - span = messageElement.getElementsByTagName("span")[0]; - if (span) { - if (span.textContent != null) { - span.textContent = this.options.dictFallbackMessage; - } else if (span.innerText != null) { - span.innerText = this.options.dictFallbackMessage; - } - } - return this.element.appendChild(this.getFallbackForm()); - }, - resize: function(file) { - var info, srcRatio, trgRatio; - info = { - srcX: 0, - srcY: 0, - srcWidth: file.width, - srcHeight: file.height - }; - srcRatio = file.width / file.height; - info.optWidth = this.options.thumbnailWidth; - info.optHeight = this.options.thumbnailHeight; - if ((info.optWidth == null) && (info.optHeight == null)) { - info.optWidth = info.srcWidth; - info.optHeight = info.srcHeight; - } else if (info.optWidth == null) { - info.optWidth = srcRatio * info.optHeight; - } else if (info.optHeight == null) { - info.optHeight = (1 / srcRatio) * info.optWidth; - } - trgRatio = info.optWidth / info.optHeight; - if (file.height < info.optHeight || file.width < info.optWidth) { - info.trgHeight = info.srcHeight; - info.trgWidth = info.srcWidth; - } else { - if (srcRatio > trgRatio) { - info.srcHeight = file.height; - info.srcWidth = info.srcHeight * trgRatio; - } else { - info.srcWidth = file.width; - info.srcHeight = info.srcWidth / trgRatio; - } - } - info.srcX = (file.width - info.srcWidth) / 2; - info.srcY = (file.height - info.srcHeight) / 2; - return info; - }, - - /* - Those functions register themselves to the events on init and handle all - the user interface specific stuff. Overwriting them won't break the upload - but can break the way it's displayed. - You can overwrite them if you don't like the default behavior. If you just - want to add an additional event handler, register it on the dropzone object - and don't overwrite those options. - */ - drop: function(e) { - return this.element.classList.remove("dz-drag-hover"); - }, - dragstart: noop, - dragend: function(e) { - return this.element.classList.remove("dz-drag-hover"); - }, - dragenter: function(e) { - return this.element.classList.add("dz-drag-hover"); - }, - dragover: function(e) { - return this.element.classList.add("dz-drag-hover"); - }, - dragleave: function(e) { - return this.element.classList.remove("dz-drag-hover"); - }, - paste: noop, - reset: function() { - return this.element.classList.remove("dz-started"); - }, - addedfile: function(file) { - var node, removeFileEvent, removeLink, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _results; - if (this.element === this.previewsContainer) { - this.element.classList.add("dz-started"); - } - if (this.previewsContainer) { - file.previewElement = Dropzone.createElement(this.options.previewTemplate.trim()); - file.previewTemplate = file.previewElement; - this.previewsContainer.appendChild(file.previewElement); - _ref = file.previewElement.querySelectorAll("[data-dz-name]"); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - node = _ref[_i]; - node.textContent = file.name; - } - _ref1 = file.previewElement.querySelectorAll("[data-dz-size]"); - for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { - node = _ref1[_j]; - node.innerHTML = this.filesize(file.size); - } - if (this.options.addRemoveLinks) { - file._removeLink = Dropzone.createElement("" + this.options.dictRemoveFile + ""); - file.previewElement.appendChild(file._removeLink); - } - removeFileEvent = (function(_this) { - return function(e) { - e.preventDefault(); - e.stopPropagation(); - if (file.status === Dropzone.UPLOADING) { - return Dropzone.confirm(_this.options.dictCancelUploadConfirmation, function() { - return _this.removeFile(file); - }); - } else { - if (_this.options.dictRemoveFileConfirmation) { - return Dropzone.confirm(_this.options.dictRemoveFileConfirmation, function() { - return _this.removeFile(file); - }); - } else { - return _this.removeFile(file); - } - } - }; - })(this); - _ref2 = file.previewElement.querySelectorAll("[data-dz-remove]"); - _results = []; - for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) { - removeLink = _ref2[_k]; - _results.push(removeLink.addEventListener("click", removeFileEvent)); - } - return _results; - } - }, - removedfile: function(file) { - var _ref; - if (file.previewElement) { - if ((_ref = file.previewElement) != null) { - _ref.parentNode.removeChild(file.previewElement); - } - } - return this._updateMaxFilesReachedClass(); - }, - thumbnail: function(file, dataUrl) { - var thumbnailElement, _i, _len, _ref; - if (file.previewElement) { - file.previewElement.classList.remove("dz-file-preview"); - _ref = file.previewElement.querySelectorAll("[data-dz-thumbnail]"); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - thumbnailElement = _ref[_i]; - thumbnailElement.alt = file.name; - thumbnailElement.src = dataUrl; - } - return setTimeout(((function(_this) { - return function() { - return file.previewElement.classList.add("dz-image-preview"); - }; - })(this)), 1); - } - }, - error: function(file, message) { - var node, _i, _len, _ref, _results; - if (file.previewElement) { - file.previewElement.classList.add("dz-error"); - if (typeof message !== "String" && message.error) { - message = message.error; - } - _ref = file.previewElement.querySelectorAll("[data-dz-errormessage]"); - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - node = _ref[_i]; - _results.push(node.textContent = message); - } - return _results; - } - }, - errormultiple: noop, - processing: function(file) { - if (file.previewElement) { - file.previewElement.classList.add("dz-processing"); - if (file._removeLink) { - return file._removeLink.textContent = this.options.dictCancelUpload; - } - } - }, - processingmultiple: noop, - uploadprogress: function(file, progress, bytesSent) { - var node, _i, _len, _ref, _results; - if (file.previewElement) { - _ref = file.previewElement.querySelectorAll("[data-dz-uploadprogress]"); - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - node = _ref[_i]; - if (node.nodeName === 'PROGRESS') { - _results.push(node.value = progress); - } else { - _results.push(node.style.width = "" + progress + "%"); - } - } - return _results; - } - }, - totaluploadprogress: noop, - sending: noop, - sendingmultiple: noop, - success: function(file) { - if (file.previewElement) { - return file.previewElement.classList.add("dz-success"); - } - }, - successmultiple: noop, - canceled: function(file) { - return this.emit("error", file, "Upload canceled."); - }, - canceledmultiple: noop, - complete: function(file) { - if (file._removeLink) { - file._removeLink.textContent = this.options.dictRemoveFile; - } - if (file.previewElement) { - return file.previewElement.classList.add("dz-complete"); - } - }, - completemultiple: noop, - maxfilesexceeded: noop, - 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
    " - }; - - extend = function() { - var key, object, objects, target, val, _i, _len; - target = arguments[0], objects = 2 <= arguments.length ? __slice.call(arguments, 1) : []; - for (_i = 0, _len = objects.length; _i < _len; _i++) { - object = objects[_i]; - for (key in object) { - val = object[key]; - target[key] = val; - } - } - return target; - }; - - function Dropzone(element, options) { - var elementOptions, fallback, _ref; - this.element = element; - this.version = Dropzone.version; - this.defaultOptions.previewTemplate = this.defaultOptions.previewTemplate.replace(/\n*/g, ""); - this.clickableElements = []; - this.listeners = []; - this.files = []; - if (typeof this.element === "string") { - this.element = document.querySelector(this.element); - } - if (!(this.element && (this.element.nodeType != null))) { - throw new Error("Invalid dropzone element."); - } - if (this.element.dropzone) { - throw new Error("Dropzone already attached."); - } - Dropzone.instances.push(this); - this.element.dropzone = this; - elementOptions = (_ref = Dropzone.optionsForElement(this.element)) != null ? _ref : {}; - this.options = extend({}, this.defaultOptions, elementOptions, options != null ? options : {}); - if (this.options.forceFallback || !Dropzone.isBrowserSupported()) { - return this.options.fallback.call(this); - } - if (this.options.url == null) { - this.options.url = this.element.getAttribute("action"); - } - if (!this.options.url) { - throw new Error("No URL provided."); - } - if (this.options.acceptedFiles && this.options.acceptedMimeTypes) { - throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated."); - } - if (this.options.acceptedMimeTypes) { - this.options.acceptedFiles = this.options.acceptedMimeTypes; - delete this.options.acceptedMimeTypes; - } - this.options.method = this.options.method.toUpperCase(); - if ((fallback = this.getExistingFallback()) && fallback.parentNode) { - fallback.parentNode.removeChild(fallback); - } - if (this.options.previewsContainer !== false) { - if (this.options.previewsContainer) { - this.previewsContainer = Dropzone.getElement(this.options.previewsContainer, "previewsContainer"); - } else { - this.previewsContainer = this.element; - } - } - if (this.options.clickable) { - if (this.options.clickable === true) { - this.clickableElements = [this.element]; - } else { - this.clickableElements = Dropzone.getElements(this.options.clickable, "clickable"); - } - } - this.init(); - } - - Dropzone.prototype.getAcceptedFiles = function() { - var file, _i, _len, _ref, _results; - _ref = this.files; - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - file = _ref[_i]; - if (file.accepted) { - _results.push(file); - } - } - return _results; - }; - - Dropzone.prototype.getRejectedFiles = function() { - var file, _i, _len, _ref, _results; - _ref = this.files; - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - file = _ref[_i]; - if (!file.accepted) { - _results.push(file); - } - } - return _results; - }; - - Dropzone.prototype.getFilesWithStatus = function(status) { - var file, _i, _len, _ref, _results; - _ref = this.files; - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - file = _ref[_i]; - if (file.status === status) { - _results.push(file); - } - } - return _results; - }; - - Dropzone.prototype.getQueuedFiles = function() { - return this.getFilesWithStatus(Dropzone.QUEUED); - }; - - Dropzone.prototype.getUploadingFiles = function() { - return this.getFilesWithStatus(Dropzone.UPLOADING); - }; - - Dropzone.prototype.getAddedFiles = function() { - return this.getFilesWithStatus(Dropzone.ADDED); - }; - - Dropzone.prototype.getActiveFiles = function() { - var file, _i, _len, _ref, _results; - _ref = this.files; - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - file = _ref[_i]; - if (file.status === Dropzone.UPLOADING || file.status === Dropzone.QUEUED) { - _results.push(file); - } - } - return _results; - }; - - Dropzone.prototype.init = function() { - var eventName, noPropagation, setupHiddenFileInput, _i, _len, _ref, _ref1; - if (this.element.tagName === "form") { - this.element.setAttribute("enctype", "multipart/form-data"); - } - if (this.element.classList.contains("dropzone") && !this.element.querySelector(".dz-message")) { - this.element.appendChild(Dropzone.createElement("
    " + this.options.dictDefaultMessage + "
    ")); - } - if (this.clickableElements.length) { - setupHiddenFileInput = (function(_this) { - return function() { - if (_this.hiddenFileInput) { - document.body.removeChild(_this.hiddenFileInput); - } - _this.hiddenFileInput = document.createElement("input"); - _this.hiddenFileInput.setAttribute("type", "file"); - if ((_this.options.maxFiles == null) || _this.options.maxFiles > 1) { - _this.hiddenFileInput.setAttribute("multiple", "multiple"); - } - _this.hiddenFileInput.className = "dz-hidden-input"; - if (_this.options.acceptedFiles != null) { - _this.hiddenFileInput.setAttribute("accept", _this.options.acceptedFiles); - } - if (_this.options.capture != null) { - _this.hiddenFileInput.setAttribute("capture", _this.options.capture); - } - _this.hiddenFileInput.style.visibility = "hidden"; - _this.hiddenFileInput.style.position = "absolute"; - _this.hiddenFileInput.style.top = "0"; - _this.hiddenFileInput.style.left = "0"; - _this.hiddenFileInput.style.height = "0"; - _this.hiddenFileInput.style.width = "0"; - document.body.appendChild(_this.hiddenFileInput); - return _this.hiddenFileInput.addEventListener("change", function() { - var file, files, _i, _len; - files = _this.hiddenFileInput.files; - if (files.length) { - for (_i = 0, _len = files.length; _i < _len; _i++) { - file = files[_i]; - _this.addFile(file); - } - } - _this.emit("addedfiles", files); - return setupHiddenFileInput(); - }); - }; - })(this); - setupHiddenFileInput(); - } - this.URL = (_ref = window.URL) != null ? _ref : window.webkitURL; - _ref1 = this.events; - for (_i = 0, _len = _ref1.length; _i < _len; _i++) { - eventName = _ref1[_i]; - this.on(eventName, this.options[eventName]); - } - this.on("uploadprogress", (function(_this) { - return function() { - return _this.updateTotalUploadProgress(); - }; - })(this)); - this.on("removedfile", (function(_this) { - return function() { - return _this.updateTotalUploadProgress(); - }; - })(this)); - this.on("canceled", (function(_this) { - return function(file) { - return _this.emit("complete", file); - }; - })(this)); - this.on("complete", (function(_this) { - return function(file) { - if (_this.getAddedFiles().length === 0 && _this.getUploadingFiles().length === 0 && _this.getQueuedFiles().length === 0) { - return setTimeout((function() { - return _this.emit("queuecomplete"); - }), 0); - } - }; - })(this)); - noPropagation = function(e) { - e.stopPropagation(); - if (e.preventDefault) { - return e.preventDefault(); - } else { - return e.returnValue = false; - } - }; - this.listeners = [ - { - element: this.element, - events: { - "dragstart": (function(_this) { - return function(e) { - return _this.emit("dragstart", e); - }; - })(this), - "dragenter": (function(_this) { - return function(e) { - noPropagation(e); - return _this.emit("dragenter", e); - }; - })(this), - "dragover": (function(_this) { - return function(e) { - var efct; - try { - efct = e.dataTransfer.effectAllowed; - } catch (_error) {} - e.dataTransfer.dropEffect = 'move' === efct || 'linkMove' === efct ? 'move' : 'copy'; - noPropagation(e); - return _this.emit("dragover", e); - }; - })(this), - "dragleave": (function(_this) { - return function(e) { - return _this.emit("dragleave", e); - }; - })(this), - "drop": (function(_this) { - return function(e) { - noPropagation(e); - return _this.drop(e); - }; - })(this), - "dragend": (function(_this) { - return function(e) { - return _this.emit("dragend", e); - }; - })(this) - } - } - ]; - this.clickableElements.forEach((function(_this) { - return function(clickableElement) { - return _this.listeners.push({ - element: clickableElement, - events: { - "click": function(evt) { - if ((clickableElement !== _this.element) || (evt.target === _this.element || Dropzone.elementInside(evt.target, _this.element.querySelector(".dz-message")))) { - _this.hiddenFileInput.click(); - } - return true; - } - } - }); - }; - })(this)); - this.enable(); - return this.options.init.call(this); - }; - - Dropzone.prototype.destroy = function() { - var _ref; - this.disable(); - this.removeAllFiles(true); - if ((_ref = this.hiddenFileInput) != null ? _ref.parentNode : void 0) { - this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput); - this.hiddenFileInput = null; - } - delete this.element.dropzone; - return Dropzone.instances.splice(Dropzone.instances.indexOf(this), 1); - }; - - Dropzone.prototype.updateTotalUploadProgress = function() { - var activeFiles, file, totalBytes, totalBytesSent, totalUploadProgress, _i, _len, _ref; - totalBytesSent = 0; - totalBytes = 0; - activeFiles = this.getActiveFiles(); - if (activeFiles.length) { - _ref = this.getActiveFiles(); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - file = _ref[_i]; - totalBytesSent += file.upload.bytesSent; - totalBytes += file.upload.total; - } - totalUploadProgress = 100 * totalBytesSent / totalBytes; - } else { - totalUploadProgress = 100; - } - return this.emit("totaluploadprogress", totalUploadProgress, totalBytes, totalBytesSent); - }; - - Dropzone.prototype._getParamName = function(n) { - if (typeof this.options.paramName === "function") { - return this.options.paramName(n); - } else { - return "" + this.options.paramName + (this.options.uploadMultiple ? "[" + n + "]" : ""); - } - }; - - Dropzone.prototype.getFallbackForm = function() { - var existingFallback, fields, fieldsString, form; - if (existingFallback = this.getExistingFallback()) { - return existingFallback; - } - fieldsString = "
    "; - if (this.options.dictFallbackText) { - fieldsString += "

    " + this.options.dictFallbackText + "

    "; - } - fieldsString += "
    "; - fields = Dropzone.createElement(fieldsString); - if (this.element.tagName !== "FORM") { - form = Dropzone.createElement("
    "); - form.appendChild(fields); - } else { - this.element.setAttribute("enctype", "multipart/form-data"); - this.element.setAttribute("method", this.options.method); - } - return form != null ? form : fields; - }; - - Dropzone.prototype.getExistingFallback = function() { - var fallback, getFallback, tagName, _i, _len, _ref; - getFallback = function(elements) { - var el, _i, _len; - for (_i = 0, _len = elements.length; _i < _len; _i++) { - el = elements[_i]; - if (/(^| )fallback($| )/.test(el.className)) { - return el; - } - } - }; - _ref = ["div", "form"]; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - tagName = _ref[_i]; - if (fallback = getFallback(this.element.getElementsByTagName(tagName))) { - return fallback; - } - } - }; - - Dropzone.prototype.setupEventListeners = function() { - var elementListeners, event, listener, _i, _len, _ref, _results; - _ref = this.listeners; - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - elementListeners = _ref[_i]; - _results.push((function() { - var _ref1, _results1; - _ref1 = elementListeners.events; - _results1 = []; - for (event in _ref1) { - listener = _ref1[event]; - _results1.push(elementListeners.element.addEventListener(event, listener, false)); - } - return _results1; - })()); - } - return _results; - }; - - Dropzone.prototype.removeEventListeners = function() { - var elementListeners, event, listener, _i, _len, _ref, _results; - _ref = this.listeners; - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - elementListeners = _ref[_i]; - _results.push((function() { - var _ref1, _results1; - _ref1 = elementListeners.events; - _results1 = []; - for (event in _ref1) { - listener = _ref1[event]; - _results1.push(elementListeners.element.removeEventListener(event, listener, false)); - } - return _results1; - })()); - } - return _results; - }; - - Dropzone.prototype.disable = function() { - var file, _i, _len, _ref, _results; - this.clickableElements.forEach(function(element) { - return element.classList.remove("dz-clickable"); - }); - this.removeEventListeners(); - _ref = this.files; - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - file = _ref[_i]; - _results.push(this.cancelUpload(file)); - } - return _results; - }; - - Dropzone.prototype.enable = function() { - this.clickableElements.forEach(function(element) { - return element.classList.add("dz-clickable"); - }); - return this.setupEventListeners(); - }; - - Dropzone.prototype.filesize = function(size) { - var cutoff, i, selectedSize, selectedUnit, unit, units, _i, _len; - selectedSize = 0; - selectedUnit = "b"; - if (size > 0) { - units = ['TB', 'GB', 'MB', 'KB', 'b']; - for (i = _i = 0, _len = units.length; _i < _len; i = ++_i) { - unit = units[i]; - cutoff = Math.pow(this.options.filesizeBase, 4 - i) / 10; - if (size >= cutoff) { - selectedSize = size / Math.pow(this.options.filesizeBase, 4 - i); - selectedUnit = unit; - break; - } - } - selectedSize = Math.round(10 * selectedSize) / 10; - } - return "" + selectedSize + " " + selectedUnit; - }; - - Dropzone.prototype._updateMaxFilesReachedClass = function() { - if ((this.options.maxFiles != null) && this.getAcceptedFiles().length >= this.options.maxFiles) { - if (this.getAcceptedFiles().length === this.options.maxFiles) { - this.emit('maxfilesreached', this.files); - } - return this.element.classList.add("dz-max-files-reached"); - } else { - return this.element.classList.remove("dz-max-files-reached"); - } - }; - - Dropzone.prototype.drop = function(e) { - var files, items; - if (!e.dataTransfer) { - return; - } - this.emit("drop", e); - files = e.dataTransfer.files; - this.emit("addedfiles", files); - if (files.length) { - items = e.dataTransfer.items; - if (items && items.length && (items[0].webkitGetAsEntry != null)) { - this._addFilesFromItems(items); - } else { - this.handleFiles(files); - } - } - }; - - Dropzone.prototype.paste = function(e) { - var items, _ref; - if ((e != null ? (_ref = e.clipboardData) != null ? _ref.items : void 0 : void 0) == null) { - return; - } - this.emit("paste", e); - items = e.clipboardData.items; - if (items.length) { - return this._addFilesFromItems(items); - } - }; - - Dropzone.prototype.handleFiles = function(files) { - var file, _i, _len, _results; - _results = []; - for (_i = 0, _len = files.length; _i < _len; _i++) { - file = files[_i]; - _results.push(this.addFile(file)); - } - return _results; - }; - - Dropzone.prototype._addFilesFromItems = function(items) { - var entry, item, _i, _len, _results; - _results = []; - for (_i = 0, _len = items.length; _i < _len; _i++) { - item = items[_i]; - if ((item.webkitGetAsEntry != null) && (entry = item.webkitGetAsEntry())) { - if (entry.isFile) { - _results.push(this.addFile(item.getAsFile())); - } else if (entry.isDirectory) { - _results.push(this._addFilesFromDirectory(entry, entry.name)); - } else { - _results.push(void 0); - } - } else if (item.getAsFile != null) { - if ((item.kind == null) || item.kind === "file") { - _results.push(this.addFile(item.getAsFile())); - } else { - _results.push(void 0); - } - } else { - _results.push(void 0); - } - } - return _results; - }; - - Dropzone.prototype._addFilesFromDirectory = function(directory, path) { - var dirReader, entriesReader; - dirReader = directory.createReader(); - entriesReader = (function(_this) { - return function(entries) { - var entry, _i, _len; - for (_i = 0, _len = entries.length; _i < _len; _i++) { - entry = entries[_i]; - if (entry.isFile) { - entry.file(function(file) { - if (_this.options.ignoreHiddenFiles && file.name.substring(0, 1) === '.') { - return; - } - file.fullPath = "" + path + "/" + file.name; - return _this.addFile(file); - }); - } else if (entry.isDirectory) { - _this._addFilesFromDirectory(entry, "" + path + "/" + entry.name); - } - } - }; - })(this); - return dirReader.readEntries(entriesReader, function(error) { - return typeof console !== "undefined" && console !== null ? typeof console.log === "function" ? console.log(error) : void 0 : void 0; - }); - }; - - Dropzone.prototype.accept = function(file, done) { - if (file.size > this.options.maxFilesize * 1024 * 1024) { - return done(this.options.dictFileTooBig.replace("{{filesize}}", Math.round(file.size / 1024 / 10.24) / 100).replace("{{maxFilesize}}", this.options.maxFilesize)); - } else if (!Dropzone.isValidFile(file, this.options.acceptedFiles)) { - return done(this.options.dictInvalidFileType); - } else if ((this.options.maxFiles != null) && this.getAcceptedFiles().length >= this.options.maxFiles) { - done(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}", this.options.maxFiles)); - return this.emit("maxfilesexceeded", file); - } else { - return this.options.accept.call(this, file, done); - } - }; - - Dropzone.prototype.addFile = function(file) { - file.upload = { - progress: 0, - total: file.size, - bytesSent: 0 - }; - this.files.push(file); - file.status = Dropzone.ADDED; - this.emit("addedfile", file); - this._enqueueThumbnail(file); - return this.accept(file, (function(_this) { - return function(error) { - if (error) { - file.accepted = false; - _this._errorProcessing([file], error); - } else { - file.accepted = true; - if (_this.options.autoQueue) { - _this.enqueueFile(file); - } - } - return _this._updateMaxFilesReachedClass(); - }; - })(this)); - }; - - Dropzone.prototype.enqueueFiles = function(files) { - var file, _i, _len; - for (_i = 0, _len = files.length; _i < _len; _i++) { - file = files[_i]; - this.enqueueFile(file); - } - return null; - }; - - Dropzone.prototype.enqueueFile = function(file) { - if (file.status === Dropzone.ADDED && file.accepted === true) { - file.status = Dropzone.QUEUED; - if (this.options.autoProcessQueue) { - return setTimeout(((function(_this) { - return function() { - return _this.processQueue(); - }; - })(this)), 0); - } - } else { - throw new Error("This file can't be queued because it has already been processed or was rejected."); - } - }; - - Dropzone.prototype._thumbnailQueue = []; - - Dropzone.prototype._processingThumbnail = false; - - Dropzone.prototype._enqueueThumbnail = function(file) { - if (this.options.createImageThumbnails && file.type.match(/image.*/) && file.size <= this.options.maxThumbnailFilesize * 1024 * 1024) { - this._thumbnailQueue.push(file); - return setTimeout(((function(_this) { - return function() { - return _this._processThumbnailQueue(); - }; - })(this)), 0); - } - }; - - Dropzone.prototype._processThumbnailQueue = function() { - if (this._processingThumbnail || this._thumbnailQueue.length === 0) { - return; - } - this._processingThumbnail = true; - return this.createThumbnail(this._thumbnailQueue.shift(), (function(_this) { - return function() { - _this._processingThumbnail = false; - return _this._processThumbnailQueue(); - }; - })(this)); - }; - - Dropzone.prototype.removeFile = function(file) { - if (file.status === Dropzone.UPLOADING) { - this.cancelUpload(file); - } - this.files = without(this.files, file); - this.emit("removedfile", file); - if (this.files.length === 0) { - return this.emit("reset"); - } - }; - - Dropzone.prototype.removeAllFiles = function(cancelIfNecessary) { - var file, _i, _len, _ref; - if (cancelIfNecessary == null) { - cancelIfNecessary = false; - } - _ref = this.files.slice(); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - file = _ref[_i]; - if (file.status !== Dropzone.UPLOADING || cancelIfNecessary) { - this.removeFile(file); - } - } - return null; - }; - - Dropzone.prototype.createThumbnail = function(file, callback) { - var fileReader; - fileReader = new FileReader; - fileReader.onload = (function(_this) { - return function() { - if (file.type === "image/svg+xml") { - _this.emit("thumbnail", file, fileReader.result); - if (callback != null) { - callback(); - } - return; - } - return _this.createThumbnailFromUrl(file, fileReader.result, callback); - }; - })(this); - return fileReader.readAsDataURL(file); - }; - - Dropzone.prototype.createThumbnailFromUrl = function(file, imageUrl, callback) { - var img; - img = document.createElement("img"); - img.onload = (function(_this) { - return function() { - var canvas, ctx, resizeInfo, thumbnail, _ref, _ref1, _ref2, _ref3; - file.width = img.width; - file.height = img.height; - resizeInfo = _this.options.resize.call(_this, file); - if (resizeInfo.trgWidth == null) { - resizeInfo.trgWidth = resizeInfo.optWidth; - } - if (resizeInfo.trgHeight == null) { - resizeInfo.trgHeight = resizeInfo.optHeight; - } - canvas = document.createElement("canvas"); - ctx = canvas.getContext("2d"); - canvas.width = resizeInfo.trgWidth; - canvas.height = resizeInfo.trgHeight; - drawImageIOSFix(ctx, img, (_ref = resizeInfo.srcX) != null ? _ref : 0, (_ref1 = resizeInfo.srcY) != null ? _ref1 : 0, resizeInfo.srcWidth, resizeInfo.srcHeight, (_ref2 = resizeInfo.trgX) != null ? _ref2 : 0, (_ref3 = resizeInfo.trgY) != null ? _ref3 : 0, resizeInfo.trgWidth, resizeInfo.trgHeight); - thumbnail = canvas.toDataURL("image/png"); - _this.emit("thumbnail", file, thumbnail); - if (callback != null) { - return callback(); - } - }; - })(this); - if (callback != null) { - img.onerror = callback; - } - return img.src = imageUrl; - }; - - Dropzone.prototype.processQueue = function() { - var i, parallelUploads, processingLength, queuedFiles; - parallelUploads = this.options.parallelUploads; - processingLength = this.getUploadingFiles().length; - i = processingLength; - if (processingLength >= parallelUploads) { - return; - } - queuedFiles = this.getQueuedFiles(); - if (!(queuedFiles.length > 0)) { - return; - } - if (this.options.uploadMultiple) { - return this.processFiles(queuedFiles.slice(0, parallelUploads - processingLength)); - } else { - while (i < parallelUploads) { - if (!queuedFiles.length) { - return; - } - this.processFile(queuedFiles.shift()); - i++; - } - } - }; - - Dropzone.prototype.processFile = function(file) { - return this.processFiles([file]); - }; - - Dropzone.prototype.processFiles = function(files) { - var file, _i, _len; - for (_i = 0, _len = files.length; _i < _len; _i++) { - file = files[_i]; - file.processing = true; - file.status = Dropzone.UPLOADING; - this.emit("processing", file); - } - if (this.options.uploadMultiple) { - this.emit("processingmultiple", files); - } - return this.uploadFiles(files); - }; - - Dropzone.prototype._getFilesWithXhr = function(xhr) { - var file, files; - return files = (function() { - var _i, _len, _ref, _results; - _ref = this.files; - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - file = _ref[_i]; - if (file.xhr === xhr) { - _results.push(file); - } - } - return _results; - }).call(this); - }; - - Dropzone.prototype.cancelUpload = function(file) { - var groupedFile, groupedFiles, _i, _j, _len, _len1, _ref; - if (file.status === Dropzone.UPLOADING) { - groupedFiles = this._getFilesWithXhr(file.xhr); - for (_i = 0, _len = groupedFiles.length; _i < _len; _i++) { - groupedFile = groupedFiles[_i]; - groupedFile.status = Dropzone.CANCELED; - } - file.xhr.abort(); - for (_j = 0, _len1 = groupedFiles.length; _j < _len1; _j++) { - groupedFile = groupedFiles[_j]; - this.emit("canceled", groupedFile); - } - if (this.options.uploadMultiple) { - this.emit("canceledmultiple", groupedFiles); - } - } else if ((_ref = file.status) === Dropzone.ADDED || _ref === Dropzone.QUEUED) { - file.status = Dropzone.CANCELED; - this.emit("canceled", file); - if (this.options.uploadMultiple) { - this.emit("canceledmultiple", [file]); - } - } - if (this.options.autoProcessQueue) { - return this.processQueue(); - } - }; - - resolveOption = function() { - var args, option; - option = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : []; - if (typeof option === 'function') { - return option.apply(this, args); - } - return option; - }; - - Dropzone.prototype.uploadFile = function(file) { - return this.uploadFiles([file]); - }; - - Dropzone.prototype.uploadFiles = function(files) { - var file, formData, handleError, headerName, headerValue, headers, i, input, inputName, inputType, key, method, option, progressObj, response, updateProgress, url, value, xhr, _i, _j, _k, _l, _len, _len1, _len2, _len3, _m, _ref, _ref1, _ref2, _ref3, _ref4, _ref5; - xhr = new XMLHttpRequest(); - for (_i = 0, _len = files.length; _i < _len; _i++) { - file = files[_i]; - file.xhr = xhr; - } - method = resolveOption(this.options.method, files); - url = resolveOption(this.options.url, files); - xhr.open(method, url, true); - xhr.withCredentials = !!this.options.withCredentials; - response = null; - handleError = (function(_this) { - return function() { - var _j, _len1, _results; - _results = []; - for (_j = 0, _len1 = files.length; _j < _len1; _j++) { - file = files[_j]; - _results.push(_this._errorProcessing(files, response || _this.options.dictResponseError.replace("{{statusCode}}", xhr.status), xhr)); - } - return _results; - }; - })(this); - updateProgress = (function(_this) { - return function(e) { - var allFilesFinished, progress, _j, _k, _l, _len1, _len2, _len3, _results; - if (e != null) { - progress = 100 * e.loaded / e.total; - for (_j = 0, _len1 = files.length; _j < _len1; _j++) { - file = files[_j]; - file.upload = { - progress: progress, - total: e.total, - bytesSent: e.loaded - }; - } - } else { - allFilesFinished = true; - progress = 100; - for (_k = 0, _len2 = files.length; _k < _len2; _k++) { - file = files[_k]; - if (!(file.upload.progress === 100 && file.upload.bytesSent === file.upload.total)) { - allFilesFinished = false; - } - file.upload.progress = progress; - file.upload.bytesSent = file.upload.total; - } - if (allFilesFinished) { - return; - } - } - _results = []; - for (_l = 0, _len3 = files.length; _l < _len3; _l++) { - file = files[_l]; - _results.push(_this.emit("uploadprogress", file, progress, file.upload.bytesSent)); - } - return _results; - }; - })(this); - xhr.onload = (function(_this) { - return function(e) { - var _ref; - if (files[0].status === Dropzone.CANCELED) { - return; - } - if (xhr.readyState !== 4) { - return; - } - response = xhr.responseText; - if (xhr.getResponseHeader("content-type") && ~xhr.getResponseHeader("content-type").indexOf("application/json")) { - try { - response = JSON.parse(response); - } catch (_error) { - e = _error; - response = "Invalid JSON response from server."; - } - } - updateProgress(); - if (!((200 <= (_ref = xhr.status) && _ref < 300))) { - return handleError(); - } else { - return _this._finished(files, response, e); - } - }; - })(this); - xhr.onerror = (function(_this) { - return function() { - if (files[0].status === Dropzone.CANCELED) { - return; - } - return handleError(); - }; - })(this); - progressObj = (_ref = xhr.upload) != null ? _ref : xhr; - progressObj.onprogress = updateProgress; - headers = { - "Accept": "application/json", - "Cache-Control": "no-cache", - "X-Requested-With": "XMLHttpRequest" - }; - if (this.options.headers) { - extend(headers, this.options.headers); - } - for (headerName in headers) { - headerValue = headers[headerName]; - if (headerValue) { - xhr.setRequestHeader(headerName, headerValue); - } - } - formData = new FormData(); - if (this.options.params) { - _ref1 = this.options.params; - for (key in _ref1) { - value = _ref1[key]; - formData.append(key, value); - } - } - for (_j = 0, _len1 = files.length; _j < _len1; _j++) { - file = files[_j]; - this.emit("sending", file, xhr, formData); - } - if (this.options.uploadMultiple) { - this.emit("sendingmultiple", files, xhr, formData); - } - if (this.element.tagName === "FORM") { - _ref2 = this.element.querySelectorAll("input, textarea, select, button"); - for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) { - input = _ref2[_k]; - inputName = input.getAttribute("name"); - inputType = input.getAttribute("type"); - if (input.tagName === "SELECT" && input.hasAttribute("multiple")) { - _ref3 = input.options; - for (_l = 0, _len3 = _ref3.length; _l < _len3; _l++) { - option = _ref3[_l]; - if (option.selected) { - formData.append(inputName, option.value); - } - } - } else if (!inputType || ((_ref4 = inputType.toLowerCase()) !== "checkbox" && _ref4 !== "radio") || input.checked) { - formData.append(inputName, input.value); - } - } - } - for (i = _m = 0, _ref5 = files.length - 1; 0 <= _ref5 ? _m <= _ref5 : _m >= _ref5; i = 0 <= _ref5 ? ++_m : --_m) { - formData.append(this._getParamName(i), files[i], files[i].name); - } - return this.submitRequest(xhr, formData, files); - }; - - Dropzone.prototype.submitRequest = function(xhr, formData, files) { - return xhr.send(formData); - }; - - Dropzone.prototype._finished = function(files, responseText, e) { - var file, _i, _len; - for (_i = 0, _len = files.length; _i < _len; _i++) { - file = files[_i]; - file.status = Dropzone.SUCCESS; - this.emit("success", file, responseText, e); - this.emit("complete", file); - } - if (this.options.uploadMultiple) { - this.emit("successmultiple", files, responseText, e); - this.emit("completemultiple", files); - } - if (this.options.autoProcessQueue) { - return this.processQueue(); - } - }; - - Dropzone.prototype._errorProcessing = function(files, message, xhr) { - var file, _i, _len; - for (_i = 0, _len = files.length; _i < _len; _i++) { - file = files[_i]; - file.status = Dropzone.ERROR; - this.emit("error", file, message, xhr); - this.emit("complete", file); - } - if (this.options.uploadMultiple) { - this.emit("errormultiple", files, message, xhr); - this.emit("completemultiple", files); - } - if (this.options.autoProcessQueue) { - return this.processQueue(); - } - }; - - return Dropzone; - - })(Emitter); - - Dropzone.version = "4.1.0"; - - Dropzone.options = {}; - - Dropzone.optionsForElement = function(element) { - if (element.getAttribute("id")) { - return Dropzone.options[camelize(element.getAttribute("id"))]; - } else { - return void 0; - } - }; - - Dropzone.instances = []; - - Dropzone.forElement = function(element) { - if (typeof element === "string") { - element = document.querySelector(element); - } - if ((element != null ? element.dropzone : void 0) == null) { - throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone."); - } - return element.dropzone; - }; - - Dropzone.autoDiscover = true; - - Dropzone.discover = function() { - var checkElements, dropzone, dropzones, _i, _len, _results; - if (document.querySelectorAll) { - dropzones = document.querySelectorAll(".dropzone"); - } else { - dropzones = []; - checkElements = function(elements) { - var el, _i, _len, _results; - _results = []; - for (_i = 0, _len = elements.length; _i < _len; _i++) { - el = elements[_i]; - if (/(^| )dropzone($| )/.test(el.className)) { - _results.push(dropzones.push(el)); - } else { - _results.push(void 0); - } - } - return _results; - }; - checkElements(document.getElementsByTagName("div")); - checkElements(document.getElementsByTagName("form")); - } - _results = []; - for (_i = 0, _len = dropzones.length; _i < _len; _i++) { - dropzone = dropzones[_i]; - if (Dropzone.optionsForElement(dropzone) !== false) { - _results.push(new Dropzone(dropzone)); - } else { - _results.push(void 0); - } - } - return _results; - }; - - Dropzone.blacklistedBrowsers = [/opera.*Macintosh.*version\/12/i]; - - Dropzone.isBrowserSupported = function() { - var capableBrowser, regex, _i, _len, _ref; - capableBrowser = true; - if (window.File && window.FileReader && window.FileList && window.Blob && window.FormData && document.querySelector) { - if (!("classList" in document.createElement("a"))) { - capableBrowser = false; - } else { - _ref = Dropzone.blacklistedBrowsers; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - regex = _ref[_i]; - if (regex.test(navigator.userAgent)) { - capableBrowser = false; - continue; - } - } - } - } else { - capableBrowser = false; - } - return capableBrowser; - }; - - without = function(list, rejectedItem) { - var item, _i, _len, _results; - _results = []; - for (_i = 0, _len = list.length; _i < _len; _i++) { - item = list[_i]; - if (item !== rejectedItem) { - _results.push(item); - } - } - return _results; - }; - - camelize = function(str) { - return str.replace(/[\-_](\w)/g, function(match) { - return match.charAt(1).toUpperCase(); - }); - }; - - Dropzone.createElement = function(string) { - var div; - div = document.createElement("div"); - div.innerHTML = string; - return div.childNodes[0]; - }; - - Dropzone.elementInside = function(element, container) { - if (element === container) { - return true; - } - while (element = element.parentNode) { - if (element === container) { - return true; - } - } - return false; - }; - - Dropzone.getElement = function(el, name) { - var element; - if (typeof el === "string") { - element = document.querySelector(el); - } else if (el.nodeType != null) { - element = el; - } - if (element == null) { - throw new Error("Invalid `" + name + "` option provided. Please provide a CSS selector or a plain HTML element."); - } - return element; - }; - - Dropzone.getElements = function(els, name) { - var e, el, elements, _i, _j, _len, _len1, _ref; - if (els instanceof Array) { - elements = []; - try { - for (_i = 0, _len = els.length; _i < _len; _i++) { - el = els[_i]; - elements.push(this.getElement(el, name)); - } - } catch (_error) { - e = _error; - elements = null; - } - } else if (typeof els === "string") { - elements = []; - _ref = document.querySelectorAll(els); - for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) { - el = _ref[_j]; - elements.push(el); - } - } else if (els.nodeType != null) { - elements = [els]; - } - if (!((elements != null) && elements.length)) { - throw new Error("Invalid `" + name + "` option provided. Please provide a CSS selector, a plain HTML element or a list of those."); - } - return elements; - }; - - Dropzone.confirm = function(question, accepted, rejected) { - if (window.confirm(question)) { - return accepted(); - } else if (rejected != null) { - return rejected(); - } - }; - - Dropzone.isValidFile = function(file, acceptedFiles) { - var baseMimeType, mimeType, validType, _i, _len; - if (!acceptedFiles) { - return true; - } - acceptedFiles = acceptedFiles.split(","); - mimeType = file.type; - baseMimeType = mimeType.replace(/\/.*$/, ""); - for (_i = 0, _len = acceptedFiles.length; _i < _len; _i++) { - validType = acceptedFiles[_i]; - validType = validType.trim(); - if (validType.charAt(0) === ".") { - if (file.name.toLowerCase().indexOf(validType.toLowerCase(), file.name.length - validType.length) !== -1) { - return true; - } - } else if (/\/\*$/.test(validType)) { - if (baseMimeType === validType.replace(/\/.*$/, "")) { - return true; - } - } else { - if (mimeType === validType) { - return true; - } - } - } - return false; - }; - - if (typeof jQuery !== "undefined" && jQuery !== null) { - jQuery.fn.dropzone = function(options) { - return this.each(function() { - return new Dropzone(this, options); - }); - }; - } - - if (typeof module !== "undefined" && module !== null) { - module.exports = Dropzone; - } else { - window.Dropzone = Dropzone; - } - - Dropzone.ADDED = "added"; - - Dropzone.QUEUED = "queued"; - - Dropzone.ACCEPTED = Dropzone.QUEUED; - - Dropzone.UPLOADING = "uploading"; - - Dropzone.PROCESSING = Dropzone.UPLOADING; - - Dropzone.CANCELED = "canceled"; - - Dropzone.ERROR = "error"; - - Dropzone.SUCCESS = "success"; - - - /* - - Bugfix for iOS 6 and 7 - Source: http://stackoverflow.com/questions/11929099/html5-canvas-drawimage-ratio-bug-ios - based on the work of https://github.com/stomita/ios-imagefile-megapixel - */ - - detectVerticalSquash = function(img) { - var alpha, canvas, ctx, data, ey, ih, iw, py, ratio, sy; - iw = img.naturalWidth; - ih = img.naturalHeight; - canvas = document.createElement("canvas"); - canvas.width = 1; - canvas.height = ih; - ctx = canvas.getContext("2d"); - ctx.drawImage(img, 0, 0); - data = ctx.getImageData(0, 0, 1, ih).data; - sy = 0; - ey = ih; - py = ih; - while (py > sy) { - alpha = data[(py - 1) * 4 + 3]; - if (alpha === 0) { - ey = py; - } else { - sy = py; - } - py = (ey + sy) >> 1; - } - ratio = py / ih; - if (ratio === 0) { - return 1; - } else { - return ratio; - } - }; - - drawImageIOSFix = function(ctx, img, sx, sy, sw, sh, dx, dy, dw, dh) { - var vertSquashRatio; - vertSquashRatio = detectVerticalSquash(img); - return ctx.drawImage(img, sx, sy, sw, sh, dx, dy, dw, dh / vertSquashRatio); - }; - - - /* - * contentloaded.js - * - * Author: Diego Perini (diego.perini at gmail.com) - * Summary: cross-browser wrapper for DOMContentLoaded - * Updated: 20101020 - * License: MIT - * Version: 1.2 - * - * URL: - * http://javascript.nwbox.com/ContentLoaded/ - * http://javascript.nwbox.com/ContentLoaded/MIT-LICENSE - */ - - contentLoaded = function(win, fn) { - var add, doc, done, init, poll, pre, rem, root, top; - done = false; - top = true; - doc = win.document; - root = doc.documentElement; - add = (doc.addEventListener ? "addEventListener" : "attachEvent"); - rem = (doc.addEventListener ? "removeEventListener" : "detachEvent"); - pre = (doc.addEventListener ? "" : "on"); - init = function(e) { - if (e.type === "readystatechange" && doc.readyState !== "complete") { - return; - } - (e.type === "load" ? win : doc)[rem](pre + e.type, init, false); - if (!done && (done = true)) { - return fn.call(win, e.type || e); - } - }; - poll = function() { - var e; - try { - root.doScroll("left"); - } catch (_error) { - e = _error; - setTimeout(poll, 50); - return; - } - return init("poll"); - }; - if (doc.readyState !== "complete") { - if (doc.createEventObject && root.doScroll) { - try { - top = !win.frameElement; - } catch (_error) {} - if (top) { - poll(); - } - } - doc[add](pre + "DOMContentLoaded", init, false); - doc[add](pre + "readystatechange", init, false); - return win[add](pre + "load", init, false); - } - }; - - Dropzone._autoDiscoverFunction = function() { - if (Dropzone.autoDiscover) { - return Dropzone.discover(); - } - }; - - contentLoaded(window, Dropzone._autoDiscoverFunction); - -}).call(this); + +/* + * + * More info at [www.dropzonejs.com](http://www.dropzonejs.com) + * + * Copyright (c) 2012, Matias Meno + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + */ + +(function() { + var Dropzone, Emitter, camelize, contentLoaded, detectVerticalSquash, drawImageIOSFix, noop, without, + __slice = [].slice, + __hasProp = {}.hasOwnProperty, + __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; + + noop = function() {}; + + Emitter = (function() { + function Emitter() {} + + Emitter.prototype.addEventListener = Emitter.prototype.on; + + Emitter.prototype.on = function(event, fn) { + this._callbacks = this._callbacks || {}; + if (!this._callbacks[event]) { + this._callbacks[event] = []; + } + this._callbacks[event].push(fn); + return this; + }; + + Emitter.prototype.emit = function() { + var args, callback, callbacks, event, _i, _len; + event = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : []; + this._callbacks = this._callbacks || {}; + callbacks = this._callbacks[event]; + if (callbacks) { + for (_i = 0, _len = callbacks.length; _i < _len; _i++) { + callback = callbacks[_i]; + callback.apply(this, args); + } + } + return this; + }; + + Emitter.prototype.removeListener = Emitter.prototype.off; + + Emitter.prototype.removeAllListeners = Emitter.prototype.off; + + Emitter.prototype.removeEventListener = Emitter.prototype.off; + + Emitter.prototype.off = function(event, fn) { + var callback, callbacks, i, _i, _len; + if (!this._callbacks || arguments.length === 0) { + this._callbacks = {}; + return this; + } + callbacks = this._callbacks[event]; + if (!callbacks) { + return this; + } + if (arguments.length === 1) { + delete this._callbacks[event]; + return this; + } + for (i = _i = 0, _len = callbacks.length; _i < _len; i = ++_i) { + callback = callbacks[i]; + if (callback === fn) { + callbacks.splice(i, 1); + break; + } + } + return this; + }; + + return Emitter; + + })(); + + Dropzone = (function(_super) { + var extend, resolveOption; + + __extends(Dropzone, _super); + + Dropzone.prototype.Emitter = Emitter; + + + /* + This is a list of all available events you can register on a dropzone object. + + You can register an event handler like this: + + 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.defaultOptions = { + url: null, + method: "post", + withCredentials: false, + parallelUploads: 2, + uploadMultiple: false, + maxFilesize: 256, + paramName: "file", + createImageThumbnails: true, + maxThumbnailFilesize: 10, + thumbnailWidth: 120, + thumbnailHeight: 120, + filesizeBase: 1000, + maxFiles: null, + params: {}, + clickable: true, + ignoreHiddenFiles: true, + acceptedFiles: null, + acceptedMimeTypes: null, + autoProcessQueue: true, + autoQueue: true, + addRemoveLinks: false, + previewsContainer: null, + capture: null, + dictDefaultMessage: "Drop files here to upload", + dictFallbackMessage: "Your browser does not support drag'n'drop file uploads.", + dictFallbackText: "Please use the fallback form below to upload your files like in the olden days.", + dictFileTooBig: "File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.", + dictInvalidFileType: "You can't upload files of this type.", + dictResponseError: "Server responded with {{statusCode}} code.", + dictCancelUpload: "Cancel upload", + dictCancelUploadConfirmation: "Are you sure you want to cancel this upload?", + dictRemoveFile: "Remove file", + dictRemoveFileConfirmation: null, + dictMaxFilesExceeded: "You can not upload any more files.", + accept: function(file, done) { + return done(); + }, + init: function() { + return noop; + }, + forceFallback: false, + fallback: function() { + var child, messageElement, span, _i, _len, _ref; + this.element.className = "" + this.element.className + " dz-browser-not-supported"; + _ref = this.element.getElementsByTagName("div"); + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (/(^| )dz-message($| )/.test(child.className)) { + messageElement = child; + child.className = "dz-message"; + continue; + } + } + if (!messageElement) { + messageElement = Dropzone.createElement("
    "); + this.element.appendChild(messageElement); + } + span = messageElement.getElementsByTagName("span")[0]; + if (span) { + if (span.textContent != null) { + span.textContent = this.options.dictFallbackMessage; + } else if (span.innerText != null) { + span.innerText = this.options.dictFallbackMessage; + } + } + return this.element.appendChild(this.getFallbackForm()); + }, + resize: function(file) { + var info, srcRatio, trgRatio; + info = { + srcX: 0, + srcY: 0, + srcWidth: file.width, + srcHeight: file.height + }; + srcRatio = file.width / file.height; + info.optWidth = this.options.thumbnailWidth; + info.optHeight = this.options.thumbnailHeight; + if ((info.optWidth == null) && (info.optHeight == null)) { + info.optWidth = info.srcWidth; + info.optHeight = info.srcHeight; + } else if (info.optWidth == null) { + info.optWidth = srcRatio * info.optHeight; + } else if (info.optHeight == null) { + info.optHeight = (1 / srcRatio) * info.optWidth; + } + trgRatio = info.optWidth / info.optHeight; + if (file.height < info.optHeight || file.width < info.optWidth) { + info.trgHeight = info.srcHeight; + info.trgWidth = info.srcWidth; + } else { + if (srcRatio > trgRatio) { + info.srcHeight = file.height; + info.srcWidth = info.srcHeight * trgRatio; + } else { + info.srcWidth = file.width; + info.srcHeight = info.srcWidth / trgRatio; + } + } + info.srcX = (file.width - info.srcWidth) / 2; + info.srcY = (file.height - info.srcHeight) / 2; + return info; + }, + + /* + Those functions register themselves to the events on init and handle all + the user interface specific stuff. Overwriting them won't break the upload + but can break the way it's displayed. + You can overwrite them if you don't like the default behavior. If you just + want to add an additional event handler, register it on the dropzone object + and don't overwrite those options. + */ + drop: function(e) { + return this.element.classList.remove("dz-drag-hover"); + }, + dragstart: noop, + dragend: function(e) { + return this.element.classList.remove("dz-drag-hover"); + }, + dragenter: function(e) { + return this.element.classList.add("dz-drag-hover"); + }, + dragover: function(e) { + return this.element.classList.add("dz-drag-hover"); + }, + dragleave: function(e) { + return this.element.classList.remove("dz-drag-hover"); + }, + paste: noop, + reset: function() { + return this.element.classList.remove("dz-started"); + }, + addedfile: function(file) { + var node, removeFileEvent, removeLink, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _results; + if (this.element === this.previewsContainer) { + this.element.classList.add("dz-started"); + } + if (this.previewsContainer) { + file.previewElement = Dropzone.createElement(this.options.previewTemplate.trim()); + file.previewTemplate = file.previewElement; + this.previewsContainer.appendChild(file.previewElement); + _ref = file.previewElement.querySelectorAll("[data-dz-name]"); + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + node = _ref[_i]; + node.textContent = file.name; + } + _ref1 = file.previewElement.querySelectorAll("[data-dz-size]"); + for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { + node = _ref1[_j]; + node.innerHTML = this.filesize(file.size); + } + if (this.options.addRemoveLinks) { + file._removeLink = Dropzone.createElement("" + this.options.dictRemoveFile + ""); + file.previewElement.appendChild(file._removeLink); + } + removeFileEvent = (function(_this) { + return function(e) { + e.preventDefault(); + e.stopPropagation(); + if (file.status === Dropzone.UPLOADING) { + return Dropzone.confirm(_this.options.dictCancelUploadConfirmation, function() { + return _this.removeFile(file); + }); + } else { + if (_this.options.dictRemoveFileConfirmation) { + return Dropzone.confirm(_this.options.dictRemoveFileConfirmation, function() { + return _this.removeFile(file); + }); + } else { + return _this.removeFile(file); + } + } + }; + })(this); + _ref2 = file.previewElement.querySelectorAll("[data-dz-remove]"); + _results = []; + for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) { + removeLink = _ref2[_k]; + _results.push(removeLink.addEventListener("click", removeFileEvent)); + } + return _results; + } + }, + removedfile: function(file) { + var _ref; + if (file.previewElement) { + if ((_ref = file.previewElement) != null) { + _ref.parentNode.removeChild(file.previewElement); + } + } + return this._updateMaxFilesReachedClass(); + }, + thumbnail: function(file, dataUrl) { + var thumbnailElement, _i, _len, _ref; + if (file.previewElement) { + file.previewElement.classList.remove("dz-file-preview"); + _ref = file.previewElement.querySelectorAll("[data-dz-thumbnail]"); + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + thumbnailElement = _ref[_i]; + thumbnailElement.alt = file.name; + thumbnailElement.src = dataUrl; + } + return setTimeout(((function(_this) { + return function() { + return file.previewElement.classList.add("dz-image-preview"); + }; + })(this)), 1); + } + }, + error: function(file, message) { + var node, _i, _len, _ref, _results; + if (file.previewElement) { + file.previewElement.classList.add("dz-error"); + if (typeof message !== "String" && message.error) { + message = message.error; + } + _ref = file.previewElement.querySelectorAll("[data-dz-errormessage]"); + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + node = _ref[_i]; + _results.push(node.textContent = message); + } + return _results; + } + }, + errormultiple: noop, + processing: function(file) { + if (file.previewElement) { + file.previewElement.classList.add("dz-processing"); + if (file._removeLink) { + return file._removeLink.textContent = this.options.dictCancelUpload; + } + } + }, + processingmultiple: noop, + uploadprogress: function(file, progress, bytesSent) { + var node, _i, _len, _ref, _results; + if (file.previewElement) { + _ref = file.previewElement.querySelectorAll("[data-dz-uploadprogress]"); + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + node = _ref[_i]; + if (node.nodeName === 'PROGRESS') { + _results.push(node.value = progress); + } else { + _results.push(node.style.width = "" + progress + "%"); + } + } + return _results; + } + }, + totaluploadprogress: noop, + sending: noop, + sendingmultiple: noop, + success: function(file) { + if (file.previewElement) { + return file.previewElement.classList.add("dz-success"); + } + }, + successmultiple: noop, + canceled: function(file) { + return this.emit("error", file, "Upload canceled."); + }, + canceledmultiple: noop, + complete: function(file) { + if (file._removeLink) { + file._removeLink.textContent = this.options.dictRemoveFile; + } + if (file.previewElement) { + return file.previewElement.classList.add("dz-complete"); + } + }, + completemultiple: noop, + maxfilesexceeded: noop, + 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
    " + }; + + extend = function() { + var key, object, objects, target, val, _i, _len; + target = arguments[0], objects = 2 <= arguments.length ? __slice.call(arguments, 1) : []; + for (_i = 0, _len = objects.length; _i < _len; _i++) { + object = objects[_i]; + for (key in object) { + val = object[key]; + target[key] = val; + } + } + return target; + }; + + function Dropzone(element, options) { + var elementOptions, fallback, _ref; + this.element = element; + this.version = Dropzone.version; + this.defaultOptions.previewTemplate = this.defaultOptions.previewTemplate.replace(/\n*/g, ""); + this.clickableElements = []; + this.listeners = []; + this.files = []; + if (typeof this.element === "string") { + this.element = document.querySelector(this.element); + } + if (!(this.element && (this.element.nodeType != null))) { + throw new Error("Invalid dropzone element."); + } + if (this.element.dropzone) { + throw new Error("Dropzone already attached."); + } + Dropzone.instances.push(this); + this.element.dropzone = this; + elementOptions = (_ref = Dropzone.optionsForElement(this.element)) != null ? _ref : {}; + this.options = extend({}, this.defaultOptions, elementOptions, options != null ? options : {}); + if (this.options.forceFallback || !Dropzone.isBrowserSupported()) { + return this.options.fallback.call(this); + } + if (this.options.url == null) { + this.options.url = this.element.getAttribute("action"); + } + if (!this.options.url) { + throw new Error("No URL provided."); + } + if (this.options.acceptedFiles && this.options.acceptedMimeTypes) { + throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated."); + } + if (this.options.acceptedMimeTypes) { + this.options.acceptedFiles = this.options.acceptedMimeTypes; + delete this.options.acceptedMimeTypes; + } + this.options.method = this.options.method.toUpperCase(); + if ((fallback = this.getExistingFallback()) && fallback.parentNode) { + fallback.parentNode.removeChild(fallback); + } + if (this.options.previewsContainer !== false) { + if (this.options.previewsContainer) { + this.previewsContainer = Dropzone.getElement(this.options.previewsContainer, "previewsContainer"); + } else { + this.previewsContainer = this.element; + } + } + if (this.options.clickable) { + if (this.options.clickable === true) { + this.clickableElements = [this.element]; + } else { + this.clickableElements = Dropzone.getElements(this.options.clickable, "clickable"); + } + } + this.init(); + } + + Dropzone.prototype.getAcceptedFiles = function() { + var file, _i, _len, _ref, _results; + _ref = this.files; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + file = _ref[_i]; + if (file.accepted) { + _results.push(file); + } + } + return _results; + }; + + Dropzone.prototype.getRejectedFiles = function() { + var file, _i, _len, _ref, _results; + _ref = this.files; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + file = _ref[_i]; + if (!file.accepted) { + _results.push(file); + } + } + return _results; + }; + + Dropzone.prototype.getFilesWithStatus = function(status) { + var file, _i, _len, _ref, _results; + _ref = this.files; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + file = _ref[_i]; + if (file.status === status) { + _results.push(file); + } + } + return _results; + }; + + Dropzone.prototype.getQueuedFiles = function() { + return this.getFilesWithStatus(Dropzone.QUEUED); + }; + + Dropzone.prototype.getUploadingFiles = function() { + return this.getFilesWithStatus(Dropzone.UPLOADING); + }; + + Dropzone.prototype.getAddedFiles = function() { + return this.getFilesWithStatus(Dropzone.ADDED); + }; + + Dropzone.prototype.getActiveFiles = function() { + var file, _i, _len, _ref, _results; + _ref = this.files; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + file = _ref[_i]; + if (file.status === Dropzone.UPLOADING || file.status === Dropzone.QUEUED) { + _results.push(file); + } + } + return _results; + }; + + Dropzone.prototype.init = function() { + var eventName, noPropagation, setupHiddenFileInput, _i, _len, _ref, _ref1; + if (this.element.tagName === "form") { + this.element.setAttribute("enctype", "multipart/form-data"); + } + if (this.element.classList.contains("dropzone") && !this.element.querySelector(".dz-message")) { + this.element.appendChild(Dropzone.createElement("
    " + this.options.dictDefaultMessage + "
    ")); + } + if (this.clickableElements.length) { + setupHiddenFileInput = (function(_this) { + return function() { + if (_this.hiddenFileInput) { + document.body.removeChild(_this.hiddenFileInput); + } + _this.hiddenFileInput = document.createElement("input"); + _this.hiddenFileInput.setAttribute("type", "file"); + if ((_this.options.maxFiles == null) || _this.options.maxFiles > 1) { + _this.hiddenFileInput.setAttribute("multiple", "multiple"); + } + _this.hiddenFileInput.className = "dz-hidden-input"; + if (_this.options.acceptedFiles != null) { + _this.hiddenFileInput.setAttribute("accept", _this.options.acceptedFiles); + } + if (_this.options.capture != null) { + _this.hiddenFileInput.setAttribute("capture", _this.options.capture); + } + _this.hiddenFileInput.style.visibility = "hidden"; + _this.hiddenFileInput.style.position = "absolute"; + _this.hiddenFileInput.style.top = "0"; + _this.hiddenFileInput.style.left = "0"; + _this.hiddenFileInput.style.height = "0"; + _this.hiddenFileInput.style.width = "0"; + document.body.appendChild(_this.hiddenFileInput); + return _this.hiddenFileInput.addEventListener("change", function() { + var file, files, _i, _len; + files = _this.hiddenFileInput.files; + if (files.length) { + for (_i = 0, _len = files.length; _i < _len; _i++) { + file = files[_i]; + _this.addFile(file); + } + } + _this.emit("addedfiles", files); + return setupHiddenFileInput(); + }); + }; + })(this); + setupHiddenFileInput(); + } + this.URL = (_ref = window.URL) != null ? _ref : window.webkitURL; + _ref1 = this.events; + for (_i = 0, _len = _ref1.length; _i < _len; _i++) { + eventName = _ref1[_i]; + this.on(eventName, this.options[eventName]); + } + this.on("uploadprogress", (function(_this) { + return function() { + return _this.updateTotalUploadProgress(); + }; + })(this)); + this.on("removedfile", (function(_this) { + return function() { + return _this.updateTotalUploadProgress(); + }; + })(this)); + this.on("canceled", (function(_this) { + return function(file) { + return _this.emit("complete", file); + }; + })(this)); + this.on("complete", (function(_this) { + return function(file) { + if (_this.getAddedFiles().length === 0 && _this.getUploadingFiles().length === 0 && _this.getQueuedFiles().length === 0) { + return setTimeout((function() { + return _this.emit("queuecomplete"); + }), 0); + } + }; + })(this)); + noPropagation = function(e) { + e.stopPropagation(); + if (e.preventDefault) { + return e.preventDefault(); + } else { + return e.returnValue = false; + } + }; + this.listeners = [ + { + element: this.element, + events: { + "dragstart": (function(_this) { + return function(e) { + return _this.emit("dragstart", e); + }; + })(this), + "dragenter": (function(_this) { + return function(e) { + noPropagation(e); + return _this.emit("dragenter", e); + }; + })(this), + "dragover": (function(_this) { + return function(e) { + var efct; + try { + efct = e.dataTransfer.effectAllowed; + } catch (_error) {} + e.dataTransfer.dropEffect = 'move' === efct || 'linkMove' === efct ? 'move' : 'copy'; + noPropagation(e); + return _this.emit("dragover", e); + }; + })(this), + "dragleave": (function(_this) { + return function(e) { + return _this.emit("dragleave", e); + }; + })(this), + "drop": (function(_this) { + return function(e) { + noPropagation(e); + return _this.drop(e); + }; + })(this), + "dragend": (function(_this) { + return function(e) { + return _this.emit("dragend", e); + }; + })(this) + } + } + ]; + this.clickableElements.forEach((function(_this) { + return function(clickableElement) { + return _this.listeners.push({ + element: clickableElement, + events: { + "click": function(evt) { + if ((clickableElement !== _this.element) || (evt.target === _this.element || Dropzone.elementInside(evt.target, _this.element.querySelector(".dz-message")))) { + _this.hiddenFileInput.click(); + } + return true; + } + } + }); + }; + })(this)); + this.enable(); + return this.options.init.call(this); + }; + + Dropzone.prototype.destroy = function() { + var _ref; + this.disable(); + this.removeAllFiles(true); + if ((_ref = this.hiddenFileInput) != null ? _ref.parentNode : void 0) { + this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput); + this.hiddenFileInput = null; + } + delete this.element.dropzone; + return Dropzone.instances.splice(Dropzone.instances.indexOf(this), 1); + }; + + Dropzone.prototype.updateTotalUploadProgress = function() { + var activeFiles, file, totalBytes, totalBytesSent, totalUploadProgress, _i, _len, _ref; + totalBytesSent = 0; + totalBytes = 0; + activeFiles = this.getActiveFiles(); + if (activeFiles.length) { + _ref = this.getActiveFiles(); + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + file = _ref[_i]; + totalBytesSent += file.upload.bytesSent; + totalBytes += file.upload.total; + } + totalUploadProgress = 100 * totalBytesSent / totalBytes; + } else { + totalUploadProgress = 100; + } + return this.emit("totaluploadprogress", totalUploadProgress, totalBytes, totalBytesSent); + }; + + Dropzone.prototype._getParamName = function(n) { + if (typeof this.options.paramName === "function") { + return this.options.paramName(n); + } else { + return "" + this.options.paramName + (this.options.uploadMultiple ? "[" + n + "]" : ""); + } + }; + + Dropzone.prototype.getFallbackForm = function() { + var existingFallback, fields, fieldsString, form; + if (existingFallback = this.getExistingFallback()) { + return existingFallback; + } + fieldsString = "
    "; + if (this.options.dictFallbackText) { + fieldsString += "

    " + this.options.dictFallbackText + "

    "; + } + fieldsString += "
    "; + fields = Dropzone.createElement(fieldsString); + if (this.element.tagName !== "FORM") { + form = Dropzone.createElement("
    "); + form.appendChild(fields); + } else { + this.element.setAttribute("enctype", "multipart/form-data"); + this.element.setAttribute("method", this.options.method); + } + return form != null ? form : fields; + }; + + Dropzone.prototype.getExistingFallback = function() { + var fallback, getFallback, tagName, _i, _len, _ref; + getFallback = function(elements) { + var el, _i, _len; + for (_i = 0, _len = elements.length; _i < _len; _i++) { + el = elements[_i]; + if (/(^| )fallback($| )/.test(el.className)) { + return el; + } + } + }; + _ref = ["div", "form"]; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + tagName = _ref[_i]; + if (fallback = getFallback(this.element.getElementsByTagName(tagName))) { + return fallback; + } + } + }; + + Dropzone.prototype.setupEventListeners = function() { + var elementListeners, event, listener, _i, _len, _ref, _results; + _ref = this.listeners; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + elementListeners = _ref[_i]; + _results.push((function() { + var _ref1, _results1; + _ref1 = elementListeners.events; + _results1 = []; + for (event in _ref1) { + listener = _ref1[event]; + _results1.push(elementListeners.element.addEventListener(event, listener, false)); + } + return _results1; + })()); + } + return _results; + }; + + Dropzone.prototype.removeEventListeners = function() { + var elementListeners, event, listener, _i, _len, _ref, _results; + _ref = this.listeners; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + elementListeners = _ref[_i]; + _results.push((function() { + var _ref1, _results1; + _ref1 = elementListeners.events; + _results1 = []; + for (event in _ref1) { + listener = _ref1[event]; + _results1.push(elementListeners.element.removeEventListener(event, listener, false)); + } + return _results1; + })()); + } + return _results; + }; + + Dropzone.prototype.disable = function() { + var file, _i, _len, _ref, _results; + this.clickableElements.forEach(function(element) { + return element.classList.remove("dz-clickable"); + }); + this.removeEventListeners(); + _ref = this.files; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + file = _ref[_i]; + _results.push(this.cancelUpload(file)); + } + return _results; + }; + + Dropzone.prototype.enable = function() { + this.clickableElements.forEach(function(element) { + return element.classList.add("dz-clickable"); + }); + return this.setupEventListeners(); + }; + + Dropzone.prototype.filesize = function(size) { + var cutoff, i, selectedSize, selectedUnit, unit, units, _i, _len; + selectedSize = 0; + selectedUnit = "b"; + if (size > 0) { + units = ['TB', 'GB', 'MB', 'KB', 'b']; + for (i = _i = 0, _len = units.length; _i < _len; i = ++_i) { + unit = units[i]; + cutoff = Math.pow(this.options.filesizeBase, 4 - i) / 10; + if (size >= cutoff) { + selectedSize = size / Math.pow(this.options.filesizeBase, 4 - i); + selectedUnit = unit; + break; + } + } + selectedSize = Math.round(10 * selectedSize) / 10; + } + return "" + selectedSize + " " + selectedUnit; + }; + + Dropzone.prototype._updateMaxFilesReachedClass = function() { + if ((this.options.maxFiles != null) && this.getAcceptedFiles().length >= this.options.maxFiles) { + if (this.getAcceptedFiles().length === this.options.maxFiles) { + this.emit('maxfilesreached', this.files); + } + return this.element.classList.add("dz-max-files-reached"); + } else { + return this.element.classList.remove("dz-max-files-reached"); + } + }; + + Dropzone.prototype.drop = function(e) { + var files, items; + if (!e.dataTransfer) { + return; + } + this.emit("drop", e); + files = e.dataTransfer.files; + this.emit("addedfiles", files); + if (files.length) { + items = e.dataTransfer.items; + if (items && items.length && (items[0].webkitGetAsEntry != null)) { + this._addFilesFromItems(items); + } else { + this.handleFiles(files); + } + } + }; + + Dropzone.prototype.paste = function(e) { + var items, _ref; + if ((e != null ? (_ref = e.clipboardData) != null ? _ref.items : void 0 : void 0) == null) { + return; + } + this.emit("paste", e); + items = e.clipboardData.items; + if (items.length) { + return this._addFilesFromItems(items); + } + }; + + Dropzone.prototype.handleFiles = function(files) { + var file, _i, _len, _results; + _results = []; + for (_i = 0, _len = files.length; _i < _len; _i++) { + file = files[_i]; + _results.push(this.addFile(file)); + } + return _results; + }; + + Dropzone.prototype._addFilesFromItems = function(items) { + var entry, item, _i, _len, _results; + _results = []; + for (_i = 0, _len = items.length; _i < _len; _i++) { + item = items[_i]; + if ((item.webkitGetAsEntry != null) && (entry = item.webkitGetAsEntry())) { + if (entry.isFile) { + _results.push(this.addFile(item.getAsFile())); + } else if (entry.isDirectory) { + _results.push(this._addFilesFromDirectory(entry, entry.name)); + } else { + _results.push(void 0); + } + } else if (item.getAsFile != null) { + if ((item.kind == null) || item.kind === "file") { + _results.push(this.addFile(item.getAsFile())); + } else { + _results.push(void 0); + } + } else { + _results.push(void 0); + } + } + return _results; + }; + + Dropzone.prototype._addFilesFromDirectory = function(directory, path) { + var dirReader, entriesReader; + dirReader = directory.createReader(); + entriesReader = (function(_this) { + return function(entries) { + var entry, _i, _len; + for (_i = 0, _len = entries.length; _i < _len; _i++) { + entry = entries[_i]; + if (entry.isFile) { + entry.file(function(file) { + if (_this.options.ignoreHiddenFiles && file.name.substring(0, 1) === '.') { + return; + } + file.fullPath = "" + path + "/" + file.name; + return _this.addFile(file); + }); + } else if (entry.isDirectory) { + _this._addFilesFromDirectory(entry, "" + path + "/" + entry.name); + } + } + }; + })(this); + return dirReader.readEntries(entriesReader, function(error) { + return typeof console !== "undefined" && console !== null ? typeof console.log === "function" ? console.log(error) : void 0 : void 0; + }); + }; + + Dropzone.prototype.accept = function(file, done) { + if (file.size > this.options.maxFilesize * 1024 * 1024) { + return done(this.options.dictFileTooBig.replace("{{filesize}}", Math.round(file.size / 1024 / 10.24) / 100).replace("{{maxFilesize}}", this.options.maxFilesize)); + } else if (!Dropzone.isValidFile(file, this.options.acceptedFiles)) { + return done(this.options.dictInvalidFileType); + } else if ((this.options.maxFiles != null) && this.getAcceptedFiles().length >= this.options.maxFiles) { + done(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}", this.options.maxFiles)); + return this.emit("maxfilesexceeded", file); + } else { + return this.options.accept.call(this, file, done); + } + }; + + Dropzone.prototype.addFile = function(file) { + file.upload = { + progress: 0, + total: file.size, + bytesSent: 0 + }; + this.files.push(file); + file.status = Dropzone.ADDED; + this.emit("addedfile", file); + this._enqueueThumbnail(file); + return this.accept(file, (function(_this) { + return function(error) { + if (error) { + file.accepted = false; + _this._errorProcessing([file], error); + } else { + file.accepted = true; + if (_this.options.autoQueue) { + _this.enqueueFile(file); + } + } + return _this._updateMaxFilesReachedClass(); + }; + })(this)); + }; + + Dropzone.prototype.enqueueFiles = function(files) { + var file, _i, _len; + for (_i = 0, _len = files.length; _i < _len; _i++) { + file = files[_i]; + this.enqueueFile(file); + } + return null; + }; + + Dropzone.prototype.enqueueFile = function(file) { + if (file.status === Dropzone.ADDED && file.accepted === true) { + file.status = Dropzone.QUEUED; + if (this.options.autoProcessQueue) { + return setTimeout(((function(_this) { + return function() { + return _this.processQueue(); + }; + })(this)), 0); + } + } else { + throw new Error("This file can't be queued because it has already been processed or was rejected."); + } + }; + + Dropzone.prototype._thumbnailQueue = []; + + Dropzone.prototype._processingThumbnail = false; + + Dropzone.prototype._enqueueThumbnail = function(file) { + if (this.options.createImageThumbnails && file.type.match(/image.*/) && file.size <= this.options.maxThumbnailFilesize * 1024 * 1024) { + this._thumbnailQueue.push(file); + return setTimeout(((function(_this) { + return function() { + return _this._processThumbnailQueue(); + }; + })(this)), 0); + } + }; + + Dropzone.prototype._processThumbnailQueue = function() { + if (this._processingThumbnail || this._thumbnailQueue.length === 0) { + return; + } + this._processingThumbnail = true; + return this.createThumbnail(this._thumbnailQueue.shift(), (function(_this) { + return function() { + _this._processingThumbnail = false; + return _this._processThumbnailQueue(); + }; + })(this)); + }; + + Dropzone.prototype.removeFile = function(file) { + if (file.status === Dropzone.UPLOADING) { + this.cancelUpload(file); + } + this.files = without(this.files, file); + this.emit("removedfile", file); + if (this.files.length === 0) { + return this.emit("reset"); + } + }; + + Dropzone.prototype.removeAllFiles = function(cancelIfNecessary) { + var file, _i, _len, _ref; + if (cancelIfNecessary == null) { + cancelIfNecessary = false; + } + _ref = this.files.slice(); + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + file = _ref[_i]; + if (file.status !== Dropzone.UPLOADING || cancelIfNecessary) { + this.removeFile(file); + } + } + return null; + }; + + Dropzone.prototype.createThumbnail = function(file, callback) { + var fileReader; + fileReader = new FileReader; + fileReader.onload = (function(_this) { + return function() { + if (file.type === "image/svg+xml") { + _this.emit("thumbnail", file, fileReader.result); + if (callback != null) { + callback(); + } + return; + } + return _this.createThumbnailFromUrl(file, fileReader.result, callback); + }; + })(this); + return fileReader.readAsDataURL(file); + }; + + Dropzone.prototype.createThumbnailFromUrl = function(file, imageUrl, callback) { + var img; + img = document.createElement("img"); + img.onload = (function(_this) { + return function() { + var canvas, ctx, resizeInfo, thumbnail, _ref, _ref1, _ref2, _ref3; + file.width = img.width; + file.height = img.height; + resizeInfo = _this.options.resize.call(_this, file); + if (resizeInfo.trgWidth == null) { + resizeInfo.trgWidth = resizeInfo.optWidth; + } + if (resizeInfo.trgHeight == null) { + resizeInfo.trgHeight = resizeInfo.optHeight; + } + canvas = document.createElement("canvas"); + ctx = canvas.getContext("2d"); + canvas.width = resizeInfo.trgWidth; + canvas.height = resizeInfo.trgHeight; + drawImageIOSFix(ctx, img, (_ref = resizeInfo.srcX) != null ? _ref : 0, (_ref1 = resizeInfo.srcY) != null ? _ref1 : 0, resizeInfo.srcWidth, resizeInfo.srcHeight, (_ref2 = resizeInfo.trgX) != null ? _ref2 : 0, (_ref3 = resizeInfo.trgY) != null ? _ref3 : 0, resizeInfo.trgWidth, resizeInfo.trgHeight); + thumbnail = canvas.toDataURL("image/png"); + _this.emit("thumbnail", file, thumbnail); + if (callback != null) { + return callback(); + } + }; + })(this); + if (callback != null) { + img.onerror = callback; + } + return img.src = imageUrl; + }; + + Dropzone.prototype.processQueue = function() { + var i, parallelUploads, processingLength, queuedFiles; + parallelUploads = this.options.parallelUploads; + processingLength = this.getUploadingFiles().length; + i = processingLength; + if (processingLength >= parallelUploads) { + return; + } + queuedFiles = this.getQueuedFiles(); + if (!(queuedFiles.length > 0)) { + return; + } + if (this.options.uploadMultiple) { + return this.processFiles(queuedFiles.slice(0, parallelUploads - processingLength)); + } else { + while (i < parallelUploads) { + if (!queuedFiles.length) { + return; + } + this.processFile(queuedFiles.shift()); + i++; + } + } + }; + + Dropzone.prototype.processFile = function(file) { + return this.processFiles([file]); + }; + + Dropzone.prototype.processFiles = function(files) { + var file, _i, _len; + for (_i = 0, _len = files.length; _i < _len; _i++) { + file = files[_i]; + file.processing = true; + file.status = Dropzone.UPLOADING; + this.emit("processing", file); + } + if (this.options.uploadMultiple) { + this.emit("processingmultiple", files); + } + return this.uploadFiles(files); + }; + + Dropzone.prototype._getFilesWithXhr = function(xhr) { + var file, files; + return files = (function() { + var _i, _len, _ref, _results; + _ref = this.files; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + file = _ref[_i]; + if (file.xhr === xhr) { + _results.push(file); + } + } + return _results; + }).call(this); + }; + + Dropzone.prototype.cancelUpload = function(file) { + var groupedFile, groupedFiles, _i, _j, _len, _len1, _ref; + if (file.status === Dropzone.UPLOADING) { + groupedFiles = this._getFilesWithXhr(file.xhr); + for (_i = 0, _len = groupedFiles.length; _i < _len; _i++) { + groupedFile = groupedFiles[_i]; + groupedFile.status = Dropzone.CANCELED; + } + file.xhr.abort(); + for (_j = 0, _len1 = groupedFiles.length; _j < _len1; _j++) { + groupedFile = groupedFiles[_j]; + this.emit("canceled", groupedFile); + } + if (this.options.uploadMultiple) { + this.emit("canceledmultiple", groupedFiles); + } + } else if ((_ref = file.status) === Dropzone.ADDED || _ref === Dropzone.QUEUED) { + file.status = Dropzone.CANCELED; + this.emit("canceled", file); + if (this.options.uploadMultiple) { + this.emit("canceledmultiple", [file]); + } + } + if (this.options.autoProcessQueue) { + return this.processQueue(); + } + }; + + resolveOption = function() { + var args, option; + option = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : []; + if (typeof option === 'function') { + return option.apply(this, args); + } + return option; + }; + + Dropzone.prototype.uploadFile = function(file) { + return this.uploadFiles([file]); + }; + + Dropzone.prototype.uploadFiles = function(files) { + var file, formData, handleError, headerName, headerValue, headers, i, input, inputName, inputType, key, method, option, progressObj, response, updateProgress, url, value, xhr, _i, _j, _k, _l, _len, _len1, _len2, _len3, _m, _ref, _ref1, _ref2, _ref3, _ref4, _ref5; + xhr = new XMLHttpRequest(); + for (_i = 0, _len = files.length; _i < _len; _i++) { + file = files[_i]; + file.xhr = xhr; + } + method = resolveOption(this.options.method, files); + url = resolveOption(this.options.url, files); + xhr.open(method, url, true); + xhr.withCredentials = !!this.options.withCredentials; + response = null; + handleError = (function(_this) { + return function() { + var _j, _len1, _results; + _results = []; + for (_j = 0, _len1 = files.length; _j < _len1; _j++) { + file = files[_j]; + _results.push(_this._errorProcessing(files, response || _this.options.dictResponseError.replace("{{statusCode}}", xhr.status), xhr)); + } + return _results; + }; + })(this); + updateProgress = (function(_this) { + return function(e) { + var allFilesFinished, progress, _j, _k, _l, _len1, _len2, _len3, _results; + if (e != null) { + progress = 100 * e.loaded / e.total; + for (_j = 0, _len1 = files.length; _j < _len1; _j++) { + file = files[_j]; + file.upload = { + progress: progress, + total: e.total, + bytesSent: e.loaded + }; + } + } else { + allFilesFinished = true; + progress = 100; + for (_k = 0, _len2 = files.length; _k < _len2; _k++) { + file = files[_k]; + if (!(file.upload.progress === 100 && file.upload.bytesSent === file.upload.total)) { + allFilesFinished = false; + } + file.upload.progress = progress; + file.upload.bytesSent = file.upload.total; + } + if (allFilesFinished) { + return; + } + } + _results = []; + for (_l = 0, _len3 = files.length; _l < _len3; _l++) { + file = files[_l]; + _results.push(_this.emit("uploadprogress", file, progress, file.upload.bytesSent)); + } + return _results; + }; + })(this); + xhr.onload = (function(_this) { + return function(e) { + var _ref; + if (files[0].status === Dropzone.CANCELED) { + return; + } + if (xhr.readyState !== 4) { + return; + } + response = xhr.responseText; + if (xhr.getResponseHeader("content-type") && ~xhr.getResponseHeader("content-type").indexOf("application/json")) { + try { + response = JSON.parse(response); + } catch (_error) { + e = _error; + response = "Invalid JSON response from server."; + } + } + updateProgress(); + if (!((200 <= (_ref = xhr.status) && _ref < 300))) { + return handleError(); + } else { + return _this._finished(files, response, e); + } + }; + })(this); + xhr.onerror = (function(_this) { + return function() { + if (files[0].status === Dropzone.CANCELED) { + return; + } + return handleError(); + }; + })(this); + progressObj = (_ref = xhr.upload) != null ? _ref : xhr; + progressObj.onprogress = updateProgress; + headers = { + "Accept": "application/json", + "Cache-Control": "no-cache", + "X-Requested-With": "XMLHttpRequest" + }; + if (this.options.headers) { + extend(headers, this.options.headers); + } + for (headerName in headers) { + headerValue = headers[headerName]; + if (headerValue) { + xhr.setRequestHeader(headerName, headerValue); + } + } + formData = new FormData(); + if (this.options.params) { + _ref1 = this.options.params; + for (key in _ref1) { + value = _ref1[key]; + formData.append(key, value); + } + } + for (_j = 0, _len1 = files.length; _j < _len1; _j++) { + file = files[_j]; + this.emit("sending", file, xhr, formData); + } + if (this.options.uploadMultiple) { + this.emit("sendingmultiple", files, xhr, formData); + } + if (this.element.tagName === "FORM") { + _ref2 = this.element.querySelectorAll("input, textarea, select, button"); + for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) { + input = _ref2[_k]; + inputName = input.getAttribute("name"); + inputType = input.getAttribute("type"); + if (input.tagName === "SELECT" && input.hasAttribute("multiple")) { + _ref3 = input.options; + for (_l = 0, _len3 = _ref3.length; _l < _len3; _l++) { + option = _ref3[_l]; + if (option.selected) { + formData.append(inputName, option.value); + } + } + } else if (!inputType || ((_ref4 = inputType.toLowerCase()) !== "checkbox" && _ref4 !== "radio") || input.checked) { + formData.append(inputName, input.value); + } + } + } + for (i = _m = 0, _ref5 = files.length - 1; 0 <= _ref5 ? _m <= _ref5 : _m >= _ref5; i = 0 <= _ref5 ? ++_m : --_m) { + formData.append(this._getParamName(i), files[i], files[i].name); + } + return this.submitRequest(xhr, formData, files); + }; + + Dropzone.prototype.submitRequest = function(xhr, formData, files) { + return xhr.send(formData); + }; + + Dropzone.prototype._finished = function(files, responseText, e) { + var file, _i, _len; + for (_i = 0, _len = files.length; _i < _len; _i++) { + file = files[_i]; + file.status = Dropzone.SUCCESS; + this.emit("success", file, responseText, e); + this.emit("complete", file); + } + if (this.options.uploadMultiple) { + this.emit("successmultiple", files, responseText, e); + this.emit("completemultiple", files); + } + if (this.options.autoProcessQueue) { + return this.processQueue(); + } + }; + + Dropzone.prototype._errorProcessing = function(files, message, xhr) { + var file, _i, _len; + for (_i = 0, _len = files.length; _i < _len; _i++) { + file = files[_i]; + file.status = Dropzone.ERROR; + this.emit("error", file, message, xhr); + this.emit("complete", file); + } + if (this.options.uploadMultiple) { + this.emit("errormultiple", files, message, xhr); + this.emit("completemultiple", files); + } + if (this.options.autoProcessQueue) { + return this.processQueue(); + } + }; + + return Dropzone; + + })(Emitter); + + Dropzone.version = "4.1.0"; + + Dropzone.options = {}; + + Dropzone.optionsForElement = function(element) { + if (element.getAttribute("id")) { + return Dropzone.options[camelize(element.getAttribute("id"))]; + } else { + return void 0; + } + }; + + Dropzone.instances = []; + + Dropzone.forElement = function(element) { + if (typeof element === "string") { + element = document.querySelector(element); + } + if ((element != null ? element.dropzone : void 0) == null) { + throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone."); + } + return element.dropzone; + }; + + Dropzone.autoDiscover = true; + + Dropzone.discover = function() { + var checkElements, dropzone, dropzones, _i, _len, _results; + if (document.querySelectorAll) { + dropzones = document.querySelectorAll(".dropzone"); + } else { + dropzones = []; + checkElements = function(elements) { + var el, _i, _len, _results; + _results = []; + for (_i = 0, _len = elements.length; _i < _len; _i++) { + el = elements[_i]; + if (/(^| )dropzone($| )/.test(el.className)) { + _results.push(dropzones.push(el)); + } else { + _results.push(void 0); + } + } + return _results; + }; + checkElements(document.getElementsByTagName("div")); + checkElements(document.getElementsByTagName("form")); + } + _results = []; + for (_i = 0, _len = dropzones.length; _i < _len; _i++) { + dropzone = dropzones[_i]; + if (Dropzone.optionsForElement(dropzone) !== false) { + _results.push(new Dropzone(dropzone)); + } else { + _results.push(void 0); + } + } + return _results; + }; + + Dropzone.blacklistedBrowsers = [/opera.*Macintosh.*version\/12/i]; + + Dropzone.isBrowserSupported = function() { + var capableBrowser, regex, _i, _len, _ref; + capableBrowser = true; + if (window.File && window.FileReader && window.FileList && window.Blob && window.FormData && document.querySelector) { + if (!("classList" in document.createElement("a"))) { + capableBrowser = false; + } else { + _ref = Dropzone.blacklistedBrowsers; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + regex = _ref[_i]; + if (regex.test(navigator.userAgent)) { + capableBrowser = false; + continue; + } + } + } + } else { + capableBrowser = false; + } + return capableBrowser; + }; + + without = function(list, rejectedItem) { + var item, _i, _len, _results; + _results = []; + for (_i = 0, _len = list.length; _i < _len; _i++) { + item = list[_i]; + if (item !== rejectedItem) { + _results.push(item); + } + } + return _results; + }; + + camelize = function(str) { + return str.replace(/[\-_](\w)/g, function(match) { + return match.charAt(1).toUpperCase(); + }); + }; + + Dropzone.createElement = function(string) { + var div; + div = document.createElement("div"); + div.innerHTML = string; + return div.childNodes[0]; + }; + + Dropzone.elementInside = function(element, container) { + if (element === container) { + return true; + } + while (element = element.parentNode) { + if (element === container) { + return true; + } + } + return false; + }; + + Dropzone.getElement = function(el, name) { + var element; + if (typeof el === "string") { + element = document.querySelector(el); + } else if (el.nodeType != null) { + element = el; + } + if (element == null) { + throw new Error("Invalid `" + name + "` option provided. Please provide a CSS selector or a plain HTML element."); + } + return element; + }; + + Dropzone.getElements = function(els, name) { + var e, el, elements, _i, _j, _len, _len1, _ref; + if (els instanceof Array) { + elements = []; + try { + for (_i = 0, _len = els.length; _i < _len; _i++) { + el = els[_i]; + elements.push(this.getElement(el, name)); + } + } catch (_error) { + e = _error; + elements = null; + } + } else if (typeof els === "string") { + elements = []; + _ref = document.querySelectorAll(els); + for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) { + el = _ref[_j]; + elements.push(el); + } + } else if (els.nodeType != null) { + elements = [els]; + } + if (!((elements != null) && elements.length)) { + throw new Error("Invalid `" + name + "` option provided. Please provide a CSS selector, a plain HTML element or a list of those."); + } + return elements; + }; + + Dropzone.confirm = function(question, accepted, rejected) { + if (window.confirm(question)) { + return accepted(); + } else if (rejected != null) { + return rejected(); + } + }; + + Dropzone.isValidFile = function(file, acceptedFiles) { + var baseMimeType, mimeType, validType, _i, _len; + if (!acceptedFiles) { + return true; + } + acceptedFiles = acceptedFiles.split(","); + mimeType = file.type; + baseMimeType = mimeType.replace(/\/.*$/, ""); + for (_i = 0, _len = acceptedFiles.length; _i < _len; _i++) { + validType = acceptedFiles[_i]; + validType = validType.trim(); + if (validType.charAt(0) === ".") { + if (file.name.toLowerCase().indexOf(validType.toLowerCase(), file.name.length - validType.length) !== -1) { + return true; + } + } else if (/\/\*$/.test(validType)) { + if (baseMimeType === validType.replace(/\/.*$/, "")) { + return true; + } + } else { + if (mimeType === validType) { + return true; + } + } + } + return false; + }; + + if (typeof jQuery !== "undefined" && jQuery !== null) { + jQuery.fn.dropzone = function(options) { + return this.each(function() { + return new Dropzone(this, options); + }); + }; + } + + if (typeof module !== "undefined" && module !== null) { + module.exports = Dropzone; + } else { + window.Dropzone = Dropzone; + } + + Dropzone.ADDED = "added"; + + Dropzone.QUEUED = "queued"; + + Dropzone.ACCEPTED = Dropzone.QUEUED; + + Dropzone.UPLOADING = "uploading"; + + Dropzone.PROCESSING = Dropzone.UPLOADING; + + Dropzone.CANCELED = "canceled"; + + Dropzone.ERROR = "error"; + + Dropzone.SUCCESS = "success"; + + + /* + + Bugfix for iOS 6 and 7 + Source: http://stackoverflow.com/questions/11929099/html5-canvas-drawimage-ratio-bug-ios + based on the work of https://github.com/stomita/ios-imagefile-megapixel + */ + + detectVerticalSquash = function(img) { + var alpha, canvas, ctx, data, ey, ih, iw, py, ratio, sy; + iw = img.naturalWidth; + ih = img.naturalHeight; + canvas = document.createElement("canvas"); + canvas.width = 1; + canvas.height = ih; + ctx = canvas.getContext("2d"); + ctx.drawImage(img, 0, 0); + data = ctx.getImageData(0, 0, 1, ih).data; + sy = 0; + ey = ih; + py = ih; + while (py > sy) { + alpha = data[(py - 1) * 4 + 3]; + if (alpha === 0) { + ey = py; + } else { + sy = py; + } + py = (ey + sy) >> 1; + } + ratio = py / ih; + if (ratio === 0) { + return 1; + } else { + return ratio; + } + }; + + drawImageIOSFix = function(ctx, img, sx, sy, sw, sh, dx, dy, dw, dh) { + var vertSquashRatio; + vertSquashRatio = detectVerticalSquash(img); + return ctx.drawImage(img, sx, sy, sw, sh, dx, dy, dw, dh / vertSquashRatio); + }; + + + /* + * contentloaded.js + * + * Author: Diego Perini (diego.perini at gmail.com) + * Summary: cross-browser wrapper for DOMContentLoaded + * Updated: 20101020 + * License: MIT + * Version: 1.2 + * + * URL: + * http://javascript.nwbox.com/ContentLoaded/ + * http://javascript.nwbox.com/ContentLoaded/MIT-LICENSE + */ + + contentLoaded = function(win, fn) { + var add, doc, done, init, poll, pre, rem, root, top; + done = false; + top = true; + doc = win.document; + root = doc.documentElement; + add = (doc.addEventListener ? "addEventListener" : "attachEvent"); + rem = (doc.addEventListener ? "removeEventListener" : "detachEvent"); + pre = (doc.addEventListener ? "" : "on"); + init = function(e) { + if (e.type === "readystatechange" && doc.readyState !== "complete") { + return; + } + (e.type === "load" ? win : doc)[rem](pre + e.type, init, false); + if (!done && (done = true)) { + return fn.call(win, e.type || e); + } + }; + poll = function() { + var e; + try { + root.doScroll("left"); + } catch (_error) { + e = _error; + setTimeout(poll, 50); + return; + } + return init("poll"); + }; + if (doc.readyState !== "complete") { + if (doc.createEventObject && root.doScroll) { + try { + top = !win.frameElement; + } catch (_error) {} + if (top) { + poll(); + } + } + doc[add](pre + "DOMContentLoaded", init, false); + doc[add](pre + "readystatechange", init, false); + return win[add](pre + "load", init, false); + } + }; + + Dropzone._autoDiscoverFunction = function() { + if (Dropzone.autoDiscover) { + return Dropzone.discover(); + } + }; + + contentLoaded(window, Dropzone._autoDiscoverFunction); + +}).call(this); diff --git a/src/main/webapp/js/fileupload/org/style.css b/src/main/webapp/js/fileupload/org/style.css index b11f1b53..e5cc6e18 100644 --- a/src/main/webapp/js/fileupload/org/style.css +++ b/src/main/webapp/js/fileupload/org/style.css @@ -1,749 +1,749 @@ -/** - * Eric Meyer's Reset CSS v2.0 (http://meyerweb.com/eric/tools/css/reset/) - * http://cssreset.com - */ -html, body, div, span, applet, object, iframe, -h1, h2, h3, h4, h5, h6, p, blockquote, pre, -a, abbr, acronym, address, big, cite, code, -del, dfn, em, img, ins, kbd, q, s, samp, -small, strike, strong, sub, sup, tt, var, -b, u, i, center, -dl, dt, dd, ol, ul, li, -fieldset, form, label, legend, -table, caption, tbody, tfoot, thead, tr, th, td, -article, aside, canvas, details, embed, -figure, figcaption, footer, header, hgroup, -menu, nav, output, ruby, section, summary, -time, mark, audio, video { - margin: 0; - padding: 0; - border: 0; - font-size: 100%; - font: inherit; - vertical-align: baseline; } - -/* HTML5 display-role reset for older browsers */ -article, aside, details, figcaption, figure, -footer, header, hgroup, menu, nav, section { - display: block; } - -body { - line-height: 1; } - -ol, ul { - list-style: none; } - -blockquote, q { - quotes: none; } - -blockquote:before, blockquote:after, -q:before, q:after { - content: ''; - content: none; } - -table { - border-collapse: collapse; - border-spacing: 0; } - -.hll { - background-color: #ffffcc; } - -.c { - color: #408080; - font-style: italic; } - -/* Comment */ -.err { - border: 1px solid #FF0000; } - -/* Error */ -.k { - color: #008000; - font-weight: bold; } - -/* Keyword */ -.o { - color: #666666; } - -/* Operator */ -.cm { - color: #9AA5AD; - font-style: italic; } - -/* Comment.Multiline */ -.cp { - color: #BC7A00; } - -/* Comment.Preproc */ -.c1 { - color: #9AA5AD; - font-style: italic; } - -/* Comment.Single */ -.cs { - color: #408080; - font-style: italic; } - -/* Comment.Special */ -.gd { - color: #A00000; } - -/* Generic.Deleted */ -.ge { - font-style: italic; } - -/* Generic.Emph */ -.gr { - color: #FF0000; } - -/* Generic.Error */ -.gh { - color: #000080; - font-weight: bold; } - -/* Generic.Heading */ -.gi { - color: #00A000; } - -/* Generic.Inserted */ -.go { - color: #808080; } - -/* Generic.Output */ -.gp { - color: #000080; - font-weight: bold; } - -/* Generic.Prompt */ -.gs { - font-weight: bold; } - -/* Generic.Strong */ -.gu { - color: #800080; - font-weight: bold; } - -/* Generic.Subheading */ -.gt { - color: #0040D0; } - -/* Generic.Traceback */ -.kc { - color: #008000; - font-weight: bold; } - -/* Keyword.Constant */ -.kd { - color: #229EFF; - font-weight: bold; } - -/* Keyword.Declaration */ -.kn { - color: #008000; - font-weight: bold; } - -/* Keyword.Namespace */ -.kp { - color: #008000; } - -/* Keyword.Pseudo */ -.kr { - color: #008000; - font-weight: bold; } - -/* Keyword.Reserved */ -.kt { - color: #B00040; } - -/* Keyword.Type */ -.m { - color: #666666; } - -/* Literal.Number */ -.s { - color: #CB0C6A; } - -/* Literal.String */ -.na { - color: #C38D00; } - -/* Name.Attribute */ -.nb { - color: #008000; } - -/* Name.Builtin */ -.nc { - color: #0000FF; - font-weight: bold; } - -/* Name.Class */ -.no { - color: #880000; } - -/* Name.Constant */ -.nd { - color: #AA22FF; } - -/* Name.Decorator */ -.ni { - color: #999999; - font-weight: bold; } - -/* Name.Entity */ -.ne { - color: #D2413A; - font-weight: bold; } - -/* Name.Exception */ -.nf { - color: #0000FF; } - -/* Name.Function */ -.nl { - color: #A0A000; } - -/* Name.Label */ -.nn { - color: #0000FF; - font-weight: bold; } - -/* Name.Namespace */ -.nt { - color: #0081E5; - font-weight: bold; } - -/* Name.Tag */ -.nv { - color: #19177C; } - -/* Name.Variable */ -.ow { - color: #AA22FF; - font-weight: bold; } - -/* Operator.Word */ -.w { - color: #bbbbbb; } - -/* Text.Whitespace */ -.mf { - color: #666666; } - -/* Literal.Number.Float */ -.mh { - color: #666666; } - -/* Literal.Number.Hex */ -.mi { - color: #666666; } - -/* Literal.Number.Integer */ -.mo { - color: #666666; } - -/* Literal.Number.Oct */ -.sb { - color: #BA2121; } - -/* Literal.String.Backtick */ -.sc { - color: #BA2121; } - -/* Literal.String.Char */ -.sd { - color: #BA2121; - font-style: italic; } - -/* Literal.String.Doc */ -.s2 { - color: #D50069; } - -/* Literal.String.Double */ -.se { - color: #BB6622; - font-weight: bold; } - -/* Literal.String.Escape */ -.sh { - color: #BA2121; } - -/* Literal.String.Heredoc */ -.si { - color: #BB6688; - font-weight: bold; } - -/* Literal.String.Interpol */ -.sx { - color: #008000; } - -/* Literal.String.Other */ -.sr { - color: #BB6688; } - -/* Literal.String.Regex */ -.s1 { - color: #BA2121; } - -/* Literal.String.Single */ -.ss { - color: #19177C; } - -/* Literal.String.Symbol */ -.bp { - color: #008000; } - -/* Name.Builtin.Pseudo */ -.vc { - color: #19177C; } - -/* Name.Variable.Class */ -.vg { - color: #19177C; } - -/* Name.Variable.Global */ -.vi { - color: #19177C; } - -/* Name.Variable.Instance */ -.il { - color: #666666; } - -/* Literal.Number.Integer.Long */ -.nx { - color: #4C556B; } - -#dropzone { - margin-bottom: 3rem; } - -.dropzone { - border: 2px dashed #0087F7; - border-radius: 5px; - background: white; } - .dropzone .dz-message { - font-weight: 400; } - .dropzone .dz-message .note { - font-size: 0.8em; - font-weight: 200; - display: block; - margin-top: 1.4rem; } - -*, *:before, *:after { - box-sizing: border-box; } - -html, body { - height: 100%; - font-family: Roboto, "Open Sans", sans-serif; - font-size: 20px; - font-weight: 300; - line-height: 1.4rem; - background: #F3F4F5; - color: #646C7F; - text-rendering: optimizeLegibility; } - @media (max-width: 600px) { - html, body { - font-size: 18px; } } - @media (max-width: 400px) { - html, body { - font-size: 16px; } } - -h1, h2, h3, table th, table th .header { - font-size: 1.8rem; - color: #0087F7; - -webkit-font-smoothing: antialiased; - line-height: 2.2rem; } - -h1, h2, h3 { - margin-top: 2.8rem; - margin-bottom: 1.4rem; } - -h2 { - font-size: 1.4rem; } - -h1.anchor, h2.anchor { - margin: 0; - padding: 0; - height: 1px; - overflow: hidden; - visibility: hidden; } - -table th { - font-size: 1.4rem; - color: #646C7F; } - -ul, ol { - list-style-position: inside; } - -a { - color: #0087F7; - text-decoration: none; } - a:hover { - border-bottom: 2px solid #0087F7; } - -p { - margin: 1.4rem 0; } - -strong { - font-weight: 400; } - -em { - font-style: italic; } - -code { - font-family: Inconsolata, monospace; - background: rgba(0, 135, 247, 0.04); - padding: 0.2em 0.4em; } - -.highlight code, td:first-child code { - background: none; - padding: 0; } - -aside { - font-size: 0.8em; - color: rgba(0, 0, 0, 0.4); } - -hr { - border: none; - background: none; - position: relative; - height: 2.8rem; } - hr:after { - content: ""; - position: absolute; - top: 1.4rem; - left: 0; - right: 0; - height: 1px; - background: rgba(0, 0, 0, 0.1); } - -ul li { - list-style-type: disc; - padding-top: 0.7rem; - padding-bottom: 0.7rem; - border-bottom: 1px solid rgba(0, 0, 0, 0.1); } - ul li:last-of-type { - border: none; } - -.highlight { - padding: 1.4rem; - overflow: auto; - background: rgba(100, 108, 128, 0.04); - margin-top: 2.8rem; - margin-bottom: 2.8rem; } - -.bitcoin { - overflow: auto; } - -blockquote { - color: #0087F7; - font-size: 1.2rem; - line-height: 2rem; - -webkit-font-smoothing: antialiased; - margin-top: 2.8rem; - margin-bottom: 2.8rem; } - blockquote a { - border-bottom: 1px solid #0087F7; } - -body > header { - position: relative; - padding: 2.8rem 1.4rem; - z-index: 10; } - body > header .content { - opacity: 1; - background: #F3F4F5; - z-index: 10; } - body > header .content > * { - max-width: 700px; } - body > header .content h1 { - margin-bottom: 2.8rem; - margin-top: 0; } - body > header .content h1 img { - max-width: 100%; } - body > header .content h1 span { - display: none; } - @media (min-width: 700px) { - body > header #social-buttons { - display: inline-block; - position: absolute; - top: 0.5em; - right: 0; - opacity: 0.5; - -webkit-transition: opacity 0.2s ease; - -moz-transition: opacity 0.2s ease; - -ms-transition: opacity 0.2s ease; - -o-transition: opacity 0.2s ease; - transition: opacity 0.2s ease; } - body > header #social-buttons:hover { - opacity: 1; } } - body > header #social-buttons .social-button { - display: inline-block; } - body > header #social-buttons .social-button.facebook-social-button .fb-like > span { - vertical-align: top !important; - top: 1px; } - body > header .scroll-invitation { - margin-top: 2.8rem; - margin-bottom: 2.8rem; } - body > header .scroll-invitation a { - display: block; - width: 56px; - height: 56px; - background: url("../images/arrow.svg") no-repeat; } - body > header .scroll-invitation a:hover { - text-decoration: none; - border: none; - background-image: url("../images/arrow-hover.svg"); } - body > header .scroll-invitation a span { - display: none; } - @media (min-width: 700px) { - body > header { - height: 100vh; - margin-bottom: 0; } - body > header .content { - position: relative; - top: 50%; - transform: translateY(-50%); - -webkit-transform: translateY(-50%); - -moz-transform: translateY(-50%); } } - @media (min-width: 900px) { - body > header { - padding-left: 15%; } - body > header .content h1 { - margin-bottom: 4.2rem; } - body > header .content h1 img { - width: 550px; } - body > header .content h2 { - font-size: 1.5em; - line-height: 1.4em; } } - @media (min-width: 1100px) { - body > header { - font-size: 1em; - line-height: 1.5em; } - body > header .content h1 { - margin-bottom: 5.6rem; } - body > header .content h1 img { - width: 700px; } - body > header .content > * { - max-width: 900px; } - body > header h2 { - margin-top: 2.8rem; - margin-bottom: 2.8rem; } - body > header .scroll-invitation { - margin-top: 5.6rem; } } - -main > nav { - position: absolute; - top: 0; - left: 0; - bottom: 0; - width: 220px; - background: #028AF4; - padding: 1.4rem 0; - z-index: 200; - overflow: auto; - display: none; } - main > nav.fixed { - position: fixed; } - main > nav img { - margin: 0 0 1.4rem 1.4rem; - width: 58px; - height: 58px; } - main > nav a:not(.logo) { - display: block; - line-height: 1.4rem; - color: rgba(255, 255, 255, 0.9); - border: none; - padding: 0.7rem 1.4rem; - font-size: 0.8rem; - -webkit-font-smoothing: subpixel-antialiased; } - main > nav a:not(.logo):hover { - background: rgba(255, 255, 255, 0.3); } - main > nav .sub-sections { - height: 0; - overflow: hidden; - -webkit-transition: height 0.4s ease; - -moz-transition: height 0.4s ease; - -ms-transition: height 0.4s ease; - -o-transition: height 0.4s ease; - transition: height 0.4s ease; } - main > nav .visible { - background: rgba(255, 255, 255, 0.13); } - main > nav .visible .sub-sections { - display: block; } - main > nav a.current { - background: #4DADF7; } - main > nav .level-0 > a { - font-weight: 400; } - main > nav .level-1 > a { - padding-left: 1.9rem; - color: rgba(255, 255, 255, 0.7); } - -@media (min-width: 940px) { - main { - padding-left: 220px; } - main > nav { - display: block; } } -form.donate { - display: inline-block; - vertical-align: bottom; - position: relative; - top: 0.25em; - margin: 0 0em 0 0.2em; } - -main { - position: relative; - z-index: 100; } - main section { - padding: 1.4rem 1.4rem 2.8rem 1.4rem; } - main section:last-of-type { - padding-bottom: 8.4rem; } - main section h1, main section h2 { - margin-top: 0; - padding-top: 2.8rem; } - main section > * { - max-width: 720px; - margin-left: auto; - margin-right: auto; } - main section > *.highlight { - max-width: 900px; } - main section > table { - max-width: 80rem; } - main section .video-grid { - display: flex; - justify-content: space-between; - margin-top: 1.5rem; } - main section .video-grid .video-grid__cell { - display: block; - position: relative; - flex: 1; - margin-left: 1.5rem; } - main section .video-grid .video-grid__cell:first-child { - margin-left: 0; } - main section .video-grid .video-grid__cell:after { - content: ''; - padding-top: 56.25%; - display: block; } - main section .video-grid .video-grid__cell iframe { - display: block; - position: absolute; - width: 100%; - height: 100%; } - main section .embedded-video { - position: relative; - width: 100%; } - main section .embedded-video:after { - content: ''; - padding-top: 56.25%; - display: block; } - main section .embedded-video iframe { - display: block; - position: absolute; - width: 100%; - height: 100%; } - main section:nth-child(odd) { - background: #F3F4F5; } - main section:nth-child(even) { - background: #E8E9EC; } - main section.news { - background: #646C7F; - color: white; } - main section.news h1, main section.news h2 { - color: white; - -webkit-font-smoothing: subpixel-antialiased; } - main section.news a { - color: #C0E3FE; - border-color: #C0E3FE; } - main .configuration-table-container { - max-width: 100%; - overflow-x: scroll; } - main table { - font-size: 0.9rem; - margin-top: 1.4rem; - margin-bottom: 4.2rem; - border: 1px solid #38A0FE; - border-bottom: none; - background: white; } - main table th:first-of-type, - main table td:first-of-type { - text-align: right; } - main table th, main table td { - text-align: left; - border-bottom: 1px solid #38A0FE; - padding: 0.7rem 1.4rem; } - main table td:first-of-type, main table th:first-of-type { - border-right: 1px solid #38A0FE; } - main table a.default-value { - display: block; - font-weight: normal; - color: rgba(0, 88, 160, 0.3); - font-size: 0.9em; } - main table a.default-value:hover { - border: none; - color: #0087F7; } - main table td:first-of-type { - font-weight: bold; - color: #0087F7; } - main table th.title { - text-align: center; - padding-top: 2.8rem; - padding-bottom: 2.8rem; } - main table th.title p { - margin-bottom: 0; } - main table td.separator { - font-weight: normal; - text-align: left; - color: #646C7F; } - main table p { - margin: 0; } - @media (max-width: 600px) { - main table table, main table tbody, main table thead, main table tr, main table td, main table th { - display: block; } - main table a.default-value { - display: inline; - margin-left: 0.5em; } - main table td, main table th { - overflow: auto; } - main table td:first-of-type, main table th:first-of-type { - text-align: left; - border-right: none; } - main table td.label { - border-bottom-color: rgba(0, 135, 247, 0.15); } - main table th.title { - padding-top: 1.4rem; - padding-bottom: 1.4rem; } - main table th:not(.title) { - display: none; } } - -footer { - background: #2D3038; - z-index: 5000; - position: relative; - display: block; - padding: 1.4rem 1.4rem 2.8rem 1.4rem; - font-size: 0.9rem; - color: white; } - footer * { - color: white; } - footer a:hover { - border-color: white; } - footer > * { - max-width: 720px; - margin-left: auto; - margin-right: auto; } - @media (min-width: 720px) { - footer .license { - text-align: justify; } } - footer .logo { - margin: 2.8rem 0; - width: 270px; } - -.for-hire { - text-align: center; - padding: 1em 2em; - background: rgba(255, 255, 255, 0.1); - border-radius: 0.3rem; - line-height: 1.5em; } - .for-hire h1 { - padding: 0; - margin: 1.5rem 0 3rem; } - .for-hire h1 img { - max-width: 100%; - height: auto; } +/** + * Eric Meyer's Reset CSS v2.0 (http://meyerweb.com/eric/tools/css/reset/) + * http://cssreset.com + */ +html, body, div, span, applet, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, abbr, acronym, address, big, cite, code, +del, dfn, em, img, ins, kbd, q, s, samp, +small, strike, strong, sub, sup, tt, var, +b, u, i, center, +dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td, +article, aside, canvas, details, embed, +figure, figcaption, footer, header, hgroup, +menu, nav, output, ruby, section, summary, +time, mark, audio, video { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; } + +/* HTML5 display-role reset for older browsers */ +article, aside, details, figcaption, figure, +footer, header, hgroup, menu, nav, section { + display: block; } + +body { + line-height: 1; } + +ol, ul { + list-style: none; } + +blockquote, q { + quotes: none; } + +blockquote:before, blockquote:after, +q:before, q:after { + content: ''; + content: none; } + +table { + border-collapse: collapse; + border-spacing: 0; } + +.hll { + background-color: #ffffcc; } + +.c { + color: #408080; + font-style: italic; } + +/* Comment */ +.err { + border: 1px solid #FF0000; } + +/* Error */ +.k { + color: #008000; + font-weight: bold; } + +/* Keyword */ +.o { + color: #666666; } + +/* Operator */ +.cm { + color: #9AA5AD; + font-style: italic; } + +/* Comment.Multiline */ +.cp { + color: #BC7A00; } + +/* Comment.Preproc */ +.c1 { + color: #9AA5AD; + font-style: italic; } + +/* Comment.Single */ +.cs { + color: #408080; + font-style: italic; } + +/* Comment.Special */ +.gd { + color: #A00000; } + +/* Generic.Deleted */ +.ge { + font-style: italic; } + +/* Generic.Emph */ +.gr { + color: #FF0000; } + +/* Generic.Error */ +.gh { + color: #000080; + font-weight: bold; } + +/* Generic.Heading */ +.gi { + color: #00A000; } + +/* Generic.Inserted */ +.go { + color: #808080; } + +/* Generic.Output */ +.gp { + color: #000080; + font-weight: bold; } + +/* Generic.Prompt */ +.gs { + font-weight: bold; } + +/* Generic.Strong */ +.gu { + color: #800080; + font-weight: bold; } + +/* Generic.Subheading */ +.gt { + color: #0040D0; } + +/* Generic.Traceback */ +.kc { + color: #008000; + font-weight: bold; } + +/* Keyword.Constant */ +.kd { + color: #229EFF; + font-weight: bold; } + +/* Keyword.Declaration */ +.kn { + color: #008000; + font-weight: bold; } + +/* Keyword.Namespace */ +.kp { + color: #008000; } + +/* Keyword.Pseudo */ +.kr { + color: #008000; + font-weight: bold; } + +/* Keyword.Reserved */ +.kt { + color: #B00040; } + +/* Keyword.Type */ +.m { + color: #666666; } + +/* Literal.Number */ +.s { + color: #CB0C6A; } + +/* Literal.String */ +.na { + color: #C38D00; } + +/* Name.Attribute */ +.nb { + color: #008000; } + +/* Name.Builtin */ +.nc { + color: #0000FF; + font-weight: bold; } + +/* Name.Class */ +.no { + color: #880000; } + +/* Name.Constant */ +.nd { + color: #AA22FF; } + +/* Name.Decorator */ +.ni { + color: #999999; + font-weight: bold; } + +/* Name.Entity */ +.ne { + color: #D2413A; + font-weight: bold; } + +/* Name.Exception */ +.nf { + color: #0000FF; } + +/* Name.Function */ +.nl { + color: #A0A000; } + +/* Name.Label */ +.nn { + color: #0000FF; + font-weight: bold; } + +/* Name.Namespace */ +.nt { + color: #0081E5; + font-weight: bold; } + +/* Name.Tag */ +.nv { + color: #19177C; } + +/* Name.Variable */ +.ow { + color: #AA22FF; + font-weight: bold; } + +/* Operator.Word */ +.w { + color: #bbbbbb; } + +/* Text.Whitespace */ +.mf { + color: #666666; } + +/* Literal.Number.Float */ +.mh { + color: #666666; } + +/* Literal.Number.Hex */ +.mi { + color: #666666; } + +/* Literal.Number.Integer */ +.mo { + color: #666666; } + +/* Literal.Number.Oct */ +.sb { + color: #BA2121; } + +/* Literal.String.Backtick */ +.sc { + color: #BA2121; } + +/* Literal.String.Char */ +.sd { + color: #BA2121; + font-style: italic; } + +/* Literal.String.Doc */ +.s2 { + color: #D50069; } + +/* Literal.String.Double */ +.se { + color: #BB6622; + font-weight: bold; } + +/* Literal.String.Escape */ +.sh { + color: #BA2121; } + +/* Literal.String.Heredoc */ +.si { + color: #BB6688; + font-weight: bold; } + +/* Literal.String.Interpol */ +.sx { + color: #008000; } + +/* Literal.String.Other */ +.sr { + color: #BB6688; } + +/* Literal.String.Regex */ +.s1 { + color: #BA2121; } + +/* Literal.String.Single */ +.ss { + color: #19177C; } + +/* Literal.String.Symbol */ +.bp { + color: #008000; } + +/* Name.Builtin.Pseudo */ +.vc { + color: #19177C; } + +/* Name.Variable.Class */ +.vg { + color: #19177C; } + +/* Name.Variable.Global */ +.vi { + color: #19177C; } + +/* Name.Variable.Instance */ +.il { + color: #666666; } + +/* Literal.Number.Integer.Long */ +.nx { + color: #4C556B; } + +#dropzone { + margin-bottom: 3rem; } + +.dropzone { + border: 2px dashed #0087F7; + border-radius: 5px; + background: white; } + .dropzone .dz-message { + font-weight: 400; } + .dropzone .dz-message .note { + font-size: 0.8em; + font-weight: 200; + display: block; + margin-top: 1.4rem; } + +*, *:before, *:after { + box-sizing: border-box; } + +html, body { + height: 100%; + font-family: Roboto, "Open Sans", sans-serif; + font-size: 20px; + font-weight: 300; + line-height: 1.4rem; + background: #F3F4F5; + color: #646C7F; + text-rendering: optimizeLegibility; } + @media (max-width: 600px) { + html, body { + font-size: 18px; } } + @media (max-width: 400px) { + html, body { + font-size: 16px; } } + +h1, h2, h3, table th, table th .header { + font-size: 1.8rem; + color: #0087F7; + -webkit-font-smoothing: antialiased; + line-height: 2.2rem; } + +h1, h2, h3 { + margin-top: 2.8rem; + margin-bottom: 1.4rem; } + +h2 { + font-size: 1.4rem; } + +h1.anchor, h2.anchor { + margin: 0; + padding: 0; + height: 1px; + overflow: hidden; + visibility: hidden; } + +table th { + font-size: 1.4rem; + color: #646C7F; } + +ul, ol { + list-style-position: inside; } + +a { + color: #0087F7; + text-decoration: none; } + a:hover { + border-bottom: 2px solid #0087F7; } + +p { + margin: 1.4rem 0; } + +strong { + font-weight: 400; } + +em { + font-style: italic; } + +code { + font-family: Inconsolata, monospace; + background: rgba(0, 135, 247, 0.04); + padding: 0.2em 0.4em; } + +.highlight code, td:first-child code { + background: none; + padding: 0; } + +aside { + font-size: 0.8em; + color: rgba(0, 0, 0, 0.4); } + +hr { + border: none; + background: none; + position: relative; + height: 2.8rem; } + hr:after { + content: ""; + position: absolute; + top: 1.4rem; + left: 0; + right: 0; + height: 1px; + background: rgba(0, 0, 0, 0.1); } + +ul li { + list-style-type: disc; + padding-top: 0.7rem; + padding-bottom: 0.7rem; + border-bottom: 1px solid rgba(0, 0, 0, 0.1); } + ul li:last-of-type { + border: none; } + +.highlight { + padding: 1.4rem; + overflow: auto; + background: rgba(100, 108, 128, 0.04); + margin-top: 2.8rem; + margin-bottom: 2.8rem; } + +.bitcoin { + overflow: auto; } + +blockquote { + color: #0087F7; + font-size: 1.2rem; + line-height: 2rem; + -webkit-font-smoothing: antialiased; + margin-top: 2.8rem; + margin-bottom: 2.8rem; } + blockquote a { + border-bottom: 1px solid #0087F7; } + +body > header { + position: relative; + padding: 2.8rem 1.4rem; + z-index: 10; } + body > header .content { + opacity: 1; + background: #F3F4F5; + z-index: 10; } + body > header .content > * { + max-width: 700px; } + body > header .content h1 { + margin-bottom: 2.8rem; + margin-top: 0; } + body > header .content h1 img { + max-width: 100%; } + body > header .content h1 span { + display: none; } + @media (min-width: 700px) { + body > header #social-buttons { + display: inline-block; + position: absolute; + top: 0.5em; + right: 0; + opacity: 0.5; + -webkit-transition: opacity 0.2s ease; + -moz-transition: opacity 0.2s ease; + -ms-transition: opacity 0.2s ease; + -o-transition: opacity 0.2s ease; + transition: opacity 0.2s ease; } + body > header #social-buttons:hover { + opacity: 1; } } + body > header #social-buttons .social-button { + display: inline-block; } + body > header #social-buttons .social-button.facebook-social-button .fb-like > span { + vertical-align: top !important; + top: 1px; } + body > header .scroll-invitation { + margin-top: 2.8rem; + margin-bottom: 2.8rem; } + body > header .scroll-invitation a { + display: block; + width: 56px; + height: 56px; + background: url("../images/arrow.svg") no-repeat; } + body > header .scroll-invitation a:hover { + text-decoration: none; + border: none; + background-image: url("../images/arrow-hover.svg"); } + body > header .scroll-invitation a span { + display: none; } + @media (min-width: 700px) { + body > header { + height: 100vh; + margin-bottom: 0; } + body > header .content { + position: relative; + top: 50%; + transform: translateY(-50%); + -webkit-transform: translateY(-50%); + -moz-transform: translateY(-50%); } } + @media (min-width: 900px) { + body > header { + padding-left: 15%; } + body > header .content h1 { + margin-bottom: 4.2rem; } + body > header .content h1 img { + width: 550px; } + body > header .content h2 { + font-size: 1.5em; + line-height: 1.4em; } } + @media (min-width: 1100px) { + body > header { + font-size: 1em; + line-height: 1.5em; } + body > header .content h1 { + margin-bottom: 5.6rem; } + body > header .content h1 img { + width: 700px; } + body > header .content > * { + max-width: 900px; } + body > header h2 { + margin-top: 2.8rem; + margin-bottom: 2.8rem; } + body > header .scroll-invitation { + margin-top: 5.6rem; } } + +main > nav { + position: absolute; + top: 0; + left: 0; + bottom: 0; + width: 220px; + background: #028AF4; + padding: 1.4rem 0; + z-index: 200; + overflow: auto; + display: none; } + main > nav.fixed { + position: fixed; } + main > nav img { + margin: 0 0 1.4rem 1.4rem; + width: 58px; + height: 58px; } + main > nav a:not(.logo) { + display: block; + line-height: 1.4rem; + color: rgba(255, 255, 255, 0.9); + border: none; + padding: 0.7rem 1.4rem; + font-size: 0.8rem; + -webkit-font-smoothing: subpixel-antialiased; } + main > nav a:not(.logo):hover { + background: rgba(255, 255, 255, 0.3); } + main > nav .sub-sections { + height: 0; + overflow: hidden; + -webkit-transition: height 0.4s ease; + -moz-transition: height 0.4s ease; + -ms-transition: height 0.4s ease; + -o-transition: height 0.4s ease; + transition: height 0.4s ease; } + main > nav .visible { + background: rgba(255, 255, 255, 0.13); } + main > nav .visible .sub-sections { + display: block; } + main > nav a.current { + background: #4DADF7; } + main > nav .level-0 > a { + font-weight: 400; } + main > nav .level-1 > a { + padding-left: 1.9rem; + color: rgba(255, 255, 255, 0.7); } + +@media (min-width: 940px) { + main { + padding-left: 220px; } + main > nav { + display: block; } } +form.donate { + display: inline-block; + vertical-align: bottom; + position: relative; + top: 0.25em; + margin: 0 0em 0 0.2em; } + +main { + position: relative; + z-index: 100; } + main section { + padding: 1.4rem 1.4rem 2.8rem 1.4rem; } + main section:last-of-type { + padding-bottom: 8.4rem; } + main section h1, main section h2 { + margin-top: 0; + padding-top: 2.8rem; } + main section > * { + max-width: 720px; + margin-left: auto; + margin-right: auto; } + main section > *.highlight { + max-width: 900px; } + main section > table { + max-width: 80rem; } + main section .video-grid { + display: flex; + justify-content: space-between; + margin-top: 1.5rem; } + main section .video-grid .video-grid__cell { + display: block; + position: relative; + flex: 1; + margin-left: 1.5rem; } + main section .video-grid .video-grid__cell:first-child { + margin-left: 0; } + main section .video-grid .video-grid__cell:after { + content: ''; + padding-top: 56.25%; + display: block; } + main section .video-grid .video-grid__cell iframe { + display: block; + position: absolute; + width: 100%; + height: 100%; } + main section .embedded-video { + position: relative; + width: 100%; } + main section .embedded-video:after { + content: ''; + padding-top: 56.25%; + display: block; } + main section .embedded-video iframe { + display: block; + position: absolute; + width: 100%; + height: 100%; } + main section:nth-child(odd) { + background: #F3F4F5; } + main section:nth-child(even) { + background: #E8E9EC; } + main section.news { + background: #646C7F; + color: white; } + main section.news h1, main section.news h2 { + color: white; + -webkit-font-smoothing: subpixel-antialiased; } + main section.news a { + color: #C0E3FE; + border-color: #C0E3FE; } + main .configuration-table-container { + max-width: 100%; + overflow-x: scroll; } + main table { + font-size: 0.9rem; + margin-top: 1.4rem; + margin-bottom: 4.2rem; + border: 1px solid #38A0FE; + border-bottom: none; + background: white; } + main table th:first-of-type, + main table td:first-of-type { + text-align: right; } + main table th, main table td { + text-align: left; + border-bottom: 1px solid #38A0FE; + padding: 0.7rem 1.4rem; } + main table td:first-of-type, main table th:first-of-type { + border-right: 1px solid #38A0FE; } + main table a.default-value { + display: block; + font-weight: normal; + color: rgba(0, 88, 160, 0.3); + font-size: 0.9em; } + main table a.default-value:hover { + border: none; + color: #0087F7; } + main table td:first-of-type { + font-weight: bold; + color: #0087F7; } + main table th.title { + text-align: center; + padding-top: 2.8rem; + padding-bottom: 2.8rem; } + main table th.title p { + margin-bottom: 0; } + main table td.separator { + font-weight: normal; + text-align: left; + color: #646C7F; } + main table p { + margin: 0; } + @media (max-width: 600px) { + main table table, main table tbody, main table thead, main table tr, main table td, main table th { + display: block; } + main table a.default-value { + display: inline; + margin-left: 0.5em; } + main table td, main table th { + overflow: auto; } + main table td:first-of-type, main table th:first-of-type { + text-align: left; + border-right: none; } + main table td.label { + border-bottom-color: rgba(0, 135, 247, 0.15); } + main table th.title { + padding-top: 1.4rem; + padding-bottom: 1.4rem; } + main table th:not(.title) { + display: none; } } + +footer { + background: #2D3038; + z-index: 5000; + position: relative; + display: block; + padding: 1.4rem 1.4rem 2.8rem 1.4rem; + font-size: 0.9rem; + color: white; } + footer * { + color: white; } + footer a:hover { + border-color: white; } + footer > * { + max-width: 720px; + margin-left: auto; + margin-right: auto; } + @media (min-width: 720px) { + footer .license { + text-align: justify; } } + footer .logo { + margin: 2.8rem 0; + width: 270px; } + +.for-hire { + text-align: center; + padding: 1em 2em; + background: rgba(255, 255, 255, 0.1); + border-radius: 0.3rem; + line-height: 1.5em; } + .for-hire h1 { + padding: 0; + margin: 1.5rem 0 3rem; } + .for-hire h1 img { + max-width: 100%; + height: auto; } diff --git a/src/main/webapp/js/fileupload/style.css b/src/main/webapp/js/fileupload/style.css index 8b35cfda..edf5f7a3 100644 --- a/src/main/webapp/js/fileupload/style.css +++ b/src/main/webapp/js/fileupload/style.css @@ -1,749 +1,749 @@ -/** - * Eric Meyer's Reset CSS v2.0 (http://meyerweb.com/eric/tools/css/reset/) - * http://cssreset.com - */ -html, body, div, span, applet, object, iframe, -h1, h2, h3, h4, h5, h6, p, blockquote, pre, -a, abbr, acronym, address, big, cite, code, -del, dfn, em, img, ins, kbd, q, s, samp, -small, strike, strong, sub, sup, tt, var, -b, u, i, center, -dl, dt, dd, ol, ul, li, -fieldset, form, label, legend, -table, caption, tbody, tfoot, thead, tr, th, td, -article, aside, canvas, details, embed, -figure, figcaption, footer, header, hgroup, -menu, nav, output, ruby, section, summary, -time, mark, audio, video { - margin: 0; - padding: 0; - border: 0; - font-size: 100%; - font: inherit; - vertical-align: baseline; } - -/* HTML5 display-role reset for older browsers */ -article, aside, details, figcaption, figure, -footer, header, hgroup, menu, nav, section { - display: block; } - -body { - line-height: 1; } - -ol, ul { - list-style: none; } - -blockquote, q { - quotes: none; } - -blockquote:before, blockquote:after, -q:before, q:after { - content: ''; - content: none; } - -table { - border-collapse: collapse; - border-spacing: 0; } - -.hll { - background-color: #ffffcc; } - -.c { - color: #408080; - font-style: italic; } - -/* Comment */ -.err { - border: 1px solid #FF0000; } - -/* Error */ -.k { - color: #008000; - font-weight: bold; } - -/* Keyword */ -.o { - color: #666666; } - -/* Operator */ -.cm { - color: #9AA5AD; - font-style: italic; } - -/* Comment.Multiline */ -.cp { - color: #BC7A00; } - -/* Comment.Preproc */ -.c1 { - color: #9AA5AD; - font-style: italic; } - -/* Comment.Single */ -.cs { - color: #408080; - font-style: italic; } - -/* Comment.Special */ -.gd { - color: #A00000; } - -/* Generic.Deleted */ -.ge { - font-style: italic; } - -/* Generic.Emph */ -.gr { - color: #FF0000; } - -/* Generic.Error */ -.gh { - color: #000080; - font-weight: bold; } - -/* Generic.Heading */ -.gi { - color: #00A000; } - -/* Generic.Inserted */ -.go { - color: #808080; } - -/* Generic.Output */ -.gp { - color: #000080; - font-weight: bold; } - -/* Generic.Prompt */ -.gs { - font-weight: bold; } - -/* Generic.Strong */ -.gu { - color: #800080; - font-weight: bold; } - -/* Generic.Subheading */ -.gt { - color: #0040D0; } - -/* Generic.Traceback */ -.kc { - color: #008000; - font-weight: bold; } - -/* Keyword.Constant */ -.kd { - color: #229EFF; - font-weight: bold; } - -/* Keyword.Declaration */ -.kn { - color: #008000; - font-weight: bold; } - -/* Keyword.Namespace */ -.kp { - color: #008000; } - -/* Keyword.Pseudo */ -.kr { - color: #008000; - font-weight: bold; } - -/* Keyword.Reserved */ -.kt { - color: #B00040; } - -/* Keyword.Type */ -.m { - color: #666666; } - -/* Literal.Number */ -.s { - color: #CB0C6A; } - -/* Literal.String */ -.na { - color: #C38D00; } - -/* Name.Attribute */ -.nb { - color: #008000; } - -/* Name.Builtin */ -.nc { - color: #0000FF; - font-weight: bold; } - -/* Name.Class */ -.no { - color: #880000; } - -/* Name.Constant */ -.nd { - color: #AA22FF; } - -/* Name.Decorator */ -.ni { - color: #999999; - font-weight: bold; } - -/* Name.Entity */ -.ne { - color: #D2413A; - font-weight: bold; } - -/* Name.Exception */ -.nf { - color: #0000FF; } - -/* Name.Function */ -.nl { - color: #A0A000; } - -/* Name.Label */ -.nn { - color: #0000FF; - font-weight: bold; } - -/* Name.Namespace */ -.nt { - color: #0081E5; - font-weight: bold; } - -/* Name.Tag */ -.nv { - color: #19177C; } - -/* Name.Variable */ -.ow { - color: #AA22FF; - font-weight: bold; } - -/* Operator.Word */ -.w { - color: #bbbbbb; } - -/* Text.Whitespace */ -.mf { - color: #666666; } - -/* Literal.Number.Float */ -.mh { - color: #666666; } - -/* Literal.Number.Hex */ -.mi { - color: #666666; } - -/* Literal.Number.Integer */ -.mo { - color: #666666; } - -/* Literal.Number.Oct */ -.sb { - color: #BA2121; } - -/* Literal.String.Backtick */ -.sc { - color: #BA2121; } - -/* Literal.String.Char */ -.sd { - color: #BA2121; - font-style: italic; } - -/* Literal.String.Doc */ -.s2 { - color: #D50069; } - -/* Literal.String.Double */ -.se { - color: #BB6622; - font-weight: bold; } - -/* Literal.String.Escape */ -.sh { - color: #BA2121; } - -/* Literal.String.Heredoc */ -.si { - color: #BB6688; - font-weight: bold; } - -/* Literal.String.Interpol */ -.sx { - color: #008000; } - -/* Literal.String.Other */ -.sr { - color: #BB6688; } - -/* Literal.String.Regex */ -.s1 { - color: #BA2121; } - -/* Literal.String.Single */ -.ss { - color: #19177C; } - -/* Literal.String.Symbol */ -.bp { - color: #008000; } - -/* Name.Builtin.Pseudo */ -.vc { - color: #19177C; } - -/* Name.Variable.Class */ -.vg { - color: #19177C; } - -/* Name.Variable.Global */ -.vi { - color: #19177C; } - -/* Name.Variable.Instance */ -.il { - color: #666666; } - -/* Literal.Number.Integer.Long */ -.nx { - color: #4C556B; } - -#dropzone { - margin-bottom: 3rem; } - -.dropzone { - border: 2px dashed #0087F7; - border-radius: 5px; - background: white; } - .dropzone .dz-message { - font-weight: 400; } - .dropzone .dz-message .note { - font-size: 0.8em; - font-weight: 200; - display: block; - margin-top: 1.3rem; } - -*, *:before, *:after { - box-sizing: border-box; } - -html, body { - height: 100%; - font-family: Roboto, "Open Sans", sans-serif; - font-size: 20px; - font-weight: 300; - line-height: 1.4rem; - background: #F3F4F5; - color: #646C7F; - text-rendering: optimizeLegibility; } - @media (max-width: 600px) { - html, body { - font-size: 18px; } } - @media (max-width: 400px) { - html, body { - font-size: 16px; } } - -h1, h2, h3, table th, table th .header { - font-size: 1.8rem; - color: #0087F7; - -webkit-font-smoothing: antialiased; - line-height: 2.2rem; } - -h1, h2, h3 { - margin-top: 2.8rem; - margin-bottom: 1.4rem; } - -h2 { - font-size: 1.4rem; } - -h1.anchor, h2.anchor { - margin: 0; - padding: 0; - height: 1px; - overflow: hidden; - visibility: hidden; } - -table th { - font-size: 1.4rem; - color: #646C7F; } - -ul, ol { - list-style-position: inside; } - -a { - color: #0087F7; - text-decoration: none; } - a:hover { - border-bottom: 2px solid #0087F7; } - -p { - margin: 1.4rem 0; } - -strong { - font-weight: 400; } - -em { - font-style: italic; } - -code { - font-family: Inconsolata, monospace; - background: rgba(0, 135, 247, 0.04); - padding: 0.2em 0.4em; } - -.highlight code, td:first-child code { - background: none; - padding: 0; } - -aside { - font-size: 0.8em; - color: rgba(0, 0, 0, 0.4); } - -hr { - border: none; - background: none; - position: relative; - height: 2.8rem; } - hr:after { - content: ""; - position: absolute; - top: 1.4rem; - left: 0; - right: 0; - height: 1px; - background: rgba(0, 0, 0, 0.1); } - -ul li { - list-style-type: disc; - padding-top: 0.7rem; - padding-bottom: 0.7rem; - border-bottom: 1px solid rgba(0, 0, 0, 0.1); } - ul li:last-of-type { - border: none; } - -.highlight { - padding: 1.4rem; - overflow: auto; - background: rgba(100, 108, 128, 0.04); - margin-top: 2.8rem; - margin-bottom: 2.8rem; } - -.bitcoin { - overflow: auto; } - -blockquote { - color: #0087F7; - font-size: 1.2rem; - line-height: 2rem; - -webkit-font-smoothing: antialiased; - margin-top: 2.8rem; - margin-bottom: 2.8rem; } - blockquote a { - border-bottom: 1px solid #0087F7; } - -body > header { - position: relative; - padding: 2.8rem 1.4rem; - z-index: 10; } - body > header .content { - opacity: 1; - background: #F3F4F5; - z-index: 10; } - body > header .content > * { - max-width: 700px; } - body > header .content h1 { - margin-bottom: 2.8rem; - margin-top: 0; } - body > header .content h1 img { - max-width: 100%; } - body > header .content h1 span { - display: none; } - @media (min-width: 700px) { - body > header #social-buttons { - display: inline-block; - position: absolute; - top: 0.5em; - right: 0; - opacity: 0.5; - -webkit-transition: opacity 0.2s ease; - -moz-transition: opacity 0.2s ease; - -ms-transition: opacity 0.2s ease; - -o-transition: opacity 0.2s ease; - transition: opacity 0.2s ease; } - body > header #social-buttons:hover { - opacity: 1; } } - body > header #social-buttons .social-button { - display: inline-block; } - body > header #social-buttons .social-button.facebook-social-button .fb-like > span { - vertical-align: top !important; - top: 1px; } - body > header .scroll-invitation { - margin-top: 2.8rem; - margin-bottom: 2.8rem; } - body > header .scroll-invitation a { - display: block; - width: 56px; - height: 56px; - background: url("../images/arrow.svg") no-repeat; } - body > header .scroll-invitation a:hover { - text-decoration: none; - border: none; - background-image: url("../images/arrow-hover.svg"); } - body > header .scroll-invitation a span { - display: none; } - @media (min-width: 700px) { - body > header { - height: 100vh; - margin-bottom: 0; } - body > header .content { - position: relative; - top: 50%; - transform: translateY(-50%); - -webkit-transform: translateY(-50%); - -moz-transform: translateY(-50%); } } - @media (min-width: 900px) { - body > header { - padding-left: 15%; } - body > header .content h1 { - margin-bottom: 4.2rem; } - body > header .content h1 img { - width: 550px; } - body > header .content h2 { - font-size: 1.5em; - line-height: 1.4em; } } - @media (min-width: 1100px) { - body > header { - font-size: 1em; - line-height: 1.5em; } - body > header .content h1 { - margin-bottom: 5.6rem; } - body > header .content h1 img { - width: 700px; } - body > header .content > * { - max-width: 900px; } - body > header h2 { - margin-top: 2.8rem; - margin-bottom: 2.8rem; } - body > header .scroll-invitation { - margin-top: 5.6rem; } } - -main > nav { - position: absolute; - top: 0; - left: 0; - bottom: 0; - width: 220px; - background: #028AF4; - padding: 1.4rem 0; - z-index: 200; - overflow: auto; - display: none; } - main > nav.fixed { - position: fixed; } - main > nav img { - margin: 0 0 1.4rem 1.4rem; - width: 58px; - height: 58px; } - main > nav a:not(.logo) { - display: block; - line-height: 1.4rem; - color: rgba(255, 255, 255, 0.9); - border: none; - padding: 0.7rem 1.4rem; - font-size: 0.8rem; - -webkit-font-smoothing: subpixel-antialiased; } - main > nav a:not(.logo):hover { - background: rgba(255, 255, 255, 0.3); } - main > nav .sub-sections { - height: 0; - overflow: hidden; - -webkit-transition: height 0.4s ease; - -moz-transition: height 0.4s ease; - -ms-transition: height 0.4s ease; - -o-transition: height 0.4s ease; - transition: height 0.4s ease; } - main > nav .visible { - background: rgba(255, 255, 255, 0.13); } - main > nav .visible .sub-sections { - display: block; } - main > nav a.current { - background: #4DADF7; } - main > nav .level-0 > a { - font-weight: 400; } - main > nav .level-1 > a { - padding-left: 1.9rem; - color: rgba(255, 255, 255, 0.7); } - -@media (min-width: 940px) { - main { - padding-left: 220px; } - main > nav { - display: block; } } -form.donate { - display: inline-block; - vertical-align: bottom; - position: relative; - top: 0.25em; - margin: 0 0em 0 0.2em; } - -main { - position: relative; - z-index: 100; } - main section { - padding: 1.4rem 1.4rem 2.8rem 1.4rem; } - main section:last-of-type { - padding-bottom: 8.4rem; } - main section h1, main section h2 { - margin-top: 0; - padding-top: 2.8rem; } - main section > * { - max-width: 720px; - margin-left: auto; - margin-right: auto; } - main section > *.highlight { - max-width: 900px; } - main section > table { - max-width: 80rem; } - main section .video-grid { - display: flex; - justify-content: space-between; - margin-top: 1.5rem; } - main section .video-grid .video-grid__cell { - display: block; - position: relative; - flex: 1; - margin-left: 1.5rem; } - main section .video-grid .video-grid__cell:first-child { - margin-left: 0; } - main section .video-grid .video-grid__cell:after { - content: ''; - padding-top: 56.25%; - display: block; } - main section .video-grid .video-grid__cell iframe { - display: block; - position: absolute; - width: 100%; - height: 100%; } - main section .embedded-video { - position: relative; - width: 100%; } - main section .embedded-video:after { - content: ''; - padding-top: 56.25%; - display: block; } - main section .embedded-video iframe { - display: block; - position: absolute; - width: 100%; - height: 100%; } - main section:nth-child(odd) { - background: #F3F4F5; } - main section:nth-child(even) { - background: #E8E9EC; } - main section.news { - background: #646C7F; - color: white; } - main section.news h1, main section.news h2 { - color: white; - -webkit-font-smoothing: subpixel-antialiased; } - main section.news a { - color: #C0E3FE; - border-color: #C0E3FE; } - main .configuration-table-container { - max-width: 100%; - overflow-x: scroll; } - main table { - font-size: 0.9rem; - margin-top: 1.4rem; - margin-bottom: 4.2rem; - border: 1px solid #38A0FE; - border-bottom: none; - background: white; } - main table th:first-of-type, - main table td:first-of-type { - text-align: right; } - main table th, main table td { - text-align: left; - border-bottom: 1px solid #38A0FE; - padding: 0.7rem 1.4rem; } - main table td:first-of-type, main table th:first-of-type { - border-right: 1px solid #38A0FE; } - main table a.default-value { - display: block; - font-weight: normal; - color: rgba(0, 88, 160, 0.3); - font-size: 0.9em; } - main table a.default-value:hover { - border: none; - color: #0087F7; } - main table td:first-of-type { - font-weight: bold; - color: #0087F7; } - main table th.title { - text-align: center; - padding-top: 2.8rem; - padding-bottom: 2.8rem; } - main table th.title p { - margin-bottom: 0; } - main table td.separator { - font-weight: normal; - text-align: left; - color: #646C7F; } - main table p { - margin: 0; } - @media (max-width: 600px) { - main table table, main table tbody, main table thead, main table tr, main table td, main table th { - display: block; } - main table a.default-value { - display: inline; - margin-left: 0.5em; } - main table td, main table th { - overflow: auto; } - main table td:first-of-type, main table th:first-of-type { - text-align: left; - border-right: none; } - main table td.label { - border-bottom-color: rgba(0, 135, 247, 0.15); } - main table th.title { - padding-top: 1.4rem; - padding-bottom: 1.4rem; } - main table th:not(.title) { - display: none; } } - -footer { - background: #2D3038; - z-index: 5000; - position: relative; - display: block; - padding: 1.4rem 1.4rem 2.8rem 1.4rem; - font-size: 0.9rem; - color: white; } - footer * { - color: white; } - footer a:hover { - border-color: white; } - footer > * { - max-width: 720px; - margin-left: auto; - margin-right: auto; } - @media (min-width: 720px) { - footer .license { - text-align: justify; } } - footer .logo { - margin: 2.8rem 0; - width: 270px; } - -.for-hire { - text-align: center; - padding: 1em 2em; - background: rgba(255, 255, 255, 0.1); - border-radius: 0.3rem; - line-height: 1.5em; } - .for-hire h1 { - padding: 0; - margin: 1.5rem 0 3rem; } - .for-hire h1 img { - max-width: 100%; - height: auto; } +/** + * Eric Meyer's Reset CSS v2.0 (http://meyerweb.com/eric/tools/css/reset/) + * http://cssreset.com + */ +html, body, div, span, applet, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, abbr, acronym, address, big, cite, code, +del, dfn, em, img, ins, kbd, q, s, samp, +small, strike, strong, sub, sup, tt, var, +b, u, i, center, +dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td, +article, aside, canvas, details, embed, +figure, figcaption, footer, header, hgroup, +menu, nav, output, ruby, section, summary, +time, mark, audio, video { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; } + +/* HTML5 display-role reset for older browsers */ +article, aside, details, figcaption, figure, +footer, header, hgroup, menu, nav, section { + display: block; } + +body { + line-height: 1; } + +ol, ul { + list-style: none; } + +blockquote, q { + quotes: none; } + +blockquote:before, blockquote:after, +q:before, q:after { + content: ''; + content: none; } + +table { + border-collapse: collapse; + border-spacing: 0; } + +.hll { + background-color: #ffffcc; } + +.c { + color: #408080; + font-style: italic; } + +/* Comment */ +.err { + border: 1px solid #FF0000; } + +/* Error */ +.k { + color: #008000; + font-weight: bold; } + +/* Keyword */ +.o { + color: #666666; } + +/* Operator */ +.cm { + color: #9AA5AD; + font-style: italic; } + +/* Comment.Multiline */ +.cp { + color: #BC7A00; } + +/* Comment.Preproc */ +.c1 { + color: #9AA5AD; + font-style: italic; } + +/* Comment.Single */ +.cs { + color: #408080; + font-style: italic; } + +/* Comment.Special */ +.gd { + color: #A00000; } + +/* Generic.Deleted */ +.ge { + font-style: italic; } + +/* Generic.Emph */ +.gr { + color: #FF0000; } + +/* Generic.Error */ +.gh { + color: #000080; + font-weight: bold; } + +/* Generic.Heading */ +.gi { + color: #00A000; } + +/* Generic.Inserted */ +.go { + color: #808080; } + +/* Generic.Output */ +.gp { + color: #000080; + font-weight: bold; } + +/* Generic.Prompt */ +.gs { + font-weight: bold; } + +/* Generic.Strong */ +.gu { + color: #800080; + font-weight: bold; } + +/* Generic.Subheading */ +.gt { + color: #0040D0; } + +/* Generic.Traceback */ +.kc { + color: #008000; + font-weight: bold; } + +/* Keyword.Constant */ +.kd { + color: #229EFF; + font-weight: bold; } + +/* Keyword.Declaration */ +.kn { + color: #008000; + font-weight: bold; } + +/* Keyword.Namespace */ +.kp { + color: #008000; } + +/* Keyword.Pseudo */ +.kr { + color: #008000; + font-weight: bold; } + +/* Keyword.Reserved */ +.kt { + color: #B00040; } + +/* Keyword.Type */ +.m { + color: #666666; } + +/* Literal.Number */ +.s { + color: #CB0C6A; } + +/* Literal.String */ +.na { + color: #C38D00; } + +/* Name.Attribute */ +.nb { + color: #008000; } + +/* Name.Builtin */ +.nc { + color: #0000FF; + font-weight: bold; } + +/* Name.Class */ +.no { + color: #880000; } + +/* Name.Constant */ +.nd { + color: #AA22FF; } + +/* Name.Decorator */ +.ni { + color: #999999; + font-weight: bold; } + +/* Name.Entity */ +.ne { + color: #D2413A; + font-weight: bold; } + +/* Name.Exception */ +.nf { + color: #0000FF; } + +/* Name.Function */ +.nl { + color: #A0A000; } + +/* Name.Label */ +.nn { + color: #0000FF; + font-weight: bold; } + +/* Name.Namespace */ +.nt { + color: #0081E5; + font-weight: bold; } + +/* Name.Tag */ +.nv { + color: #19177C; } + +/* Name.Variable */ +.ow { + color: #AA22FF; + font-weight: bold; } + +/* Operator.Word */ +.w { + color: #bbbbbb; } + +/* Text.Whitespace */ +.mf { + color: #666666; } + +/* Literal.Number.Float */ +.mh { + color: #666666; } + +/* Literal.Number.Hex */ +.mi { + color: #666666; } + +/* Literal.Number.Integer */ +.mo { + color: #666666; } + +/* Literal.Number.Oct */ +.sb { + color: #BA2121; } + +/* Literal.String.Backtick */ +.sc { + color: #BA2121; } + +/* Literal.String.Char */ +.sd { + color: #BA2121; + font-style: italic; } + +/* Literal.String.Doc */ +.s2 { + color: #D50069; } + +/* Literal.String.Double */ +.se { + color: #BB6622; + font-weight: bold; } + +/* Literal.String.Escape */ +.sh { + color: #BA2121; } + +/* Literal.String.Heredoc */ +.si { + color: #BB6688; + font-weight: bold; } + +/* Literal.String.Interpol */ +.sx { + color: #008000; } + +/* Literal.String.Other */ +.sr { + color: #BB6688; } + +/* Literal.String.Regex */ +.s1 { + color: #BA2121; } + +/* Literal.String.Single */ +.ss { + color: #19177C; } + +/* Literal.String.Symbol */ +.bp { + color: #008000; } + +/* Name.Builtin.Pseudo */ +.vc { + color: #19177C; } + +/* Name.Variable.Class */ +.vg { + color: #19177C; } + +/* Name.Variable.Global */ +.vi { + color: #19177C; } + +/* Name.Variable.Instance */ +.il { + color: #666666; } + +/* Literal.Number.Integer.Long */ +.nx { + color: #4C556B; } + +#dropzone { + margin-bottom: 3rem; } + +.dropzone { + border: 2px dashed #0087F7; + border-radius: 5px; + background: white; } + .dropzone .dz-message { + font-weight: 400; } + .dropzone .dz-message .note { + font-size: 0.8em; + font-weight: 200; + display: block; + margin-top: 1.3rem; } + +*, *:before, *:after { + box-sizing: border-box; } + +html, body { + height: 100%; + font-family: Roboto, "Open Sans", sans-serif; + font-size: 20px; + font-weight: 300; + line-height: 1.4rem; + background: #F3F4F5; + color: #646C7F; + text-rendering: optimizeLegibility; } + @media (max-width: 600px) { + html, body { + font-size: 18px; } } + @media (max-width: 400px) { + html, body { + font-size: 16px; } } + +h1, h2, h3, table th, table th .header { + font-size: 1.8rem; + color: #0087F7; + -webkit-font-smoothing: antialiased; + line-height: 2.2rem; } + +h1, h2, h3 { + margin-top: 2.8rem; + margin-bottom: 1.4rem; } + +h2 { + font-size: 1.4rem; } + +h1.anchor, h2.anchor { + margin: 0; + padding: 0; + height: 1px; + overflow: hidden; + visibility: hidden; } + +table th { + font-size: 1.4rem; + color: #646C7F; } + +ul, ol { + list-style-position: inside; } + +a { + color: #0087F7; + text-decoration: none; } + a:hover { + border-bottom: 2px solid #0087F7; } + +p { + margin: 1.4rem 0; } + +strong { + font-weight: 400; } + +em { + font-style: italic; } + +code { + font-family: Inconsolata, monospace; + background: rgba(0, 135, 247, 0.04); + padding: 0.2em 0.4em; } + +.highlight code, td:first-child code { + background: none; + padding: 0; } + +aside { + font-size: 0.8em; + color: rgba(0, 0, 0, 0.4); } + +hr { + border: none; + background: none; + position: relative; + height: 2.8rem; } + hr:after { + content: ""; + position: absolute; + top: 1.4rem; + left: 0; + right: 0; + height: 1px; + background: rgba(0, 0, 0, 0.1); } + +ul li { + list-style-type: disc; + padding-top: 0.7rem; + padding-bottom: 0.7rem; + border-bottom: 1px solid rgba(0, 0, 0, 0.1); } + ul li:last-of-type { + border: none; } + +.highlight { + padding: 1.4rem; + overflow: auto; + background: rgba(100, 108, 128, 0.04); + margin-top: 2.8rem; + margin-bottom: 2.8rem; } + +.bitcoin { + overflow: auto; } + +blockquote { + color: #0087F7; + font-size: 1.2rem; + line-height: 2rem; + -webkit-font-smoothing: antialiased; + margin-top: 2.8rem; + margin-bottom: 2.8rem; } + blockquote a { + border-bottom: 1px solid #0087F7; } + +body > header { + position: relative; + padding: 2.8rem 1.4rem; + z-index: 10; } + body > header .content { + opacity: 1; + background: #F3F4F5; + z-index: 10; } + body > header .content > * { + max-width: 700px; } + body > header .content h1 { + margin-bottom: 2.8rem; + margin-top: 0; } + body > header .content h1 img { + max-width: 100%; } + body > header .content h1 span { + display: none; } + @media (min-width: 700px) { + body > header #social-buttons { + display: inline-block; + position: absolute; + top: 0.5em; + right: 0; + opacity: 0.5; + -webkit-transition: opacity 0.2s ease; + -moz-transition: opacity 0.2s ease; + -ms-transition: opacity 0.2s ease; + -o-transition: opacity 0.2s ease; + transition: opacity 0.2s ease; } + body > header #social-buttons:hover { + opacity: 1; } } + body > header #social-buttons .social-button { + display: inline-block; } + body > header #social-buttons .social-button.facebook-social-button .fb-like > span { + vertical-align: top !important; + top: 1px; } + body > header .scroll-invitation { + margin-top: 2.8rem; + margin-bottom: 2.8rem; } + body > header .scroll-invitation a { + display: block; + width: 56px; + height: 56px; + background: url("../images/arrow.svg") no-repeat; } + body > header .scroll-invitation a:hover { + text-decoration: none; + border: none; + background-image: url("../images/arrow-hover.svg"); } + body > header .scroll-invitation a span { + display: none; } + @media (min-width: 700px) { + body > header { + height: 100vh; + margin-bottom: 0; } + body > header .content { + position: relative; + top: 50%; + transform: translateY(-50%); + -webkit-transform: translateY(-50%); + -moz-transform: translateY(-50%); } } + @media (min-width: 900px) { + body > header { + padding-left: 15%; } + body > header .content h1 { + margin-bottom: 4.2rem; } + body > header .content h1 img { + width: 550px; } + body > header .content h2 { + font-size: 1.5em; + line-height: 1.4em; } } + @media (min-width: 1100px) { + body > header { + font-size: 1em; + line-height: 1.5em; } + body > header .content h1 { + margin-bottom: 5.6rem; } + body > header .content h1 img { + width: 700px; } + body > header .content > * { + max-width: 900px; } + body > header h2 { + margin-top: 2.8rem; + margin-bottom: 2.8rem; } + body > header .scroll-invitation { + margin-top: 5.6rem; } } + +main > nav { + position: absolute; + top: 0; + left: 0; + bottom: 0; + width: 220px; + background: #028AF4; + padding: 1.4rem 0; + z-index: 200; + overflow: auto; + display: none; } + main > nav.fixed { + position: fixed; } + main > nav img { + margin: 0 0 1.4rem 1.4rem; + width: 58px; + height: 58px; } + main > nav a:not(.logo) { + display: block; + line-height: 1.4rem; + color: rgba(255, 255, 255, 0.9); + border: none; + padding: 0.7rem 1.4rem; + font-size: 0.8rem; + -webkit-font-smoothing: subpixel-antialiased; } + main > nav a:not(.logo):hover { + background: rgba(255, 255, 255, 0.3); } + main > nav .sub-sections { + height: 0; + overflow: hidden; + -webkit-transition: height 0.4s ease; + -moz-transition: height 0.4s ease; + -ms-transition: height 0.4s ease; + -o-transition: height 0.4s ease; + transition: height 0.4s ease; } + main > nav .visible { + background: rgba(255, 255, 255, 0.13); } + main > nav .visible .sub-sections { + display: block; } + main > nav a.current { + background: #4DADF7; } + main > nav .level-0 > a { + font-weight: 400; } + main > nav .level-1 > a { + padding-left: 1.9rem; + color: rgba(255, 255, 255, 0.7); } + +@media (min-width: 940px) { + main { + padding-left: 220px; } + main > nav { + display: block; } } +form.donate { + display: inline-block; + vertical-align: bottom; + position: relative; + top: 0.25em; + margin: 0 0em 0 0.2em; } + +main { + position: relative; + z-index: 100; } + main section { + padding: 1.4rem 1.4rem 2.8rem 1.4rem; } + main section:last-of-type { + padding-bottom: 8.4rem; } + main section h1, main section h2 { + margin-top: 0; + padding-top: 2.8rem; } + main section > * { + max-width: 720px; + margin-left: auto; + margin-right: auto; } + main section > *.highlight { + max-width: 900px; } + main section > table { + max-width: 80rem; } + main section .video-grid { + display: flex; + justify-content: space-between; + margin-top: 1.5rem; } + main section .video-grid .video-grid__cell { + display: block; + position: relative; + flex: 1; + margin-left: 1.5rem; } + main section .video-grid .video-grid__cell:first-child { + margin-left: 0; } + main section .video-grid .video-grid__cell:after { + content: ''; + padding-top: 56.25%; + display: block; } + main section .video-grid .video-grid__cell iframe { + display: block; + position: absolute; + width: 100%; + height: 100%; } + main section .embedded-video { + position: relative; + width: 100%; } + main section .embedded-video:after { + content: ''; + padding-top: 56.25%; + display: block; } + main section .embedded-video iframe { + display: block; + position: absolute; + width: 100%; + height: 100%; } + main section:nth-child(odd) { + background: #F3F4F5; } + main section:nth-child(even) { + background: #E8E9EC; } + main section.news { + background: #646C7F; + color: white; } + main section.news h1, main section.news h2 { + color: white; + -webkit-font-smoothing: subpixel-antialiased; } + main section.news a { + color: #C0E3FE; + border-color: #C0E3FE; } + main .configuration-table-container { + max-width: 100%; + overflow-x: scroll; } + main table { + font-size: 0.9rem; + margin-top: 1.4rem; + margin-bottom: 4.2rem; + border: 1px solid #38A0FE; + border-bottom: none; + background: white; } + main table th:first-of-type, + main table td:first-of-type { + text-align: right; } + main table th, main table td { + text-align: left; + border-bottom: 1px solid #38A0FE; + padding: 0.7rem 1.4rem; } + main table td:first-of-type, main table th:first-of-type { + border-right: 1px solid #38A0FE; } + main table a.default-value { + display: block; + font-weight: normal; + color: rgba(0, 88, 160, 0.3); + font-size: 0.9em; } + main table a.default-value:hover { + border: none; + color: #0087F7; } + main table td:first-of-type { + font-weight: bold; + color: #0087F7; } + main table th.title { + text-align: center; + padding-top: 2.8rem; + padding-bottom: 2.8rem; } + main table th.title p { + margin-bottom: 0; } + main table td.separator { + font-weight: normal; + text-align: left; + color: #646C7F; } + main table p { + margin: 0; } + @media (max-width: 600px) { + main table table, main table tbody, main table thead, main table tr, main table td, main table th { + display: block; } + main table a.default-value { + display: inline; + margin-left: 0.5em; } + main table td, main table th { + overflow: auto; } + main table td:first-of-type, main table th:first-of-type { + text-align: left; + border-right: none; } + main table td.label { + border-bottom-color: rgba(0, 135, 247, 0.15); } + main table th.title { + padding-top: 1.4rem; + padding-bottom: 1.4rem; } + main table th:not(.title) { + display: none; } } + +footer { + background: #2D3038; + z-index: 5000; + position: relative; + display: block; + padding: 1.4rem 1.4rem 2.8rem 1.4rem; + font-size: 0.9rem; + color: white; } + footer * { + color: white; } + footer a:hover { + border-color: white; } + footer > * { + max-width: 720px; + margin-left: auto; + margin-right: auto; } + @media (min-width: 720px) { + footer .license { + text-align: justify; } } + footer .logo { + margin: 2.8rem 0; + width: 270px; } + +.for-hire { + text-align: center; + padding: 1em 2em; + background: rgba(255, 255, 255, 0.1); + border-radius: 0.3rem; + line-height: 1.5em; } + .for-hire h1 { + padding: 0; + margin: 1.5rem 0 3rem; } + .for-hire h1 img { + max-width: 100%; + height: auto; } diff --git a/src/main/webapp/mail/mail_template.html b/src/main/webapp/mail/mail_template.html index 151e290b..09fca549 100644 --- a/src/main/webapp/mail/mail_template.html +++ b/src/main/webapp/mail/mail_template.html @@ -1,12 +1,12 @@ - - - - -회원가입완료 - - - -${userName}님 회원가입이 완료되었습니다. - - + + + + +회원가입완료 + + + +${userName}님 회원가입이 완료되었습니다. + + \ No newline at end of file diff --git a/target/classes/egovframework/egovProps/globals.properties b/target/classes/egovframework/egovProps/globals.properties deleted file mode 100644 index ae6c9d32..00000000 --- a/target/classes/egovframework/egovProps/globals.properties +++ /dev/null @@ -1,140 +0,0 @@ -#----------------------------------------------------------------------- -# -# globals.properties : \uc2dc\uc2a4\ud15c -# -#----------------------------------------------------------------------- -# 1. key = value \uad6c\uc870\uc785\ub2c8\ub2e4. -# 2. key\uac12\uc740 \uacf5\ubc31\ubb38\uc790\ub97c \ud3ec\ud568\ubd88\uac00, value\uac12\uc740 \uacf5\ubc31\ubb38\uc790\ub97c \uac00\ub2a5 -# 3. key\uac12\uc73c\ub85c \ud55c\uae00\uc744 \uc0ac\uc6a9\ubd88\uac00, value\uac12\uc740 \ud55c\uae00\uc0ac\uc6a9\uc774 \uac00\ub2a5 -# 4. \uc904\uc744 \ubc14\uafc0 \ud544\uc694\uac00 \uc788\uc73c\uba74 '\'\ub97c \ub77c\uc778\uc758 \ub05d\uc5d0 \ucd94\uac00(\ub9cc\uc57d '\'\ubb38\uc790\ub97c \uc0ac\uc6a9\ud574\uc57c \ud558\ub294 \uacbd\uc6b0\ub294 '\\'\ub97c \uc0ac\uc6a9) -# 5. Windows\uc5d0\uc11c\uc758 \ub514\ub809\ud1a0\ub9ac \ud45c\uc2dc : '\\' or '/' ('\' \uc0ac\uc6a9\ud558\uba74 \uc548\ub428) -# 6. Unix\uc5d0\uc11c\uc758 \ub514\ub809\ud1a0\ub9ac \ud45c\uc2dc : '/' -# 7. \uc8fc\uc11d\ubb38 \ucc98\ub9ac\ub294 #\uc0ac\uc6a9 -# 8. value\uac12 \ub4a4\uc5d0 \uc2a4\ud398\uc774\uc2a4\uac00 \uc874\uc7ac\ud558\ub294 \uacbd\uc6b0 \uc11c\ube14\ub9bf\uc5d0\uc11c \ucc38\uc870\ud560\ub54c\ub294 \uc5d0\ub7ec\ubc1c\uc0dd\ud560 \uc218 \uc788\uc73c\ubbc0\ub85c trim()\ud558\uac70\ub098 \ub9c8\uc9c0\ub9c9 \uacf5\ubc31\uc5c6\uc774 properties \uac12\uc744 \uc124\uc815\ud560\uac83 -#----------------------------------------------------------------------- - -# \uc6b4\uc601\uc11c\ubc84 \ud0c0\uc785(WINDOWS, UNIX) -#Globals.OsType = UNIX -Globals.OsType = WINDOWS - -# DB\uc11c\ubc84 \ud0c0\uc785(mysql, oracle, altibase, tibero, cubrid, maria, postgres) - datasource \ubc0f sqlMap \ud30c\uc77c \uc9c0\uc815\uc5d0 \uc0ac\uc6a9\ub428 -#Globals.DbType = mysql -#Globals.DbType = maria - - -# \uad8c\ud55c \uc778\uc99d\ubc29\uc2dd(dummy, session, security) - \uc0ac\uc6a9\uc790\uc758 \ub85c\uadf8\uc778\uc2dc \uc778\uc99d \ubc29\uc2dd\uc744 \uacb0\uc815\ud568 -# dummy : \ub354\ubbf8 \ubc29\uc2dd\uc73c\ub85c \uc0ac\uc6a9\uc790 \uad8c\ud55c\uc744 \uc778\uc99d\ud568 -# session : \uc138\uc158 \ubc29\uc2dd\uc73c\ub85c \uc0ac\uc6a9\uc790 \uad8c\ud55c\uc744 \uc778\uc99d\ud568 -# security : spring security \ubc29\uc2dd\uc73c\ub85c \uc0ac\uc6a9\uc790 \uad8c\ud55c\uc744 \uc778\uc99d\ud568 -Globals.Auth = security - -# MainPage Setting -#Globals.MainPage = /EgovContent.do - - -# \ub85c\uadf8\uc778 \uc778\uc99d \uc81c\ud55c(login authentication limit) -# (\uc0ac\uc6a9 \uc5ec\ubd80 \uc124\uc815\uac12 : true, false) -Globals.login.Lock = true -# -\uc778\uc99d \uc81c\uc2dc\ub3c4 \ud69f\uc218 -Globals.login.LockCount = 5 - -#\ud1b5\ud569\uba54\uc778\uba54\ub274 -#Globals.MainPage = /sym/mnu/mpm/EgovMainMenuHome.do - -# G4C \uc5f0\uacb0\uc6a9 IP (localhost) -#Globals.LocalIp = 127.0.0.2 - -# \ud658\uacbd\ud30c\uc77c \uc704\uce58 -Globals.ShellFilePath = globals.properties -Globals.ServerConfPath = conf/server.properties -Globals.ClientConfPath = conf/client.properties -Globals.FileFormatPath = conf/format.properties -Globals.GPKIConfPath = conf/gpki.properties -Globals.ConfPath = conf -Globals.MailRequestPath = mail/request/ -Globals.MailRResponsePath = mail/response/ -Globals.SMEConfigPath = conf/SMEConfig.properties - -# \ud658\uacbd\ud30c\uc77c \uc704\uce58 (jeus) -#Globals.ShellFilePath = globals.properties -#Globals.ServerConfPath = conf/server.properties -#Globals.ClientConfPath = conf/client.properties -#Globals.FileFormatPath = conf/format.properties -#Globals.GPKIConfPath = conf/gpki.properties -#Globals.ConfPath = conf -#Globals.fileStorePath = -#Globals.MailRequestPath = mail/request/ -#Globals.MailRResponsePath = mail/response/ -#Globals.SMEConfigPath = conf/SMEConfig.properties -#Globals.SynchrnServerPath = tmp/upload/ - -# WINDOWS\uc6a9 \uc258\ud30c\uc77c \uc815\ubcf4 -SHELL.WINDOWS.getHostName = prg/sh_001.bat -SHELL.WINDOWS.getDrctryByOwner = prg/getDrctryByOwner.bat -SHELL.WINDOWS.getDrctryOwner = prg/getDrctryOwner.bat -SHELL.WINDOWS.moveDrctry = prg/moveDrctry.bat -SHELL.WINDOWS.compileSchema = prg/compileSchema.bat -SHELL.WINDOWS.getDiskAttrb = prg/getDiskAttrb.bat -SHELL.WINDOWS.getDiskCpcty = prg/getDiskCpcty.bat -SHELL.WINDOWS.getDiskExst = prg/getDiskExst.bat - -# UNIX\uc6a9 \uc258\ud30c\uc77c \uc815\ubcf4 - \uac1c\ubc1cwas jeus\uc5d0\uc11c \uc0ac\uc6a9\ud560\ub54c \uae30\uc900 -SHELL.UNIX.getHostName = prg/sh_001.sh -SHELL.UNIX.getDrctryByOwner = prg/getDrctryByOwner.sh -SHELL.UNIX.getDrctryOwner = prg/getDrctryOwner.sh -SHELL.UNIX.getDrctryAccess = prg/getDrctryAccess.sh -SHELL.UNIX.getMountLc = prg/getMountLc.sh -SHELL.UNIX.getDiskName = prg/getNetWorkInfo.sh -SHELL.UNIX.moveDrctry = prg/moveDrctry.sh -SHELL.UNIX.compileSchema = prg/compileSchema.sh -SHELL.UNIX.getDiskAttrb = prg/getDiskAttrb.sh -SHELL.UNIX.getDiskCpcty = prg/getDiskCpcty.sh -SHELL.UNIX.getDiskExst = prg/getDiskExst.sh -SHELL.UNIX.getProcInfo = prg/getProcInfo.sh - -# LINUX\uc6a9 \uc258\ud30c\uc77c \uc815\ubcf4 - -# \uc5f0\uacc4 -# \uae30\uad00\ucf54\ub4dc\uc218\uc2e0\uc6a9(\uacbd\ub85c \uc124\uc815\uc740 \ubc18\ub4dc\uc2dc \uc808\ub300\uacbd\ub85c\ub97c \uc0ac\uc6a9\ud574\uc57c\ud568.) -#CNTC.INSTTCODE.DIR.rcv = D:/tmp/test/rcv/ -#CNTC.INSTTCODE.DIR.rcvold = D:/tmp/test/rcvold/ -#CNTC.INSTTCODE.DIR.bin = D:/tmp/test/bin/ -# -#CNTC.INSTTCODE.CMD.edircv = gcc_edircv.bat -#CNTC.INSTTCODE.CMD.edircvmsg = gcc_edircvmsg.bat -# -#CNTC.INSTTCODE.INFO.userid = USERID -#CNTC.INSTTCODE.INFO.userpw = ****** - -# \ud30c\uc77c \uc5c5\ub85c\ub4dc \uacbd\ub85c(\uacbd\ub85c \uc124\uc815\uc740 \ubc18\ub4dc\uc2dc \uc808\ub300\uacbd\ub85c\ub97c \uc0ac\uc6a9\ud574\uc57c\ud568, \uacbd\ub85c \ub4a4\uc5d0 /\ub97c \ubd99\uc5ec \uc8fc\uc5b4\uc57c\ud568.) -Globals.fileStorePath = C:/egovframework/upload/ -# \uc5c5\ub85c\ub4dc URL \uacbd\ub85c \uc554\ud638\ud654 KEY -#Globals.filePath.Encryption.key = 10\uc790\ub9ac\uc774\uc0c1,\uc54c\ud30c\ubcb3 \ubc0f \uc22b\uc790 \ubc0f \ud2b9\uc218\uae30\ud638 \ud63c\uc6a9\ud558\uc5ec \ud0a4\ub97c \uc9c0\uc815\ud55c\ub2e4. -# \ud30c\uc77c \ud655\uc7a5\uc790 \ud654\uc774\ud2b8\ub9ac\uc2a4\ud2b8(\ud5c8\uc6a9\ubaa9\ub85d) : \ud30c\uc77c \ud655\uc7a5\uc790\ub97c (.)\uacfc \ud568\uaed8 \uc5f0\uc774\uc5b4\uc11c \uc0ac\uc6a9\ud568. -Globals.fileUpload.Extensions = .gif.jpg.jpeg.png -Globals.fileDownload.Extensions = .gif.jpg.jpeg.png - -# \ud30c\uc77c \ub3d9\uae30\ud654 \ucef4\ud3ec\ub10c\ud2b8\uc5d0\uc11c \uc0ac\uc6a9\ud560 \ud30c\uc77c \uc5c5\ub85c\ub4dc \uacbd\ub85c(\uacbd\ub85c \uc124\uc815\uc740 \ubc18\ub4dc\uc2dc \uc808\ub300\uacbd\ub85c\ub97c \uc0ac\uc6a9\ud574\uc57c\ud568, \uacbd\ub85c \ub4a4\uc5d0 /\ub97c \ubd99\uc5ec \uc8fc\uc5b4\uc57c\ud568.) -Globals.SynchrnServerPath = C:/egovframework/upload/Synch/ - -# for JFile properties -system.uploadpath = C:/egovframework/upload/ -no.image.url = /resources/jfile/swfupload/images/no_img.gif -ftp.server.ip = 127.0.0.1 -ftp.user.id = test -ftp.user.password = test - -# Social(Facebook, Oauth \ucef4\ud3ec\ub10c\ud2b8 \uc0ac\uc6a9\uc2dc \ud65c\uc6a9) -facebook.appId = -facebook.appSecret = -twitter.consumerKey = -twitter.consumerSecret = - -#LDAP\uc870\uc9c1\ub3c4\uad00\ub9ac \ucef4\ud3ec\ub10c\ud2b8 \uc0ac\uc6a9\uc2dc LDAP\uc11c\ubc84\uc124\uc815\uc815\ubcf4 \ud544\uc694 -ldap.url = ldap://localhost:10389 -ldap.rootDn = c=kr -ldap.username = uid=admin,ou=system -ldap.password = secret - -#\uc57d\ub3c4\uad00\ub9ac Kakao \uac1c\ubc1c\uc790 appkey \ubc1c\uae09 \ubc1b\uc544 \ub4f1\ub85d\ud574\uc11c \uae30\uc785 (\uce74\uce74\uc624\uac1c\ubc1c Dev \uc571\uad00\ub9ac \ub0b4\uc5d0\uc11c \ub3c4\uba54\uc778 \ub4f1\ub85d \ud544\uc694) -roughMap.appkey = b0fdac4f718d71a02d796f8fe3e12987 \ No newline at end of file diff --git a/target/classes/log4j2.xml b/target/classes/log4j2.xml deleted file mode 100644 index da51b57d..00000000 --- a/target/classes/log4j2.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/target/m2e-wtp/web-resources/META-INF/MANIFEST.MF b/target/m2e-wtp/web-resources/META-INF/MANIFEST.MF deleted file mode 100644 index 8880e3c8..00000000 --- a/target/m2e-wtp/web-resources/META-INF/MANIFEST.MF +++ /dev/null @@ -1,5 +0,0 @@ -Manifest-Version: 1.0 -Built-By: JSYOO -Build-Jdk: 1.8.0_291 -Created-By: Maven Integration for Eclipse -