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", "");