From 87148db0306135dc1ce7cdfded4c133aa3700189 Mon Sep 17 00:00:00 2001 From: leebj Date: Fri, 2 Aug 2024 12:36:46 +0900 Subject: [PATCH] no message --- .../WEB-INF/jsp/fims/crdn/crdn05010-main.jsp | 2 +- .../resources/js/fims/cmmn/fims-cmmnUtil.js | 24 +++++++++++++------ 2 files changed, 18 insertions(+), 8 deletions(-) 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 c2cc5403..ac790c4a 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 @@ -240,7 +240,7 @@ $(document).ready(function(){ } $("#crdnTbody--${pageName}").setCurrentRow(dataKey); - $P.ctrl.dataset.setCurrent(dataKey); + Apply.toDataset.current($P.ctrl.dataset, dataKey); } diff --git a/src/main/webapp/resources/js/fims/cmmn/fims-cmmnUtil.js b/src/main/webapp/resources/js/fims/cmmn/fims-cmmnUtil.js index 68d714b9..8a0f1dac 100644 --- a/src/main/webapp/resources/js/fims/cmmn/fims-cmmnUtil.js +++ b/src/main/webapp/resources/js/fims/cmmn/fims-cmmnUtil.js @@ -1,14 +1,24 @@ /************************************************************************** * 그리드 row 선택 **************************************************************************/ -function setCurrentRow(tdElement){ - let tr = tdElement.parentElement; - let tbody = tr.parentElement; - - for (let sibling of tdElement.parentNode.children) { - sibling.classList.remove('current-row'); +function setCurrentRow(et){ + if(et instanceof HTMLTableCellElement){ + let tr = et.parentElement; + let tbody = tr.parentElement; + + for (let sibling of tdElement.parentNode.children) { + sibling.classList.remove('current-row'); + } + tr.classList.add('current-row'); + } else if(et instanceof HTMLTableRowElement){ + let tr = et; + let tbody = tr.parentElement; + + for (let sibling of tdElement.parentNode.children) { + sibling.classList.remove('current-row'); + } + tr.classList.add('current-row'); } - tr.classList.add('current-row'); } /**************************************************************************