From 7c4b3cf0dcd910b31f7e992d6a8462f548067758 Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Tue, 11 Jul 2023 16:55:51 +0900 Subject: [PATCH] =?UTF-8?q?=EB=8B=A8=EC=86=8D=EA=B4=80=EB=A6=AC=20?= =?UTF-8?q?=ED=99=94=EB=A9=B4=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/crdn/crdn06010-main.jsp | 165 ++++++------------ 1 file changed, 53 insertions(+), 112 deletions(-) diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06010-main.jsp index 266f7bcc..c6db3796 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06010-main.jsp @@ -142,125 +142,52 @@ style="overflow-x: scroll;height:400px;overflow-y: scroll;"> - - + + + + + @@ -374,8 +301,13 @@ $(document).ready(function(){ if(!searchOption) searchOption = ""; $("#searchByTaskArea--${pageName}").html(searchOption); - var cols = document.getElementById("crdnCols--${pageName}").content.querySelector("."+cssForTask).outerHTML; - $("#crdnThead--${pageName}").html(cols); + var colsContent = document.getElementById("crdnCols--${pageName}").content; + var cols = $(colsContent).find("."+cssForTask); + var colsStr = ""; + cols.each(function(){ + colsStr += this.outerHTML; + }); + $("#crdnThead--${pageName}").html(colsStr); } $P.searchCrdnList = () => { @@ -413,7 +345,16 @@ $(document).ready(function(){ var empty = crdnList.empty; var cssForTask = $("#frmSearch--${pageName} [name='taskSeCd']:checked").val().toLowerCase(); var notFound = [document.getElementById("crdnNotFound--${pageName}").content.querySelector("."+cssForTask).outerHTML]; - var found = document.getElementById("crdnRow--${pageName}").content.querySelector("."+cssForTask).outerHTML; + var foundContent = document.getElementById("crdnRow--${pageName}").content; + var foundTr = $(foundContent).find("tr")[0].cloneNode(false); + var foundTds = $(foundContent).find("."+cssForTask); + + foundTds.each(function(){ + foundTr.appendChild(this.cloneNode(true)); + }); + + var found = foundTr.outerHTML; + var replacer = (str, dataItem) => str .replace(/{onclick}/gi, "pageObject['${pageName}'].clickCrdnList('" + dataItem.getValue("CRDN_ID") + "');") .replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickCrdnList('" + dataItem.getValue("CRDN_ID") + "');");