From 9422112e03279faca6a15984bdb81c629d15bf76 Mon Sep 17 00:00:00 2001 From: leebj Date: Tue, 9 Jul 2024 17:40:16 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B3=B5=EC=A7=80=EC=82=AC=ED=95=AD,=20?= =?UTF-8?q?=EB=B6=80=EC=84=9C=EC=84=A4=EC=A0=95=EA=B4=80=EB=A6=AC=20?= =?UTF-8?q?=EC=9E=AC=EC=A1=B0=ED=9A=8C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WEB-INF/jsp/fims/mngt/mngt01010-main.jsp | 20 +++++++---------- .../WEB-INF/jsp/fims/ogdp/ogdp02010-main.jsp | 22 ++++++++----------- 2 files changed, 17 insertions(+), 25 deletions(-) diff --git a/src/main/webapp/WEB-INF/jsp/fims/mngt/mngt01010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/mngt/mngt01010-main.jsp index ba6ad253..0b14898d 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/mngt/mngt01010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/mngt/mngt01010-main.jsp @@ -136,7 +136,7 @@ $(document).ready(function(){ } }); $P.ntcControl.defaultFetchSize = FETCH_XS; - $P.ntcControl.untilPageNum = 0; + $P.ntcControl.beforeCurrent = null; @@ -146,7 +146,7 @@ $(document).ready(function(){ $P.ntcControl.dataset.onDatasetChange = (obj, option) => { var t = $P.getGridTemplate(); var trs = Apply.fromDataset.getTbody($P.ntcControl.dataset, t.found, t.notFound, t.replacer); - $P.renderNtcList(obj["Total"], $P.ntcControl.dataset.length, trs); + $P.renderNtcList(obj["Total"], $P.ntcControl.dataset.length, trs, option); Apply.fromDataset.paging($P.ntcControl.dataset, obj, "ntcPaging--${pageName}"); }; @@ -196,9 +196,7 @@ $(document).ready(function(){ return; } - $P.ntcControl.untilPageNum = $P.ntcControl.query.pageNum; - $P.ntcControl.query.fetchSize = $P.ntcControl.defaultFetchSize * $P.ntcControl.query.pageNum; - $P.ntcControl.load(1); + $P.ntcControl.reload({all : true}); } $P.getGridTemplate = () => { @@ -215,20 +213,18 @@ $(document).ready(function(){ }; } - $P.renderNtcList = (total, listLength, trs) => { + $P.renderNtcList = (total, listLength, trs, option) => { let noMore = (listLength >= total); - var initScroll = ($P.ntcControl.query.pageNum < 2) && ($P.ntcControl.untilPageNum == 0); + var initScroll = ($P.ntcControl.query.pageNum < 2); + if(option != null && option.reloaded){ + initScroll = false; + } $("#table-responsive--${pageName}")[0].changeContent(trs, initScroll, noMore); fn_securityModeToggle($("#securityMode--top").is(":checked")); //보안모드 - if($P.ntcControl.untilPageNum != 0){ - $P.ntcControl.query.fetchSize = $P.ntcControl.defaultFetchSize; - $P.ntcControl.query.pageNum = $P.ntcControl.untilPageNum; - $P.ntcControl.untilPageNum = 0; - } } $P.clickNtcList = (dataKey) => { diff --git a/src/main/webapp/WEB-INF/jsp/fims/ogdp/ogdp02010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/ogdp/ogdp02010-main.jsp index dac4a7b2..66428e5c 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/ogdp/ogdp02010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/ogdp/ogdp02010-main.jsp @@ -166,7 +166,7 @@ $(document).ready(function(){ } }); $P.deptControl.defaultFetchSize = FETCH_XS; - $P.deptControl.untilPageNum = 0; + $P.deptControl.beforeCurrent = null; @@ -176,7 +176,7 @@ $(document).ready(function(){ $P.deptControl.dataset.onDatasetChange = (obj, option) => { var t = $P.getGridTemplate(); var trs = Apply.fromDataset.getTbody($P.deptControl.dataset, t.found, t.notFound, t.replacer); - $P.renderDeptList(obj["Total"], $P.deptControl.dataset.length, trs); + $P.renderDeptList(obj["Total"], $P.deptControl.dataset.length, trs, option); Apply.fromDataset.paging($P.deptControl.dataset, obj, "deptPaging--${pageName}"); }; @@ -226,10 +226,8 @@ $(document).ready(function(){ if($P.deptControl.query.pageNum == null){ return; } - - $P.deptControl.untilPageNum = $P.deptControl.query.pageNum; - $P.deptControl.query.fetchSize = $P.deptControl.defaultFetchSize * $P.deptControl.query.pageNum; - $P.deptControl.load(1); + + $P.deptControl.reload({all : true}); } $P.getGridTemplate = () => { @@ -246,20 +244,18 @@ $(document).ready(function(){ }; } - $P.renderDeptList = (total, listLength, trs) => { + $P.renderDeptList = (total, listLength, trs, option) => { let noMore = (listLength >= total); - var initScroll = ($P.deptControl.query.pageNum < 2) && ($P.deptControl.untilPageNum == 0); + var initScroll = ($P.deptControl.query.pageNum < 2); + if(option != null && option.reloaded){ + initScroll = false; + } $("#table-responsive--${pageName}")[0].changeContent(trs, initScroll, noMore); fn_securityModeToggle($("#securityMode--top").is(":checked")); //보안모드 - if($P.deptControl.untilPageNum != 0){ - $P.deptControl.query.fetchSize = $P.deptControl.defaultFetchSize; - $P.deptControl.query.pageNum = $P.deptControl.untilPageNum; - $P.deptControl.untilPageNum = 0; - } } $P.clickDeptList = (dataKey) => {