From cc869e4f0c0dc594b2244fb4540ab56edfd2602a Mon Sep 17 00:00:00 2001 From: wyu <kknd09321@nate.com> Date: 월, 29 11월 2021 15:07:12 +0900 Subject: [PATCH] Merge branch 'master' of http://192.168.0.25:9001/r/owl-kisa --- src/main/webapp/scripts/app/customField/customFieldAdd.controller.js | 68 ++++++++++++++++++++++++++++++++-- 1 files changed, 64 insertions(+), 4 deletions(-) diff --git a/src/main/webapp/scripts/app/customField/customFieldAdd.controller.js b/src/main/webapp/scripts/app/customField/customFieldAdd.controller.js index 0107228..563582d 100644 --- a/src/main/webapp/scripts/app/customField/customFieldAdd.controller.js +++ b/src/main/webapp/scripts/app/customField/customFieldAdd.controller.js @@ -16,7 +16,7 @@ formCheck : formCheck, // �뤌 泥댄겕 addOption : addOption, // �샃�뀡 媛� 異붽��븯湲� removeOption : removeOption, // �샃�뀡 �궘�젣 - changeFieldType : changeFieldType // �븘�뱶 �쑀�삎 蹂�寃� + changeFieldType : changeFieldType, // �븘�뱶 �쑀�삎 蹂�寃� }; $scope.vm = { @@ -25,7 +25,12 @@ customFieldType : "INPUT", // �궗�슜�옄 �젙�쓽 �븘�뱶 �쑀�삎 defaultValue : "", // 湲곕낯 媛� options : [], // �샃�뀡 - optionText : "" // �샃�뀡 媛� + optionText : "", // �샃�뀡 媛� + numberType : "", + ipAdress : "", + email : "", + site : "", + tel : "" } }; @@ -43,6 +48,7 @@ $scope.vm.form.defaultValue = ""; } + // Select �샃�뀡 媛� 異붽��븯湲� function addOption() { @@ -87,6 +93,55 @@ } } + // function chkPhoneType(type) { + // var input = $scope.vm.form.tel + // + // //focus out�씤 寃쎌슦 + // //input type�쓣 text濡� 諛붽씀怨� '-'異붽� + // if(type == 'blur'){ + // $scope.vm.form.tel; + // var phone = chkItemPhone(input); + // } + // + // //focus�씤 寃쎌슦 + // //input type�쓣 number濡� 諛붽씀怨� '-' �젣嫄� + // if(type == 'focus'){ + // var phone = input.replace( /-/gi, ''); + // $scope.vm.form.tel('type', 'number'); + // } + // + // $scope.vm.form.tel(phone); + // } + // + // function chkItemPhone(temp) { + // var number = temp.replace(/[^0-9]/g, ""); + // var phone = ""; + // + // if (number.length < 9) { + // return number; + // } else if (number.length < 10) { + // phone += number.substr(0, 2); + // phone += "-"; + // phone += number.substr(2, 3); + // phone += "-"; + // phone += number.substr(5); + // } else if (number.length < 11) { + // phone += number.substr(0, 3); + // phone += "-"; + // phone += number.substr(3, 3); + // phone += "-"; + // phone += number.substr(6); + // } else { + // phone += number.substr(0, 3); + // phone += "-"; + // phone += number.substr(3, 4); + // phone += "-"; + // phone += number.substr(7); + // } + // + // return phone; + // } + // �뤌 泥댄겕 function formCheck(formInvalid) { if (formInvalid) { @@ -94,7 +149,7 @@ } // �떎以�, �떒�씪 �꽑�깮�씪 寃쎌슦�뿉 - if ($scope.vm.form.customFieldType !== "INPUT") { + if ($scope.vm.form.customFieldType === "MULTI_SELECT" || $scope.vm.form.customFieldType === "SINGLE_SELECT") { // �샃�뀡�씠 1媛� �씠�븯�씪 寃쎌슦�뿉�뒗 ���젆�듃 �깭洹몃�� 留뚮뱾 �닔 �뾾�떎. if ($scope.vm.form.options.length < 1) { return true; @@ -110,8 +165,13 @@ var content = angular.copy($scope.vm.form); content.name = $rootScope.preventXss(content.name); + content.numberType = $rootScope.preventXss(content.numberType); + content.ipAdress = $rootScope.preventXss(content.ipAdress); + content.email = $rootScope.preventXss(content.email); + content.site = $rootScope.preventXss(content.site); + content.tel = $rootScope.preventXss(content.tel); - if ($scope.vm.form.customFieldType !== 'INPUT') { + if ($scope.vm.form.customFieldType === 'MULTI_SELECT'|| $scope.vm.form.customFieldType === "SINGLE_SELECT") { var convertDefaultValues = ""; angular.forEach(content.defaultValue.split("#"), function (value) { -- Gitblit v1.8.0