+
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/main/webapp/WEB-INF/jsp/web/fax/addr/include/FaxAddrListforExcel.jsp b/src/main/webapp/WEB-INF/jsp/web/fax/addr/include/FaxAddrListforExcel.jsp
index 1631d3fd..c7e855d3 100644
--- a/src/main/webapp/WEB-INF/jsp/web/fax/addr/include/FaxAddrListforExcel.jsp
+++ b/src/main/webapp/WEB-INF/jsp/web/fax/addr/include/FaxAddrListforExcel.jsp
@@ -16,45 +16,6 @@ function addrGroupLoadAjax(){
}
-function insertAddrGroupAjax() {
- var form = document.addrGrpInsertForm;
- if(form.addrGrpNm.value == "") {
- alert("주소록 그룹명을 입력해주세요.");
- return;
- }
-
- if(!confirm("주소록 그룹을 추가하시겠습니까?")) {
- return;
- }
- var data = new FormData(form);
-
- $.ajax({
- cache : false,
- url : "",
- type : 'POST',
- data : data,
- dataType:'json',
- processData: false,
- contentType: false,
- success : function(returnData, status){
- if(status == "success") {
- if("fail"==returnData.result){
- alert(returnData.message);
- return;
- } else if("dupl"==returnData.result) {
- alert("중복된 그룹명입니다.");
- return;
- }
- alert("등록되었습니다.");
- listAddrGrp();
- addrGroupLoadAjax();
-
- }else{ alert("ERROR!");return;}
- },
- error: function (e) { alert("저장에 실패하였습니다."); console.log("ERROR : ", e); }
- });
-}
-
// 주소록그룹 콤보박스 유지
function setSelectSetting(selectVal) {
@@ -252,7 +213,6 @@ function updateTable(tableData) {
document.getElementById("rowTotCnt").innerText = tableData.length;
});
- console.log(' :: fn_loadRemoveActive :: ');
fn_loadRemoveActive();
}
@@ -261,34 +221,6 @@ function updateTable(tableData) {
//등록
//#############################################################################################
-// 주소록 그룹 중복체크
-function getAddrGroupDuplCheckAjax() {
- var isReturn = true;
-
- $.ajax({
- url : "",
- type : 'POST',
- data : {"addrGrpNm" : $("#addrGrpNm").val()},
- dataType:'json',
- async: false, // 동기
- success : function(data, status){
- if(data.isSuccess == true) {
- if(data.isDupl == true) {
- //alert("중복된 그룹명입니다.");
- isReturn = false;
- }
- }
- else {
- //alert("Message : " + msg);
- }
- },
- error: function (e) {
- //alert("주소록 중복체크에 실패했습니다.");
- }
- });
-
- return isReturn;
-}
//#############################################################################################
diff --git a/src/main/webapp/js/user/fax/addr/faxEvent.js b/src/main/webapp/js/user/fax/addr/event.js
similarity index 98%
rename from src/main/webapp/js/user/fax/addr/faxEvent.js
rename to src/main/webapp/js/user/fax/addr/event.js
index b6135b3e..2c55e4be 100644
--- a/src/main/webapp/js/user/fax/addr/faxEvent.js
+++ b/src/main/webapp/js/user/fax/addr/event.js
@@ -358,10 +358,10 @@ function resetTableFieldsToDefault() {
// 초기 필드(A, B, C, D 등)를 위한 열 설정
var columns = [
- {formatter: "rowSelection", titleFormatter: "rowSelection", clipboard: false, hozAlign: "center", headerHozAlign: "center", headerSort: false, cellClick: function(e, cell) {
+ {formatter: "rowSelection", titleFormatter: "rowSelection", clipboard: false, width:50, hozAlign: "center", headerHozAlign: "center", headerSort: false, cellClick: function(e, cell) {
cell.getRow().toggleSelect();
}},
- {formatter:"rownum", align:"center", title:"No", hozAlign:"center", headerHozAlign:"center", width:40}
+ {formatter:"rownum", align:"center", title:"No", hozAlign:"center", headerHozAlign:"center", width:100}
];
// 기본 필드로 열 구성
@@ -372,7 +372,7 @@ function resetTableFieldsToDefault() {
hozAlign: "center",
headerHozAlign: "center",
editor: false, // 편집 비활성화
- width: 240,
+ width: 260,
validator: ["maxLength:100", "string"]
});
});
diff --git a/src/main/webapp/js/user/fax/addr/init.js b/src/main/webapp/js/user/fax/addr/init.js
new file mode 100644
index 00000000..60dc0ae1
--- /dev/null
+++ b/src/main/webapp/js/user/fax/addr/init.js
@@ -0,0 +1,209 @@
+
+
+var tableErrorData = [];
+var tableErrorCheckData = [];
+var addrMassDupliSaveList = null;
+
+var gArrRestartIndex = 0; //배열 재시작카운드
+var gNameList = []; //치환문자 이름
+var gPhoneList = []; //받는사람
+var gMemoList = []; //메모
+
+var $tableExcel = null; //엑셀입력 탭
+var $tableClip = null; //붙여넣기 탭
+var $tableSelf = null; //직접입력 탭
+var $tableError = null; //에러 팝업 영역
+
+
+$(document).ready(function(){
+
+ //excel 파일 불러오기 tabulator
+ $tableExcel = new Tabulator("#tabulator_excel", {
+ height:"255px",
+ width:"100%",
+ layout:"fitColumns",
+ autoColumns:false,
+ headerHozAlign:"center",
+ validationMode:"highlight",
+ clipboard:false,
+ clipboardCopySelector:"table",
+ clipboardPasteAction:"insert", // insert, update, replace
+ placeholder:"Excel 파일을 업로드 해주세요.", //fit columns to width of table (optional)
+ columns:[ //Define Table Columns
+ {formatter:"rowSelection", titleFormatter:"rowSelection",clipboard:false, hozAlign:"center", width:50, headerSort:false, cellClick:function(e, cell){
+ cell.getRow().toggleSelect();
+ }}
+ ,{formatter:"rownum", hozAlign:"center" ,title:"No", hozAlign:"center", headerHozAlign:"center", width:100}
+ ,{title:"A", field:"A", hozAlign:"center", headerHozAlign: "center", width:260, validator:["maxLength:100", "string"]}
+ ,{title:"B", field:"B", hozAlign:"center", headerHozAlign: "center", width:260, validator:["maxLength:100", "string"]}
+ ,{title:"C", field:"C", hozAlign:"center", headerHozAlign: "center", width:260, validator:["maxLength:100", "string"]}
+ ],
+ validationFailed:function(cell, value, parameters){ // 유효성 체크 함수
+ var valid = cell.isValid();
+ if(!valid){
+ alert("양식에 맞지 않는 정보가 입력되었습니다.");
+
+ //해당 셀 데이터 삭제
+ cell.setValue("");
+ }
+ return value % parameters.phone;
+ },
+ });
+
+
+
+ $tableClip = new Tabulator("#tabulator_clip", {
+ height:"255px",
+ width:"100%",
+ layout:"fitColumns",
+ editor:true,
+ headerHozAlign:"center",
+ validationMode:"highlight",
+ placeholder:"복사(Ctrl+C)한 내용을 여기에 붙여넣기(Ctrl+V) 해주세요.", //fit columns to width of table (optional)
+// clipboard:true, // 클립보드 기능 활성화
+ clipboardPasteAction:"update", // insert, update, replace
+ columns: [
+ {formatter: "rowSelection", titleFormatter: "rowSelection", clipboard: false, hozAlign: "center", width:50, headerHozAlign: "center", headerSort: false, cellClick: function(e, cell) {
+ cell.getRow().toggleSelect();
+ }},
+ {formatter:"rownum", hozAlign:"center" ,title:"No", hozAlign:"center", headerHozAlign:"center", width:100}
+ ,{title:"A", field:"A", hozAlign:"center", headerHozAlign: "center", width:260, validator:["maxLength:100", "string"]}
+ ,{title:"B", field:"B", hozAlign:"center", headerHozAlign: "center", width:260, validator:["maxLength:100", "string"]}
+ ,{title:"C", field:"C", hozAlign:"center", headerHozAlign: "center", width:260, validator:["maxLength:100", "string"]}
+ /*,{title:"D", field:"D", hozAlign:"center", headerHozAlign: "center", width:125, validator:["maxLength:100", "string"]}
+ ,{title:"E", field:"E", hozAlign:"center", headerHozAlign: "center", width:125, validator:["maxLength:100", "string"]}
+ ,{title:"F", field:"F", hozAlign:"center", headerHozAlign: "center", width:125, validator:["maxLength:100", "string"]}
+ ,{title:"G", field:"G", hozAlign:"center", headerHozAlign: "center", width:125, validator:["maxLength:100", "string"]}*/
+ ],
+ validationFailed: function(cell, value, parameters) {
+ var valid = cell.isValid();
+ if (!valid) {
+ alert("양식에 맞지 않는 정보가 입력되었습니다.");
+ cell.setValue(""); // 해당 셀 데이터 삭제
+ }
+ return false; // 유효하지 않은 경우 false 반환
+ },
+ });
+
+
+
+ //Tabulator AJAX Data Loading
+ $tableError = new Tabulator("#tabulator_error", {
+ height:"255px",
+ width:"100%",
+ layout:"fitColumns",
+ autoColumns:false,
+ headerHozAlign:"center",
+ validationMode:"highlight",
+ clipboard:false,
+ clipboardCopySelector:"table",
+ clipboardPasteAction:"insert", // insert, update, replace
+ placeholder:"등록 팝업에서 팩스번호를 선택 후 확인해주세요.", //fit columns to width of table (optional)
+ columns:[ //Define Table Columns
+ {title:"이름", field:"name", hozAlign:"center", headerHozAlign: "center", width:125},
+ {title:"팩스번호", field:"phone", hozAlign:"center", headerHozAlign: "center", width:158},
+ {title:"미등록 결과", field:"result", hozAlign:"center", headerHozAlign: "center", width:125}
+ ]
+ });
+
+ // 타뷸레이터 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;
+ if(titleIndex != 0){
+ $('.tableExcel .select_adr_hd>div').eq(titleIndex).css('width', column._column.width);
+ }else{
+ $('.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;
+ if(titleIndex != 0){
+ $('.tableClip .select_adr_hd>div').eq(titleIndex).css('width', column._column.width);
+ }else{
+ $('.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());
+ });
+
+
+});
+
+
+
+function fn_selfmakeTable(){
+
+ var tableData = [];
+ for (var i = 0; i < 1000; i++) {
+ tableData.push({addrNm: "", addrPhoneNo: "", addrInfo1: "", addrInfo2: "", addrInfo3: "", addrInfo4: "", addrComment: ""});
+ }
+
+ // 테이블 초기화
+ $tableSelf = new Tabulator("#tabulator_self", {
+ height: "255px",
+ width: "100%",
+ layout: "fitColumns",
+ clipboardPasteAction: "update",
+ keybindings: {
+ "navRight": "tab", // Tab 키를 누르면 오른쪽 셀로 이동
+ "navLeft": "shift+tab",
+ "editNext": false // Tab 키를 누를 때 편집 모드를 종료하지 않도록 설정
+ },
+ data: tableData,
+ columns: [
+ {formatter: "rowSelection", titleFormatter: "rowSelection", clipboard: false, hozAlign: "center", headerHozAlign: "center", headerSort: false, cellClick: function(e, cell) {
+ cell.getRow().toggleSelect();
+ }},
+ {formatter:"rownum", hozAlign:"center" ,title:"No", headerHozAlign:"center", width:40},
+ {title:"이름", field:"addrNm", hozAlign:"center", headerHozAlign: "center", width:119, validator:["maxLength:100"], editor:"input"},
+ {title:"휴대폰", field:"addrPhoneNo", hozAlign:"center", headerHozAlign: "center", width:119, validator:["maxLength:100"], editor:"input"
+ , cellEdited:function(cell){
+ var currentValue = cell.getValue();
+ console.log('cell.getValue() : ', currentValue);
+
+ // 현재 값이 null 또는 undefined가 아니고, 값이 변경된 경우에만 처리
+ if (currentValue !== null
+ && currentValue !== ''
+ ) {
+ var newValue = fn_selfUpdataCount(currentValue);
+
+ // 값이 실제로 변경된 경우에만 setValue 호출
+ if (currentValue !== newValue) {
+ cell.setValue(newValue);
+ }
+ }
+ }
+ },
+ {title:"[*1*]", field:"addrInfo1", hozAlign:"center", headerHozAlign: "center", width:119, validator:["maxLength:100"], editor:"input"},
+ {title:"[*2*]", field:"addrInfo2", hozAlign:"center", headerHozAlign: "center", width:119, validator:["maxLength:100"], editor:"input"},
+ {title:"[*3*]", field:"addrInfo3", hozAlign:"center", headerHozAlign: "center", width:119, validator:["maxLength:100"], editor:"input"},
+ {title:"[*4*]", field:"addrInfo4", hozAlign:"center", headerHozAlign: "center", width:119, validator:["maxLength:100"], editor:"input"},
+ {title:"메모", field:"addrComment", hozAlign:"center", headerHozAlign: "center", width:119, validator:["maxLength:100"], editor:"input"}
+ ],
+ navigation: true // 키보드 탐색 활성화
+ });
+}
+
+
+