From 3bacda31b115a0145fc33855ed1a067cbe0360c9 Mon Sep 17 00:00:00 2001 From: leebj Date: Tue, 6 Aug 2024 14:28:34 +0900 Subject: [PATCH] =?UTF-8?q?=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../webapp/resources/js/fims/cmmn/searchUtil.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/main/webapp/resources/js/fims/cmmn/searchUtil.js b/src/main/webapp/resources/js/fims/cmmn/searchUtil.js index a7f1a367..8d2add6c 100644 --- a/src/main/webapp/resources/js/fims/cmmn/searchUtil.js +++ b/src/main/webapp/resources/js/fims/cmmn/searchUtil.js @@ -3,8 +3,9 @@ **************************************************************************/ function searchFromGridTitle(byValue, byOutputValue, mainOption, subOption){ var tr = event.target.parentElement; - - if($(tr).attr("data-search-target").length < 1){ + + if($(tr).attr("data-search-target") == null || $(tr).attr("data-search-target") == ""){ + var trDataset = tr.dataset; var byElementId = trDataset.by; @@ -18,11 +19,11 @@ function searchFromGridTitle(byValue, byOutputValue, mainOption, subOption){ document.getElementById(mainOptionElementId).value = mainOption; document.getElementById(subOptionElementId).value = subOption; } else { - - let byEl = $($(tr).attr("data-search-target")).find("[name='by']"); - let byOutputEl = $($(tr).attr("data-search-target")).find("[name='byOutput']"); - let mainOptionEl = $($(tr).attr("data-search-target")).find("[name='mainOption']"); - let subOptionEl = $($(tr).attr("data-search-target")).find("[name='subOption']"); + + let byEl = $($(tr).attr("data-search-target")).find("[name='by']")[0]; + let byOutputEl = $($(tr).attr("data-search-target")).find("[name='byOutput']")[0]; + let mainOptionEl = $($(tr).attr("data-search-target")).find("[name='mainOption']")[0]; + let subOptionEl = $($(tr).attr("data-search-target")).find("[name='subOption']")[0]; byEl.value = snakeToCamel(byValue); byOutputEl.value = byOutputValue;