From f04c1ae0ff0388427f83a579002880d5dbb149d2 Mon Sep 17 00:00:00 2001
From: 이민희 <mhlee@maprex.co.kr>
Date: 금, 28 1월 2022 16:12:22 +0900
Subject: [PATCH] 모든 게시물 제목 입력시 특수문자 허용

---
 src/main/webapp/scripts/app/hostingField/hostingFieldList.controller.js |   19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/src/main/webapp/scripts/app/hostingField/hostingFieldList.controller.js b/src/main/webapp/scripts/app/hostingField/hostingFieldList.controller.js
index 15d268f..886b2ab 100644
--- a/src/main/webapp/scripts/app/hostingField/hostingFieldList.controller.js
+++ b/src/main/webapp/scripts/app/hostingField/hostingFieldList.controller.js
@@ -136,8 +136,8 @@
                         if (result.data.message.status === "success") {
                             $scope.vm.page.selectedPage = currentPage + 1;
 
-                            // �쟾�솕踰덊샇 議고쉶�떆 �븯�씠�뵂 異붽� �빐�꽌 議고쉶
                             result.data.data.forEach(function (data) {
+                                // �쟾�솕踰덊샇 議고쉶�떆 �븯�씠�뵂 異붽�, 諛곗뿴 �삎�깭 �젣嫄�, 肄ㅻ쭏 湲곗� 以꾨컮轅�
                                 if (data.tel != null && data.tel !== "") {
                                     var tels = data.tel;
                                     if (data.tel.indexOf("[") !== -1){
@@ -147,21 +147,26 @@
 
                                     for (var i = 0; i < telArr.length; i++) {
                                         let hyphen = telArr[i].trim();
-                                        telArr[i] = hyphen.replace(/(^02.{0}|^01.{1}|[0-9]{3})([0-9]+)([0-9]{4})/, "$1-$2-$3");
+                                        if (hyphen.length < 9) {
+                                            telArr[i] = hyphen.replace(/^(\d{3,4})(\d{4})$/, "$1-$2");
+                                        } else {
+                                            telArr[i] = hyphen.replace(/(^02.{0}|^01.{1}|[0-9]{3})([0-9]+)([0-9]{4})/, "$1-$2-$3");
+                                        }
                                         if (telArr[i] === "") {
                                             telArr.splice(i,1);
                                         }
                                     }
                                     data.tel = telArr.join();
+                                    data.tel = data.tel.replace(/\,/g,"</br>");
                                 }
-                            });
-
-                            // �씠硫붿씪 議고쉶�떆 諛곗뿴 �삎�깭 �젣嫄�
-                            result.data.data.forEach(function (data) {
-                                if (data.email != null && data.email !== "") {
+                                // �씠硫붿씪 議고쉶�떆 諛곗뿴 �삎�깭 �젣嫄� 諛� 肄ㅻ쭏 湲곗��쑝濡� 以꾨컮轅�
+                                if ($rootScope.isDefined(data.email)) {
                                     if (data.email.indexOf("[") !== -1){
                                         data.email = data.email.substr(1, data.email.indexOf("]")-1);
                                     }
+                                    if (data.email.indexOf(",") !== -1) {
+                                        data.email = data.email.replace(/\,/g,"</br>");
+                                    }
                                 }
                             });
 

--
Gitblit v1.8.0