From 529f6c75b752095526450f6a86430572fa5fa7ce Mon Sep 17 00:00:00 2001 From: subsub Date: Mon, 9 Sep 2024 16:53:51 +0900 Subject: [PATCH] =?UTF-8?q?24/09/09=20=EC=A3=BC=EC=86=8C=EB=A1=9D=20?= =?UTF-8?q?=EB=8C=80=EB=9F=89=EB=93=B1=EB=A1=9D=20=ED=83=80=EB=B7=B8?= =?UTF-8?q?=EB=A0=88=EC=9D=B4=ED=84=B0=20width=20=EA=B0=92=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD=20=EC=8B=9C=20=EC=9C=84=EC=97=90=20select=20=EC=84=A0?= =?UTF-8?q?=ED=83=9D=20div=20=EB=8F=99=EC=9D=BC=ED=95=98=EA=B2=8C=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jsp/web/addr/include/addrListforExcel.jsp | 16 ++++++++++++- src/main/webapp/js/web/addr/init.js | 23 +++++++++++++++++++ src/main/webapp/publish/css/popupLayer.css | 4 ++-- 3 files changed, 40 insertions(+), 3 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 bfc3c014..9c459396 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 @@ -87,6 +87,20 @@ $(document).ready(function(){ } }); + // 타뷸레이터 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; + + $(".select_adr_hd div").eq(colIdx).width(colWid); + }) + }) + }) //받는사람 오류번호 삭제 처리해주기 @@ -561,7 +575,7 @@ $(document).on("click", "#duplicationChkAll", function(e) { -
+
diff --git a/src/main/webapp/js/web/addr/init.js b/src/main/webapp/js/web/addr/init.js index bc9d9b57..20b5a4a9 100644 --- a/src/main/webapp/js/web/addr/init.js +++ b/src/main/webapp/js/web/addr/init.js @@ -60,8 +60,31 @@ $(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); + }else{} + }); + + $tableExcel.on("scrollHorizontal",function(left){ + $(".adr_excel").scrollLeft(left); + }) + + $(".adr_excel").on("scroll",function(){ + $(".tabulator-tableholder").scrollLeft($(this).scrollLeft()); + }); + + $tableClip = new Tabulator("#tabulator_clip", { diff --git a/src/main/webapp/publish/css/popupLayer.css b/src/main/webapp/publish/css/popupLayer.css index 12196ffc..b306c370 100644 --- a/src/main/webapp/publish/css/popupLayer.css +++ b/src/main/webapp/publish/css/popupLayer.css @@ -74,7 +74,7 @@ /* 팝업 table */ /* thead */ .adr_excel {border: 1px solid #ccc; border-radius: 5px;} -.adr_excel .adr_hd { display: flex; height: 36px; line-height: 36px; font-size: 16px; box-sizing: border-box; position: relative; z-index: 0; background-color: #e8e8e8; text-align: center; border-radius: 3px 3px 0 0;} +.adr_excel .adr_hd { display: inline-flex; height: 36px; line-height: 36px; font-size: 16px; box-sizing: border-box; position: relative; z-index: 0; background-color: #e8e8e8; text-align: center; border-radius: 3px 3px 0 0;} .adr_excel .adr_hd>div {border-bottom: 1px solid #9fa0a0; position: relative;} .adr_excel .adr_hd>div::after {content: ""; background-color: #d4d4d4; width: 1px; height: 14px; position: absolute; top: 50%; transform: translateY(-50%); right: 0;} .adr_excel .adr_hd .group_input:after {content: none;} @@ -95,7 +95,7 @@ .adr_excel .adr_hd>div,.adr_excel .adr_bd>div{width:calc((100% - 40px)/7);} .adr_excel .adr_hd>div:nth-child(1),.adr_excel .adr_bd>div:nth-child(1){width:40px;} .adr_excel .adr_hd.select_adr_hd{background:#e0e0e0;} -.adr_excel .adr_hd>div select{width:calc(100% - 8px);height:36px;background:transparent url(/publish/images/select_search.png) no-repeat 90% 15px;background-size:9%;margin:-8px 0 0 0;border:0;text-align:center;line-height:1.3;} +.adr_excel .adr_hd>div select{width:calc(100% - 8px);height:36px;background:transparent url(/publish/images/select_search.png) no-repeat 90% 15px;background-size:16px auto;margin:-8px 0 0 0;border:0;text-align:center;line-height:1.3;} .adr_excel .adr_hd>div:last-child::after{display:none;} /* 붙여넣기 colgroup */