From 5b633f13fa82e8fbffd409a37d7715080ee45807 Mon Sep 17 00:00:00 2001 From: leebj Date: Wed, 21 Aug 2024 13:55:53 +0900 Subject: [PATCH] =?UTF-8?q?datepicker=20=EA=B4=80=EB=A0=A8=20=EC=9E=90?= =?UTF-8?q?=EB=B0=94=EC=8A=A4=ED=81=AC=EB=A6=BD=ED=8A=B8=20=EC=86=8C?= =?UTF-8?q?=EC=8A=A4=20=EB=A6=AC=ED=8C=A9=ED=86=A0=EB=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../webapp/resources/applib/js/app-support.js | 41 +++++++++++++++++++ .../resources/applib/js/initAfterPageLoad.js | 28 ------------- 2 files changed, 41 insertions(+), 28 deletions(-) create mode 100644 src/main/webapp/resources/applib/js/app-support.js delete mode 100644 src/main/webapp/resources/applib/js/initAfterPageLoad.js diff --git a/src/main/webapp/resources/applib/js/app-support.js b/src/main/webapp/resources/applib/js/app-support.js new file mode 100644 index 0000000..122d209 --- /dev/null +++ b/src/main/webapp/resources/applib/js/app-support.js @@ -0,0 +1,41 @@ +class AppSupport { + + static help(){ + console.log("initDatepicker(초기화영역) : 특정 영역의 datepicker를 초기화한다."); + console.log("initDetailSearchButton(초기화영역) : 특정 영역의 상세조회 버튼을 초기화한다."); + } + + /************************************************************************** + * 특정 영역의 datepicker를 초기화한다. + **************************************************************************/ + static initDatepicker(elementEl){ + var executionArea; + if(typeof elementEl == "string"){ + executionArea = $("#"+elementEl); + } else { + executionArea = $(elementEl); + } + + executionArea.find(".form-date").datePicker(); + } + + /************************************************************************** + * 특정 영역의 상세조회 버튼을 초기화한다. + **************************************************************************/ + static initDetailSearchButton(elementId){ + + var executionArea; + if(typeof elementId == "string"){ + executionArea = $("#"+elementId); + } else { + executionArea = $(elementId); + } + + /*--------------------- 상세검색 버튼 제어 ---------------------*/ + executionArea.find(".btn-open-detail").on("click", function() { + $(this).find('i').toggleClass('bx-chevron-down'); + $(this).find('i').toggleClass('bx-chevron-up'); + }); + + } +} \ No newline at end of file diff --git a/src/main/webapp/resources/applib/js/initAfterPageLoad.js b/src/main/webapp/resources/applib/js/initAfterPageLoad.js deleted file mode 100644 index f58ceda..0000000 --- a/src/main/webapp/resources/applib/js/initAfterPageLoad.js +++ /dev/null @@ -1,28 +0,0 @@ -function initDatepicker(elementId){ - var executionArea; - if(typeof elementId == "string"){ - executionArea = $("#"+elementId); - } else { - executionArea = $(elementId); - } - - executionArea.find(".form-date").datePicker(); - -} - -function initDetailSearchButton(elementId){ - - var executionArea; - if(typeof elementId == "string"){ - executionArea = $("#"+elementId); - } else { - executionArea = $(elementId); - } - - /*--------------------- 상세검색 버튼 제어 ---------------------*/ - executionArea.find(".btn-open-detail").on("click", function() { - $(this).find('i').toggleClass('bx-chevron-down'); - $(this).find('i').toggleClass('bx-chevron-up'); - }); - -} \ No newline at end of file