From eb33a3e5b2884d7ab53f5e6a550aa1e2868f341d Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Fri, 7 Jul 2023 10:01:58 +0900 Subject: [PATCH] =?UTF-8?q?=EC=86=8C=EC=8A=A4=20=EC=A0=95=EB=A6=AC(?= =?UTF-8?q?=EC=8A=A4=ED=81=AC=EB=A1=A4=20=EC=B2=98=EB=A6=AC=20=ED=95=A8?= =?UTF-8?q?=EC=88=98)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WEB-INF/jsp/fims/crdn/crdn01010-main.jsp | 22 +++++++------- .../WEB-INF/jsp/fims/crdn/crdn01030-main.jsp | 22 +++++++------- .../WEB-INF/jsp/fims/crdn/crdn05010-main.jsp | 22 +++++++------- .../WEB-INF/jsp/fims/crdn/crdn06010-main.jsp | 22 +++++++------- .../WEB-INF/jsp/fims/crdn/crdn06020-main.jsp | 30 +++++++++---------- .../WEB-INF/jsp/fims/crdn/crdn06030-main.jsp | 21 +++++++------ .../WEB-INF/jsp/fims/crdn/crdn06040-main.jsp | 21 +++++++------ 7 files changed, 87 insertions(+), 73 deletions(-) diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01010-main.jsp index c18b332a..2ea7f314 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01010-main.jsp @@ -199,6 +199,17 @@ $(document).ready(function(){ $P.crdnControl.load(1); } + $P.scrollEnd = (obj) => { + var el = $(obj); + if(el.scrollTop() == 0){ + return; + } + + if((el[0].scrollHeight - el.scrollTop() + VERTICAL_SCROLL_HEIGHT) == el.outerHeight()){ + $P.scrollCrdnList(); + } + } + $P.scrollCrdnList = () => { $P.crdnControl.load($P.crdnControl.query.pageNum + 1); } @@ -241,16 +252,7 @@ $(document).ready(function(){ **************************************************************************/ $('#btnReset--${pageName}').on('click', () => $P.fnReset()); $('#btnSearch--${pageName}').on('click', () => $P.searchCrdnList()); - $("#table-responsive--${pageName}").scroll(function(){ - var el = $(this); - if(el.scrollTop() == 0){ - return; - } - - if((el[0].scrollHeight - el.scrollTop() + VERTICAL_SCROLL_HEIGHT) == el.outerHeight()){ - $P.scrollCrdnList(); - } - }); + $("#table-responsive--${pageName}").scroll(function(){ $P.scrollEnd(this); }); /************************************************************************** * 초기화 diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01030-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01030-main.jsp index a7820f0a..267e089d 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01030-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01030-main.jsp @@ -205,6 +205,17 @@ $(document).ready(function(){ $P.crdnControl.load(1); } + $P.scrollEnd = (obj) => { + var el = $(obj); + if(el.scrollTop() == 0){ + return; + } + + if((el[0].scrollHeight - el.scrollTop() + VERTICAL_SCROLL_HEIGHT) == el.outerHeight()){ + $P.scrollCrdnList(); + } + } + $P.scrollCrdnList = () => { $P.crdnControl.load($P.crdnControl.query.pageNum + 1); } @@ -248,16 +259,7 @@ $(document).ready(function(){ $('#btnReset--${pageName}').on('click', () => $P.fnReset()); $('#btnSearch--${pageName}').on('click', () => $P.searchCrdnList()); - $("#table-responsive--${pageName}").scroll(function(){ - var el = $(this); - if(el.scrollTop() == 0){ - return; - } - - if((el[0].scrollHeight - el.scrollTop() + VERTICAL_SCROLL_HEIGHT) == el.outerHeight()){ - $P.scrollCrdnList(); - } - }); + $("#table-responsive--${pageName}").scroll(function(){ $P.scrollEnd(this); }); /************************************************************************** * 초기화 diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05010-main.jsp index 02b33ec3..df711eb3 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05010-main.jsp @@ -181,6 +181,17 @@ $(document).ready(function(){ $P.crdnControl.load(1); } + $P.scrollEnd = (obj) => { + var el = $(obj); + if(el.scrollTop() == 0){ + return; + } + + if((el[0].scrollHeight - el.scrollTop() + VERTICAL_SCROLL_HEIGHT) == el.outerHeight()){ + $P.scrollCrdnList(); + } + } + $P.scrollCrdnList = () => { $P.crdnControl.load($P.crdnControl.query.pageNum + 1); } @@ -231,16 +242,7 @@ $(document).ready(function(){ $('#btnReset--${pageName}').on('click', () => $P.fnReset()); $("#btnInsertByFile--${pageName}").on('click', () => { $P.crdnControl.newInfo("file"); }); $("#btnInsertByHand--${pageName}").on('click', () => { $P.crdnControl.newInfo("hand"); }); - $("#table-responsive--${pageName}").scroll(function(){ - var el = $(this); - if(el.scrollTop() == 0){ - return; - } - - if((el[0].scrollHeight - el.scrollTop() + VERTICAL_SCROLL_HEIGHT) == el.outerHeight()){ - $P.scrollCrdnList(); - } - }); + $("#table-responsive--${pageName}").scroll(function(){ $P.scrollEnd(this); }); /************************************************************************** * 초기화 diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06010-main.jsp index 4f12906a..527a6598 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06010-main.jsp @@ -383,6 +383,17 @@ $(document).ready(function(){ $P.crdnControl.load(1); } + $P.scrollEnd = (obj) => { + var el = $(obj); + if(el.scrollTop() == 0){ + return; + } + + if((el[0].scrollHeight - el.scrollTop() + VERTICAL_SCROLL_HEIGHT) == el.outerHeight()){ + $P.scrollCrdnList(); + } + } + $P.scrollCrdnList = () => { $P.crdnControl.load($P.crdnControl.query.pageNum + 1); } @@ -425,16 +436,7 @@ $(document).ready(function(){ **************************************************************************/ $('#btnReset--${pageName}').on('click', () => $P.fnReset()); $('#btnSearch--${pageName}').on('click', () => $P.searchCrdnList()); - $("#table-responsive--${pageName}").scroll(function(){ - var el = $(this); - if(el.scrollTop() == 0){ - return; - } - - if((el[0].scrollHeight - el.scrollTop() + VERTICAL_SCROLL_HEIGHT) == el.outerHeight()){ - $P.scrollCrdnList(); - } - }); + $("#table-responsive--${pageName}").scroll(function(){ $P.scrollEnd(this); }); /************************************************************************** * 초기화 diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06020-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06020-main.jsp index ab614dde..8659bc62 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06020-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06020-main.jsp @@ -468,6 +468,17 @@ $(document).ready(function(){ $P.sameVehicleControl.sub.load(0); } + $P.scrollEnd = (obj) => { + var el = $(obj); + if(el.scrollTop() == 0){ + return; + } + + if((el[0].scrollHeight - el.scrollTop() + VERTICAL_SCROLL_HEIGHT) == el.outerHeight()){ + $P.scrollInspectionDataList(); + } + } + $P.scrollInspectionDataList = () => { switch ($P.currentDisplay) { case "photoInspection": @@ -581,22 +592,11 @@ $(document).ready(function(){ }); $('#btnSearch--${pageName}').on('click', () => $P.searchInspectionList()); //검색버튼 + //스크롤 이벤트 추가(사진검사) - $("#photoInspection-responsive--${pageName}").scroll(function(){ - var el = $(this); - if(el.scrollTop() == 0){ return; } - if((el[0].scrollHeight - el.scrollTop() + VERTICAL_SCROLL_HEIGHT) == el.outerHeight()){ - $P.scrollInspectionDataList(); - } - }); - //스크롤 이벤트 추가(동일차량검사) - $("#sameVehicleInspectionMain-responsive--${pageName}").scroll(function(){ - var el = $(this); - if(el.scrollTop() == 0){ return; } - if((el[0].scrollHeight - el.scrollTop() + VERTICAL_SCROLL_HEIGHT) == el.outerHeight()){ - $P.scrollInspectionDataList(); - } - }); + $("#photoInspection-responsive--${pageName}").scroll(function(){ $P.scrollEnd(this); }); + //스크롤 이벤트 추가(동일차량검사) + $("#sameVehicleInspectionMain-responsive--${pageName}").scroll(function(){ $P.scrollEnd(this); }); /************************************************************************** * 초기화 diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06030-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06030-main.jsp index 3864edd9..868af3c3 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06030-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06030-main.jsp @@ -170,6 +170,17 @@ $(document).ready(function(){ $P.crdnControl.load(1); } + $P.scrollEnd = (obj) => { + var el = $(obj); + if(el.scrollTop() == 0){ + return; + } + + if((el[0].scrollHeight - el.scrollTop() + VERTICAL_SCROLL_HEIGHT) == el.outerHeight()){ + $P.scrollCrdnList(); + } + } + $P.scrollCrdnList = () => { $P.crdnControl.load($P.crdnControl.query.pageNum + 1); } @@ -222,15 +233,7 @@ $(document).ready(function(){ **************************************************************************/ $('#btnReset--${pageName}').on('click', () => $P.fnReset()); $('#btnSearch--${pageName}').on('click', () => $P.searchCrdnList()); - $("#table-responsive--${pageName}").scroll(function(){ - var el = $(this); - if(el.scrollTop() == 0){ - return; - } - if((el[0].scrollHeight - el.scrollTop() + VERTICAL_SCROLL_HEIGHT) == el.outerHeight()){ - $P.scrollCrdnList(); - } - }); + $("#table-responsive--${pageName}").scroll(function(){ $P.scrollEnd(this); }); $('#btnUpdateToConfirmData--${pageName}').on('click', () => { if(!$P.crdnControl.getCurrent()) { diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06040-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06040-main.jsp index d91351e4..7bac519e 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06040-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06040-main.jsp @@ -191,6 +191,17 @@ $(document).ready(function(){ $P.crdnControl.load(1); } + $P.scrollEnd = (obj) => { + var el = $(obj); + if(el.scrollTop() == 0){ + return; + } + + if((el[0].scrollHeight - el.scrollTop() + VERTICAL_SCROLL_HEIGHT) == el.outerHeight()){ + $P.scrollCrdnList(); + } + } + $P.scrollCrdnList = () => { $P.crdnControl.load($P.crdnControl.query.pageNum + 1); } @@ -235,15 +246,7 @@ $(document).ready(function(){ **************************************************************************/ $('#btnReset--${pageName}').on('click', () => $P.fnReset()); $('#btnSearch--${pageName}').on('click', () => $P.searchCrdnList()); - $("#table-responsive--${pageName}").scroll(function(){ - var el = $(this); - if(el.scrollTop() == 0){ - return; - } - if((el[0].scrollHeight - el.scrollTop() + VERTICAL_SCROLL_HEIGHT) == el.outerHeight()){ - $P.scrollCrdnList(); - } - }); + $("#table-responsive--${pageName}").scroll(function(){ $P.scrollEnd(this); }); /************************************************************************** * 초기화