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 = { } } }; - - - -