공통 JS src/main/webapp/publish/js/urlUtils.js src/main/webapp/publish/js/dateUtils.js
src/main/webapp/publish/js/dateUtils.js
@082070c424799648b4084d20232b3176798f578b
--- src/main/webapp/publish/js/dateUtils.js
+++ src/main/webapp/publish/js/dateUtils.js
... | ... | @@ -1,7 +1,27 @@ |
| 1 |
-$(document).ready(function () {
|
|
| 1 |
+/** |
|
| 2 |
+ * 날짜관련 |
|
| 3 |
+ * @author 이호영 |
|
| 4 |
+ * @since 2024.07.15 |
|
| 5 |
+ * @version 1.0 |
|
| 6 |
+ * @see |
|
| 7 |
+ * |
|
| 8 |
+ * <pre> |
|
| 9 |
+ * << 개정이력(Modification Information) >> |
|
| 10 |
+ * |
|
| 11 |
+ * 수정일 수정자 수정내용 |
|
| 12 |
+ * ---------- -------- --------------------------- |
|
| 13 |
+ * 2024.07.15 이호영 최초 생성 |
|
| 14 |
+ * 2020.xx.xx |
|
| 15 |
+ * </pre> |
|
| 16 |
+ */ |
|
| 2 | 17 |
|
| 3 |
-}); |
|
| 4 |
- |
|
| 18 |
+/** |
|
| 19 |
+ * 검색 날짜관련 ID와 체크할 월을 가지고 체크하는 function |
|
| 20 |
+ * @param {String} a 검색 시작 ID
|
|
| 21 |
+ * @param {String} b 검색 종료 ID
|
|
| 22 |
+ * @param {String} c 체크할 month
|
|
| 23 |
+ * @returns {Boolean} a날짜와 b날짜를 비교해서 c월 이상이면 false 이하면 true
|
|
| 24 |
+ */ |
|
| 5 | 25 |
function fn_G_cmndataValueChk(startId, endId, chkMonth) {
|
| 6 | 26 |
// 시작일자와 종료일자를 가져오기 |
| 7 | 27 |
var startDate = document.getElementById(startId).value; |
+++ src/main/webapp/publish/js/urlUtils.js
... | ... | @@ -0,0 +1,36 @@ |
| 1 | +/** | |
| 2 | + * URL 관련 팝업 | |
| 3 | + * @author 이호영 | |
| 4 | + * @since 2024.07.15 | |
| 5 | + * @version 1.0 | |
| 6 | + * @see | |
| 7 | + * | |
| 8 | + * <pre> | |
| 9 | + * << 개정이력(Modification Information) >> | |
| 10 | + * | |
| 11 | + * 수정일 수정자 수정내용 | |
| 12 | + * ---------- -------- --------------------------- | |
| 13 | + * 2024.07.15 이호영 최초 생성 | |
| 14 | + * 2020.xx.xx | |
| 15 | + * </pre> | |
| 16 | + */ | |
| 17 | + | |
| 18 | + | |
| 19 | +/** | |
| 20 | + * url의 마지막 / 다음 정보만 가져오기 | |
| 21 | + * @returns {String} (예시)http://localhost:8080/web/kakao/sent/selectKakaoSentView.do | |
| 22 | + * 위 url에서 selectKakaoSentView.do 이 부분만 가져온다. | |
| 23 | + */ | |
| 24 | +function fn_G_getLastUrlSegment(){ | |
| 25 | + // 전체 경로 가져오기 | |
| 26 | + const pathname = window.location.pathname; | |
| 27 | + | |
| 28 | + // 경로를 '/'로 분할하여 배열로 만들기 | |
| 29 | + const pathSegments = pathname.split('/'); | |
| 30 | + | |
| 31 | + // 배열의 마지막 요소 가져오기 | |
| 32 | + const lastSegment = pathSegments.pop() || pathSegments.pop(); | |
| 33 | + | |
| 34 | + return lastSegment; | |
| 35 | +} | |
| 36 | + |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?