From fa2ea7ccdc70177d7664c2a1c4b36223b91c6e79 Mon Sep 17 00:00:00 2001 From: hylee Date: Tue, 10 Sep 2024 16:09:43 +0900 Subject: [PATCH] =?UTF-8?q?=ED=83=80=EB=B8=94=EB=A0=88=EC=9D=B4=ED=84=B0?= =?UTF-8?q?=EC=99=80=20=ED=83=80=EC=9D=B4=ED=8B=80=20=EA=B0=84=EA=B2=A9=20?= =?UTF-8?q?=EB=A7=9E=EC=B6=94=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jsp/web/addr/include/addrListforExcel.jsp | 23 +----- src/main/webapp/js/web/addr/init.js | 80 ++++++++++++------- src/main/webapp/publish/css/popupLayer.css | 8 +- 3 files changed, 58 insertions(+), 53 deletions(-) diff --git a/src/main/webapp/WEB-INF/jsp/web/addr/include/addrListforExcel.jsp b/src/main/webapp/WEB-INF/jsp/web/addr/include/addrListforExcel.jsp index 86aaf5d5..4373bb9f 100644 --- a/src/main/webapp/WEB-INF/jsp/web/addr/include/addrListforExcel.jsp +++ b/src/main/webapp/WEB-INF/jsp/web/addr/include/addrListforExcel.jsp @@ -83,31 +83,10 @@ $(document).ready(function(){ excelFileChange(fileInfo[0]); } else { fn_loadRemoveActive(); // 파일이 선택되지 않은 경우 로딩 상태 제거 - setTimeout(() => { $(this).val(''); }, 0); // 파일 선택 초기화 + $(this).val(''); // 파일 선택 초기화 } }); - // 타뷸레이터 width값 변경 시 위에 select width 값 변경 - setTimeout(function(){ - $(".tabulator-col-resize-handle").on("mousedown",function(){ - $(this).on("mousemove",function(){ - //console.log("d") - var colWid = $(this).prev(".tabulator-col-sorter-element").width(); - var colIdx = $(this).prev(".tabulator-col-sorter-element").index(); - colIdx = colIdx / 2; - colIdx = colIdx - 1; - - if(titleIndex != 0){ - $(".select_adr_hd div").eq(colIdx).width(colWid); - console.log("d1") - }else{ - console.log("a1") - $(".select_adr_hd div").eq(0).width(colWid+40); - } - }) - }) - }) - //받는사람 오류번호 삭제 처리해주기 $('.chkVali_del').click(function(){ diff --git a/src/main/webapp/js/web/addr/init.js b/src/main/webapp/js/web/addr/init.js index c4d18648..c9250a2d 100644 --- a/src/main/webapp/js/web/addr/init.js +++ b/src/main/webapp/js/web/addr/init.js @@ -60,33 +60,6 @@ $(document).ready(function(){ }, }); - // 타뷸레이터 width값 변경 시 위에 select width 값 변경 - var titleArray = ["A","B","C","D","E","F","G"]; - - $tableExcel.on("columnWidth",function(column){ - //console.log(column._column.element) - //console.log(column._column.width) - //console.log(column._column.definition.title) - var titleIndex = titleArray.indexOf(column._column.definition.title); - titleIndex += 1; - console.log(titleIndex) - if(titleIndex != 0){ - $('.select_adr_hd>div').eq(titleIndex).css('width', column._column.width); - console.log("d") - }else{ - console.log("a") - $('.select_adr_hd>div').eq(0).css('width', column._column.width + 40); - } - }); - - $tableExcel.on("scrollHorizontal",function(left){ - $(".adr_excel").scrollLeft(left); - }) - - - $(".adr_excel").on("scroll",function(){ - $(".tabulator-tableholder").scrollLeft($(this).scrollLeft()); - }); @@ -239,3 +212,56 @@ function fn_selfmakeTable(){ navigation: true // 키보드 탐색 활성화 }); } + + + + + +// 타뷸레이터 width값 변경 시 위에 select width 값 변경 +var titleArray = ["A","B","C","D","E","F","G"]; + +$tableExcel.on("columnWidth",function(column){ + var titleIndex = titleArray.indexOf(column._column.definition.title); + titleIndex += 1; + console.log(titleIndex) + if(titleIndex != 0){ + $('.tableExcel .select_adr_hd>div').eq(titleIndex).css('width', column._column.width); + console.log("d") + }else{ + console.log("a") + $('.tableExcel .select_adr_hd>div').eq(0).css('width', column._column.width + 40); + } +}); + +$tableExcel.on("scrollHorizontal",function(left){ + $(".tableExcel .adr_excel").scrollLeft(left); +}) + + +$(".tableExcel .adr_excel").on("scroll",function(){ + $(".tableExcel .tabulator-tableholder").scrollLeft($(this).scrollLeft()); +}); + + + + +$tableClip.on("columnWidth",function(column){ + var titleIndex = titleArray.indexOf(column._column.definition.title); + titleIndex += 1; + console.log(titleIndex) + if(titleIndex != 0){ + $('.tableClip .select_adr_hd>div').eq(titleIndex).css('width', column._column.width); + console.log("d") + }else{ + console.log("a") + $('.tableClip .select_adr_hd>div').eq(0).css('width', column._column.width + 40); + } +}); + +$tableClip.on("scrollHorizontal",function(left){ + $(".tableClip .adr_excel").scrollLeft(left); +}) + +$(".tableClip .adr_excel").on("scroll",function(){ + $(".tableClip .tabulator-tableholder").scrollLeft($(this).scrollLeft()); +}); diff --git a/src/main/webapp/publish/css/popupLayer.css b/src/main/webapp/publish/css/popupLayer.css index c1642cad..0425abe7 100644 --- a/src/main/webapp/publish/css/popupLayer.css +++ b/src/main/webapp/publish/css/popupLayer.css @@ -99,7 +99,7 @@ .adr_excel .adr_hd>div:last-child::after{display:none;} /* 붙여넣기 colgroup */ -.excel_paste .adr_hd>div:nth-child(1), .excel_paste .adr_bd>div:nth-child(1) {width: 40px;} +/* .excel_paste .adr_hd>div:nth-child(1), .excel_paste .adr_bd>div:nth-child(1) {width: 40px;} .excel_paste .adr_hd>div:nth-child(2), .excel_paste .adr_bd>div:nth-child(2) {width: 8%;} .excel_paste .adr_hd>div:nth-child(3), .excel_paste .adr_bd>div:nth-child(3) {width: 10%;} .excel_paste .adr_hd>div:nth-child(4), .excel_paste .adr_bd>div:nth-child(4) {width: 14%;} @@ -108,7 +108,7 @@ .excel_paste .adr_hd>div:nth-child(7), .excel_paste .adr_bd>div:nth-child(7) {width: 11%;} .excel_paste .adr_hd>div:nth-child(8), .excel_paste .adr_bd>div:nth-child(8) {width: 11%;} .excel_paste .adr_hd>div:nth-child(9), .excel_paste .adr_bd>div:nth-child(9) {width: 10%;} -.excel_paste .adr_hd>div:nth-child(10), .excel_paste .adr_bd>div:nth-child(10) {width: 10%;} +.excel_paste .adr_hd>div:nth-child(10), .excel_paste .adr_bd>div:nth-child(10) {width: 10%;} */ /* 주소록 불러오기 */ .adr_pop_list2 {width: 100%; margin: 10px 0 23px 0; float: left;} @@ -124,13 +124,13 @@ /* tbody */ .adr_excel .adr_bd_wrap {background-color: #f2f2f2;} -.excel_paste .adr_bd_wrap {height: 169px;} +/* .excel_paste .adr_bd_wrap {height: 169px;} */ .adr_excel .adr_bd { display: flex; height: 34px; line-height: 34px; font-size: 14px; box-sizing: border-box; text-align: center; color: #555; font-weight: 300;} .adr_excel .adr_bd span {font-weight: 400;} .adr_excel .adr_bd>div {height: 34px; padding: 0 5px; line-height: 34px; border-bottom: 1px solid #e5e5e5; text-align: center; color: #666; font-weight: 300; box-sizing: border-box;} .adr_excel .adr_bd:last-child>div {border-bottom: 0;} .adr_excel .adr_bd.error * {color: #e40000 !important; font-weight: 400;} -.excel_paste .adr_bd select {font-size: 13px; font-weight: 300; background-color: #fff; width: 100%; border-radius: 3px; background-image: url(/publish/images/content/select_s.png);background-repeat: no-repeat;background-position: right 5px top 50%;font-family: 'Noto Sans KR', sans-serif; cursor: pointer; padding: 0 5px;} +/* .excel_paste .adr_bd select {font-size: 13px; font-weight: 300; background-color: #fff; width: 100%; border-radius: 3px; background-image: url(/publish/images/content/select_s.png);background-repeat: no-repeat;background-position: right 5px top 50%;font-family: 'Noto Sans KR', sans-serif; cursor: pointer; padding: 0 5px;} */ /*// 팝업 table */