--- src/main/webapp/WEB-INF/jsp/web/msgdata/MsgDataSMLView.jsp
+++ src/main/webapp/WEB-INF/jsp/web/msgdata/MsgDataSMLView.jsp
... | ... | @@ -15,80 +15,220 @@ |
| 15 | 15 |
|
| 16 | 16 |
|
| 17 | 17 |
$(document).ready(function(){
|
| 18 |
- var currentIndex = 0; |
|
| 19 |
- var dataLength = tableL.getData().length; |
|
| 18 |
+ |
|
| 19 |
+ |
|
| 20 |
+ |
|
| 21 |
+ |
|
| 22 |
+ //받는사람 연락처 내용 처리 |
|
| 23 |
+ //Tabulator AJAX Data Loading |
|
| 24 |
+ tableL = new Tabulator(".callList_box", {
|
|
| 25 |
+ height:"255px", |
|
| 26 |
+ layout:"fitColumns", |
|
| 27 |
+ headerHozAlign:"center", |
|
| 28 |
+ validationMode:"highlight", |
|
| 29 |
+ placeholder:"복사(Ctrl+C)한 내용을 여기에 붙여넣기(Ctrl+V) 해주세요.", //fit columns to width of table (optional) |
|
| 30 |
+ resizableColumns:false, |
|
| 31 |
+ columns:[ //Define Table Columns |
|
| 32 |
+ {formatter:"rowSelection", headerHozAlign:"center", titleFormatter:"rowSelection",clipboard:false, hozAlign:"center", width:5, headerSort:false, cellClick:function(e, cell){
|
|
| 33 |
+ cell.getRow().toggleSelect(); |
|
| 34 |
+ }}, |
|
| 35 |
+// {formatter:"rownum", align:"center", title:"No", hozAlign:"center", headerHozAlign:"center", field:"No", width:30},
|
|
| 36 |
+ {formatter:"rownum", align:"center" ,title:"No", hozAlign:"center", headerHozAlign:"center", width:40},
|
|
| 37 |
+ {title:"이름", hozAlign:"center", headerHozAlign:"center", field:"name", editor:"input", validator:["maxLength:12"], cellEdited:function(cell){
|
|
| 38 |
+ fnReplCell(); |
|
| 39 |
+ }}, |
|
| 40 |
+ {title:"휴대폰", hozAlign:"center", headerHozAlign:"center", field:"phone", editor:"input", width:100, validator:["required","minLength:10", "maxLength:12"], cellEdited:function(cell){
|
|
| 41 |
+ fnDuplPhone(); |
|
| 42 |
+ }}, |
|
| 43 |
+ {title:"[*1*]", hozAlign:"center", headerHozAlign:"center", field:"rep1", editor:"input", minWidth:60, validator:["maxLength:40"], cellEdited:function(cell){
|
|
| 44 |
+ fnReplCell(); |
|
| 45 |
+ }}, |
|
| 46 |
+ {title:"[*2*]", hozAlign:"center", headerHozAlign:"center", field:"rep2", editor:"input", minWidth:60, validator:["maxLength:40"], cellEdited:function(cell){
|
|
| 47 |
+ fnReplCell(); |
|
| 48 |
+ }}, |
|
| 49 |
+ {title:"[*3*]", hozAlign:"center", headerHozAlign:"center", field:"rep3", editor:"input", minWidth:60, validator:["maxLength:40"], cellEdited:function(cell){
|
|
| 50 |
+ fnReplCell(); |
|
| 51 |
+ }}, |
|
| 52 |
+ {title:"[*4*]", hozAlign:"center", headerHozAlign:"center", field:"rep4", editor:"input", minWidth:60, validator:["maxLength:40"], cellEdited:function(cell){
|
|
| 53 |
+ fnReplCell(); |
|
| 54 |
+ }}, |
|
| 55 |
+ |
|
| 56 |
+ ], |
|
| 57 |
+ validationFailed:function(cell, value, parameters){ // 유효성 체크 함수 - 아직 잘 모르겠음
|
|
| 58 |
+ //take action on validation fail |
|
| 59 |
+ var valid = cell.isValid(); |
|
| 60 |
+ var fieldNm = cell.getField(); |
|
| 61 |
+ var cellVal = cell.getValue(); |
|
| 62 |
+ var returnVal = ""; |
|
| 63 |
+ if(!valid){
|
|
| 64 |
+ |
|
| 65 |
+ if(fieldNm == "name"){
|
|
| 66 |
+ alert("받는사람 이름은 최대 12글자까지만 입력 가능합니다.");
|
|
| 67 |
+ cell.setValue(strMaxLengthSubstring(cellVal, 11)); //스크립트 함수가 0부터 시작이므로 원하는 글자수 -1을 해줘야한다. |
|
| 68 |
+ cell.clearValidation(); |
|
| 69 |
+ }else if(fieldNm == "phone"){
|
|
| 70 |
+ alert("휴대폰번호는 하이픈(-)을 제외한 숫자만 정확히 입력해 주세요.");
|
|
| 71 |
+ }else{
|
|
| 72 |
+ alert("치환문자를 정확히 입력해 주세요. 40글자 이내로 입력 가능합니다.");
|
|
| 73 |
+ cell.setValue(strMaxLengthSubstring(cellVal, 39)); |
|
| 74 |
+ cell.clearValidation(); |
|
| 75 |
+ } |
|
| 76 |
+ |
|
| 77 |
+ //해당 셀 데이터 삭제 |
|
| 78 |
+ //cell.setValue("");
|
|
| 79 |
+ |
|
| 80 |
+ } |
|
| 81 |
+ return value % parameters.phone; |
|
| 82 |
+ }, |
|
| 83 |
+ |
|
| 84 |
+ }); |
|
| 85 |
+ |
|
| 86 |
+ |
|
| 87 |
+ //주소록 불러오기 팝업 내용 |
|
| 88 |
+ //Tabulator AJAX Data Loading |
|
| 89 |
+ tableAddr = new Tabulator(".callAddr_box", {
|
|
| 90 |
+ height:"255px", |
|
| 91 |
+ layout:"fitColumns", |
|
| 92 |
+ headerHozAlign:"center", |
|
| 93 |
+ validationMode:"highlight", |
|
| 94 |
+ placeholder:"주소록 그룹을 선택해 주세요.", //fit columns to width of table (optional) |
|
| 95 |
+ resizableColumns:false, |
|
| 96 |
+ columns:[ //Define Table Columns |
|
| 97 |
+ {formatter:"rowSelection", titleFormatter:"rowSelection",clipboard:false, hozAlign:"center", headerSort:false, cellClick:function(e, cell){
|
|
| 98 |
+ cell.getRow().toggleSelect(); |
|
| 99 |
+ } |
|
| 100 |
+ }, |
|
| 101 |
+ {title:"그룹명", hozAlign:"center", field:"addrGroupNm", editor:"input", width:100, validator:["required","minLength:2", "maxLength:40"]},
|
|
| 102 |
+ {title:"이름", hozAlign:"center", field:"addrName", editor:"input", width:100, validator:["maxLength:12"]},
|
|
| 103 |
+ {title:"휴대폰번호", hozAlign:"center", field:"addrPhone", editor:"input", width:100, validator:["required","minLength:10", "maxLength:11"]},
|
|
| 104 |
+ {title:"[*1*]", hozAlign:"center", field:"addrRep1", editor:"input", width:84, validator:["maxLength:40"]},
|
|
| 105 |
+ {title:"[*2*]", hozAlign:"center", field:"addrRep2", editor:"input", width:84, validator:["maxLength:40"]},
|
|
| 106 |
+ {title:"[*3*]", hozAlign:"center", field:"addrRep3", editor:"input", width:84, validator:["maxLength:40"]},
|
|
| 107 |
+ {title:"[*4*]", hozAlign:"center", field:"addrRep4", editor:"input", width:84, validator:["maxLength:40"]},
|
|
| 108 |
+ |
|
| 109 |
+ ], |
|
| 110 |
+ validationFailed:function(cell, value, parameters){ // 유효성 체크 함수 - 아직 잘 모르겠음
|
|
| 111 |
+ var valid = cell.isValid(); |
|
| 112 |
+ var fieldNm = cell.getField(); |
|
| 113 |
+ if(!valid){
|
|
| 114 |
+ if(fieldNm == "addrName"){
|
|
| 115 |
+ alert("받는사람 이름은 최대 12글자까지만 입력 가능합니다.");
|
|
| 116 |
+ }else if(fieldNm == "addrPhone"){
|
|
| 117 |
+ alert("휴대폰번호는 하이픈(-)을 제외한 숫자만 정확히 입력해 주세요.");
|
|
| 118 |
+ }else if(fieldNm == "addrGroupNm"){
|
|
| 119 |
+ alert("그룹명을 정확히 입력해 주세요. 2 ~ 40글자 이내로 입력 가능합니다.");
|
|
| 120 |
+ }else{
|
|
| 121 |
+ alert("치환문자를 정확히 입력해 주세요. 100글자 이내로 입력 가능합니다.");
|
|
| 122 |
+ } |
|
| 123 |
+ |
|
| 124 |
+ //해당 셀 데이터 삭제 |
|
| 125 |
+ cell.setValue("");
|
|
| 126 |
+ } |
|
| 127 |
+ return value % parameters.addrPhone; |
|
| 128 |
+ }, |
|
| 129 |
+ |
|
| 130 |
+ }); |
|
| 131 |
+ |
|
| 132 |
+ |
|
| 133 |
+ |
|
| 134 |
+ /* |
|
| 135 |
+ * 20240823 |
|
| 136 |
+ * 미리보기 스크립트 |
|
| 137 |
+ */ |
|
| 138 |
+ // 현재 위치 |
|
| 139 |
+ var currentIndex = 0; |
|
| 140 |
+ |
|
| 141 |
+ // 제일 이전 |
|
| 142 |
+ $('#btnFirst').on('click', function(){
|
|
| 143 |
+ currentIndex = 0; |
|
| 144 |
+ |
|
| 145 |
+ updateButtons(currentIndex ); |
|
| 146 |
+ fn_previewText(currentIndex); |
|
| 147 |
+ }); |
|
| 148 |
+ |
|
| 149 |
+ // 이전 |
|
| 150 |
+ $('#btnPrev').on('click', function(){
|
|
| 151 |
+ |
|
| 152 |
+ if (currentIndex > 0) {
|
|
| 153 |
+ currentIndex--; |
|
| 154 |
+ updateButtons(currentIndex ); |
|
| 155 |
+ fn_previewText(currentIndex); |
|
| 156 |
+ } |
|
| 157 |
+ }); |
|
| 20 | 158 |
|
| 21 | 159 |
|
| 22 |
- $('#btnFirst').on('click', function(){
|
|
| 23 |
- currentIndex = 0; |
|
| 24 |
- updateButtons(); |
|
| 25 |
- fn_previewText(currentIndex); |
|
| 26 |
- }); |
|
| 27 |
- |
|
| 28 |
- $('#btnPrev').on('click', function(){
|
|
| 29 |
- if (currentIndex > 0) {
|
|
| 30 |
- currentIndex--; |
|
| 31 |
- updateButtons(); |
|
| 32 |
- fn_previewText(currentIndex); |
|
| 33 |
- } |
|
| 34 |
- }); |
|
| 35 |
- |
|
| 36 |
- $('#btnNext').on('click', function(){
|
|
| 37 |
- console.log('currentIndex : ', currentIndex);
|
|
| 38 |
- console.log('dataLength : ', dataLength);
|
|
| 39 |
- if (currentIndex < dataLength - 1) {
|
|
| 40 |
- currentIndex++; |
|
| 41 |
- updateButtons(); |
|
| 42 |
- fn_previewText(currentIndex); |
|
| 43 |
- } |
|
| 44 |
- }); |
|
| 45 |
- |
|
| 46 |
- $('#btnLast').on('click', function(){
|
|
| 47 |
- currentIndex = dataLength - 1; |
|
| 48 |
- updateButtons(); |
|
| 49 |
- fn_previewText(currentIndex); |
|
| 160 |
+ // 다음 |
|
| 161 |
+ $('#btnNext').on('click', function(){
|
|
| 162 |
+ var dataLength = tableL.getData().length; |
|
| 163 |
+ if (currentIndex < dataLength - 1) {
|
|
| 164 |
+ currentIndex++; |
|
| 165 |
+ updateButtons(currentIndex ); |
|
| 166 |
+ fn_previewText(currentIndex); |
|
| 167 |
+ } |
|
| 50 | 168 |
}); |
| 51 | 169 |
|
| 52 |
- // Initialize buttons on page load |
|
| 53 |
- updateButtons(); |
|
| 170 |
+ // 제일 다음 |
|
| 171 |
+ $('#btnLast').on('click', function(){
|
|
| 172 |
+ var dataLength = tableL.getData().length; |
|
| 173 |
+ currentIndex = dataLength - 1; |
|
| 174 |
+ updateButtons(currentIndex ); |
|
| 175 |
+ fn_previewText(currentIndex); |
|
| 176 |
+ }); |
|
| 177 |
+ |
|
| 178 |
+ updateButtons(currentIndex); |
|
| 54 | 179 |
|
| 55 | 180 |
}); |
| 56 | 181 |
|
| 57 |
-function updateButtons() {
|
|
| 58 |
- $('#btnPrev').data('index', currentIndex - 1);
|
|
| 59 |
- $('#btnNext').data('index', currentIndex + 1);
|
|
| 60 |
- |
|
| 61 |
- if (currentIndex <= 0) {
|
|
| 62 |
- $('#btnPrev').attr('disabled', true);
|
|
| 63 |
- } else {
|
|
| 64 |
- $('#btnPrev').attr('disabled', false);
|
|
| 65 |
- } |
|
| 66 |
- |
|
| 67 |
- if (currentIndex >= dataLength - 1) {
|
|
| 68 |
- $('#btnNext').attr('disabled', true);
|
|
| 69 |
- } else {
|
|
| 70 |
- $('#btnNext').attr('disabled', false);
|
|
| 71 |
- } |
|
| 72 |
-} |
|
| 182 |
+/* |
|
| 183 |
+ * 버튼 disabled 스크립트 |
|
| 184 |
+ */ |
|
| 185 |
+function updateButtons(currentIndex ) {
|
|
| 186 |
+ |
|
| 187 |
+ |
|
| 188 |
+ var dataLength = tableL.getData().length; |
|
| 189 |
+ console.log('dataLength ', dataLength);
|
|
| 190 |
+ console.log('currentIndex ', currentIndex);
|
|
| 191 |
+ |
|
| 192 |
+ |
|
| 193 |
+ if (currentIndex <= 0) {
|
|
| 194 |
+ $('#btnPrev').attr('disabled', true);
|
|
| 195 |
+ $('#btnFirst').attr('disabled', true);
|
|
| 196 |
+ } else {
|
|
| 197 |
+ $('#btnPrev').attr('disabled', false);
|
|
| 198 |
+ $('#btnFirst').attr('disabled', false);
|
|
| 199 |
+ } |
|
| 200 |
+ |
|
| 201 |
+ if (currentIndex >= dataLength - 1) {
|
|
| 202 |
+ $('#btnNext').attr('disabled', true);
|
|
| 203 |
+ $('#btnLast').attr('disabled', true);
|
|
| 204 |
+ } else {
|
|
| 205 |
+ $('#btnNext').attr('disabled', false);
|
|
| 206 |
+ $('#btnLast').attr('disabled', false);
|
|
| 207 |
+ } |
|
| 208 |
+} |
|
| 73 | 209 |
|
| 210 |
+/* |
|
| 211 |
+ * 미리보기 데이터 치환 |
|
| 212 |
+ */ |
|
| 74 | 213 |
function fn_previewText(rowIndex){
|
| 75 |
- |
|
| 214 |
+ |
|
| 76 | 215 |
var smsText = $('#smsTxtArea').val()
|
| 77 | 216 |
// 데이터 가져오기 |
| 78 | 217 |
var data = tableL.getData(); |
| 79 |
- |
|
| 218 |
+ |
|
| 80 | 219 |
// 특정 인덱스(예: 1)로 행을 선택하여 치환 |
| 81 | 220 |
var row = data[rowIndex]; // 인덱스 1의 행을 선택 |
| 82 |
- |
|
| 221 |
+ |
|
| 222 |
+ |
|
| 83 | 223 |
// 이름 치환 |
| 84 |
- smsText = smsText.replace(/\[\*이름\*\]/g, row.name); |
|
| 85 |
- |
|
| 224 |
+ smsText = smsText.replace(/\[\*이름\*\]/g, row.name !== undefined && row.name !== null ? row.name : '[*이름*]'); |
|
| 225 |
+ |
|
| 86 | 226 |
// rep1, rep2, rep3, rep4 치환 |
| 87 |
- smsText = smsText.replace(/\[\*1\*\]/g, row.rep1 || ''); |
|
| 88 |
- smsText = smsText.replace(/\[\*2\*\]/g, row.rep2 || ''); |
|
| 89 |
- smsText = smsText.replace(/\[\*3\*\]/g, row.rep3 || ''); |
|
| 90 |
- smsText = smsText.replace(/\[\*4\*\]/g, row.rep4 || ''); |
|
| 91 |
- |
|
| 227 |
+ smsText = smsText.replace(/\[\*1\*\]/g, row.rep1 !== undefined && row.rep1 !== null ? row.rep1 : '[*1*]'); |
|
| 228 |
+ smsText = smsText.replace(/\[\*2\*\]/g, row.rep2 !== undefined && row.rep2 !== null ? row.rep2 : '[*2*]'); |
|
| 229 |
+ smsText = smsText.replace(/\[\*3\*\]/g, row.rep3 !== undefined && row.rep3 !== null ? row.rep3 : '[*3*]'); |
|
| 230 |
+ smsText = smsText.replace(/\[\*4\*\]/g, row.rep4 !== undefined && row.rep4 !== null ? row.rep4 : '[*4*]'); |
|
| 231 |
+ |
|
| 92 | 232 |
// 결과 출력 또는 다른 곳에 사용 |
| 93 | 233 |
console.log(smsText); |
| 94 | 234 |
$('.realtime').text(smsText);
|
... | ... | @@ -719,116 +859,6 @@ |
| 719 | 859 |
]; */ |
| 720 | 860 |
|
| 721 | 861 |
//var selectRow; |
| 722 |
- |
|
| 723 |
- //받는사람 연락처 내용 처리 |
|
| 724 |
- //Tabulator AJAX Data Loading |
|
| 725 |
- tableL = new Tabulator(".callList_box", {
|
|
| 726 |
- height:"255px", |
|
| 727 |
- layout:"fitColumns", |
|
| 728 |
- headerHozAlign:"center", |
|
| 729 |
- validationMode:"highlight", |
|
| 730 |
- placeholder:"복사(Ctrl+C)한 내용을 여기에 붙여넣기(Ctrl+V) 해주세요.", //fit columns to width of table (optional) |
|
| 731 |
- resizableColumns:false, |
|
| 732 |
- columns:[ //Define Table Columns |
|
| 733 |
- {formatter:"rowSelection", headerHozAlign:"center", titleFormatter:"rowSelection",clipboard:false, hozAlign:"center", width:5, headerSort:false, cellClick:function(e, cell){
|
|
| 734 |
- cell.getRow().toggleSelect(); |
|
| 735 |
- }}, |
|
| 736 |
-// {formatter:"rownum", align:"center", title:"No", hozAlign:"center", headerHozAlign:"center", field:"No", width:30},
|
|
| 737 |
- {formatter:"rownum", align:"center" ,title:"No", hozAlign:"center", headerHozAlign:"center", width:40},
|
|
| 738 |
- {title:"이름", hozAlign:"center", headerHozAlign:"center", field:"name", editor:"input", validator:["maxLength:12"], cellEdited:function(cell){
|
|
| 739 |
- fnReplCell(); |
|
| 740 |
- }}, |
|
| 741 |
- {title:"휴대폰", hozAlign:"center", headerHozAlign:"center", field:"phone", editor:"input", width:100, validator:["required","minLength:10", "maxLength:12"], cellEdited:function(cell){
|
|
| 742 |
- fnDuplPhone(); |
|
| 743 |
- }}, |
|
| 744 |
- {title:"[*1*]", hozAlign:"center", headerHozAlign:"center", field:"rep1", editor:"input", minWidth:60, validator:["maxLength:40"], cellEdited:function(cell){
|
|
| 745 |
- fnReplCell(); |
|
| 746 |
- }}, |
|
| 747 |
- {title:"[*2*]", hozAlign:"center", headerHozAlign:"center", field:"rep2", editor:"input", minWidth:60, validator:["maxLength:40"], cellEdited:function(cell){
|
|
| 748 |
- fnReplCell(); |
|
| 749 |
- }}, |
|
| 750 |
- {title:"[*3*]", hozAlign:"center", headerHozAlign:"center", field:"rep3", editor:"input", minWidth:60, validator:["maxLength:40"], cellEdited:function(cell){
|
|
| 751 |
- fnReplCell(); |
|
| 752 |
- }}, |
|
| 753 |
- {title:"[*4*]", hozAlign:"center", headerHozAlign:"center", field:"rep4", editor:"input", minWidth:60, validator:["maxLength:40"], cellEdited:function(cell){
|
|
| 754 |
- fnReplCell(); |
|
| 755 |
- }}, |
|
| 756 |
- |
|
| 757 |
- ], |
|
| 758 |
- validationFailed:function(cell, value, parameters){ // 유효성 체크 함수 - 아직 잘 모르겠음
|
|
| 759 |
- //take action on validation fail |
|
| 760 |
- var valid = cell.isValid(); |
|
| 761 |
- var fieldNm = cell.getField(); |
|
| 762 |
- var cellVal = cell.getValue(); |
|
| 763 |
- var returnVal = ""; |
|
| 764 |
- if(!valid){
|
|
| 765 |
- |
|
| 766 |
- if(fieldNm == "name"){
|
|
| 767 |
- alert("받는사람 이름은 최대 12글자까지만 입력 가능합니다.");
|
|
| 768 |
- cell.setValue(strMaxLengthSubstring(cellVal, 11)); //스크립트 함수가 0부터 시작이므로 원하는 글자수 -1을 해줘야한다. |
|
| 769 |
- cell.clearValidation(); |
|
| 770 |
- }else if(fieldNm == "phone"){
|
|
| 771 |
- alert("휴대폰번호는 하이픈(-)을 제외한 숫자만 정확히 입력해 주세요.");
|
|
| 772 |
- }else{
|
|
| 773 |
- alert("치환문자를 정확히 입력해 주세요. 40글자 이내로 입력 가능합니다.");
|
|
| 774 |
- cell.setValue(strMaxLengthSubstring(cellVal, 39)); |
|
| 775 |
- cell.clearValidation(); |
|
| 776 |
- } |
|
| 777 |
- |
|
| 778 |
- //해당 셀 데이터 삭제 |
|
| 779 |
- //cell.setValue("");
|
|
| 780 |
- |
|
| 781 |
- } |
|
| 782 |
- return value % parameters.phone; |
|
| 783 |
- }, |
|
| 784 |
- |
|
| 785 |
- }); |
|
| 786 |
- |
|
| 787 |
- |
|
| 788 |
- //주소록 불러오기 팝업 내용 |
|
| 789 |
- //Tabulator AJAX Data Loading |
|
| 790 |
- tableAddr = new Tabulator(".callAddr_box", {
|
|
| 791 |
- height:"255px", |
|
| 792 |
- layout:"fitColumns", |
|
| 793 |
- headerHozAlign:"center", |
|
| 794 |
- validationMode:"highlight", |
|
| 795 |
- placeholder:"주소록 그룹을 선택해 주세요.", //fit columns to width of table (optional) |
|
| 796 |
- resizableColumns:false, |
|
| 797 |
- columns:[ //Define Table Columns |
|
| 798 |
- {formatter:"rowSelection", titleFormatter:"rowSelection",clipboard:false, hozAlign:"center", headerSort:false, cellClick:function(e, cell){
|
|
| 799 |
- cell.getRow().toggleSelect(); |
|
| 800 |
- } |
|
| 801 |
- }, |
|
| 802 |
- {title:"그룹명", hozAlign:"center", field:"addrGroupNm", editor:"input", width:100, validator:["required","minLength:2", "maxLength:40"]},
|
|
| 803 |
- {title:"이름", hozAlign:"center", field:"addrName", editor:"input", width:100, validator:["maxLength:12"]},
|
|
| 804 |
- {title:"휴대폰번호", hozAlign:"center", field:"addrPhone", editor:"input", width:100, validator:["required","minLength:10", "maxLength:11"]},
|
|
| 805 |
- {title:"[*1*]", hozAlign:"center", field:"addrRep1", editor:"input", width:84, validator:["maxLength:40"]},
|
|
| 806 |
- {title:"[*2*]", hozAlign:"center", field:"addrRep2", editor:"input", width:84, validator:["maxLength:40"]},
|
|
| 807 |
- {title:"[*3*]", hozAlign:"center", field:"addrRep3", editor:"input", width:84, validator:["maxLength:40"]},
|
|
| 808 |
- {title:"[*4*]", hozAlign:"center", field:"addrRep4", editor:"input", width:84, validator:["maxLength:40"]},
|
|
| 809 |
- |
|
| 810 |
- ], |
|
| 811 |
- validationFailed:function(cell, value, parameters){ // 유효성 체크 함수 - 아직 잘 모르겠음
|
|
| 812 |
- var valid = cell.isValid(); |
|
| 813 |
- var fieldNm = cell.getField(); |
|
| 814 |
- if(!valid){
|
|
| 815 |
- if(fieldNm == "addrName"){
|
|
| 816 |
- alert("받는사람 이름은 최대 12글자까지만 입력 가능합니다.");
|
|
| 817 |
- }else if(fieldNm == "addrPhone"){
|
|
| 818 |
- alert("휴대폰번호는 하이픈(-)을 제외한 숫자만 정확히 입력해 주세요.");
|
|
| 819 |
- }else if(fieldNm == "addrGroupNm"){
|
|
| 820 |
- alert("그룹명을 정확히 입력해 주세요. 2 ~ 40글자 이내로 입력 가능합니다.");
|
|
| 821 |
- }else{
|
|
| 822 |
- alert("치환문자를 정확히 입력해 주세요. 100글자 이내로 입력 가능합니다.");
|
|
| 823 |
- } |
|
| 824 |
- |
|
| 825 |
- //해당 셀 데이터 삭제 |
|
| 826 |
- cell.setValue("");
|
|
| 827 |
- } |
|
| 828 |
- return value % parameters.addrPhone; |
|
| 829 |
- }, |
|
| 830 |
- |
|
| 831 |
- }); |
|
| 832 | 862 |
|
| 833 | 863 |
//핸드폰 번호 Tabulator에서 수정시 중복 체크 |
| 834 | 864 |
function fnDuplPhone(){
|
--- src/main/webapp/WEB-INF/jsp/web/msgdata/include/msgDataIncludeExcel.jsp
+++ src/main/webapp/WEB-INF/jsp/web/msgdata/include/msgDataIncludeExcel.jsp
... | ... | @@ -257,6 +257,8 @@ |
| 257 | 257 |
// 합쳐진 데이터를 tableL에 설정합니다. |
| 258 | 258 |
tableL.setData(combinedData); |
| 259 | 259 |
|
| 260 |
+ // 미리보기 버튼 활성화 |
|
| 261 |
+ updateButtons(0); |
|
| 260 | 262 |
|
| 261 | 263 |
var totRows = tableL.getRows().length; |
| 262 | 264 |
updateTotCnt(totRows); //전체 데이터 갯수 구하기 |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?