From b222e177576581825afb875325faeac2194de6ba Mon Sep 17 00:00:00 2001 From: leebj Date: Tue, 20 Aug 2024 15:55:42 +0900 Subject: [PATCH] =?UTF-8?q?=EC=86=8C=EC=8A=A4=20=EC=A0=95=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/js/fims/cmmn/fims-cmmnUtil.js | 55 +++++++++---------- 1 file changed, 25 insertions(+), 30 deletions(-) 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 fc99955c..4c8aa5e0 100644 --- a/src/main/webapp/resources/js/fims/cmmn/fims-cmmnUtil.js +++ b/src/main/webapp/resources/js/fims/cmmn/fims-cmmnUtil.js @@ -61,31 +61,6 @@ class DoctxFinder extends EventTarget { } } -/************************************************************************** -* 그리드 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'); - } -} - - - /************************************************************************** * jquery.fn 커스텀 - UI요소 값 세팅 @@ -116,6 +91,9 @@ $.fn.set = function(value) { }); } +/************************************************************************** +* Dataset 관련 적용 기능 +**************************************************************************/ const Apply = { fromDatasetControl : { load : async function(control, pageNum){ @@ -235,8 +213,29 @@ const Apply = { }; - +/************************************************************************** +* 그리드 관련 기능 +**************************************************************************/ const GRID = { + setCurrentRow : function(evTarget){ + if(evTarget instanceof HTMLTableCellElement){ + let tr = evTarget.parentElement; + let tbody = tr.parentElement; + + for (let sibling of tdElement.parentNode.children) { + sibling.classList.remove('current-row'); + } + tr.classList.add('current-row'); + } else if(evTarget instanceof HTMLTableRowElement){ + let tr = evTarget; + let tbody = tr.parentElement; + + for (let sibling of tdElement.parentNode.children) { + sibling.classList.remove('current-row'); + } + tr.classList.add('current-row'); + } + }, checkbox : { sync : function(checkboxElement, bool){ var parentEl = $(checkboxElement).parent()[0]; @@ -317,7 +316,3 @@ const GRID = { } } }; - - - -