From 19854711a98fdcbb134e510fd4a36be87976a618 Mon Sep 17 00:00:00 2001 From: leebj Date: Fri, 14 Jun 2024 17:57:08 +0900 Subject: [PATCH] =?UTF-8?q?getCellDefs=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/webapp/resources/applib/js/cmmnUtil.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/main/webapp/resources/applib/js/cmmnUtil.js b/src/main/webapp/resources/applib/js/cmmnUtil.js index 1278b89..7d6f96a 100644 --- a/src/main/webapp/resources/applib/js/cmmnUtil.js +++ b/src/main/webapp/resources/applib/js/cmmnUtil.js @@ -355,27 +355,28 @@ function isEmail(str) { /************************************************************************** * 엑셀 파일 작성 정보 생성 **************************************************************************/ -function getCellDefs($th, $td){ +function getCellDefs($ths, $tds, fieldGetterOption){ var cellDefs = []; - for(var i=0; i < $th.length; i++){ + for(var i=0; i < $ths.length; i++){ - var label = $th.eq(i).text(); + var label = $ths.eq(i).text(); label = label.replace("\n", ""); label = label.replace("\t", ""); label = label.replace(" ", ""); if(label != ""){ - var width = $th.eq(i).outerWidth(); + var width = $ths.eq(i).outerWidth(); width = Math.ceil(width/10) + 2; var field = ""; - if($td.eq(i).hasClass("privacy-cell")){ - field = $td.eq(i).find("span:eq(0)").text(); + if(fieldGetterOption != null){ + field = fieldGetterOption($tds.eq(i)); } else { - field = $td.eq(i).text(); + field = $tds.eq(i).text(); } + field = field.replace("{", ""); field = field.replace("}", ""); field = field.replace("\n", "");