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