From 2fcad5de1f5cb6e78c7d68a4dcb68de3263fb5ce Mon Sep 17 00:00:00 2001 From: daekuk Date: Fri, 23 Jan 2026 18:08:03 +0900 Subject: [PATCH] =?UTF-8?q?-=20blur=20+=20keydown=20=EC=A0=9C=EC=96=B4?= =?UTF-8?q?=EB=A5=BC=20=EC=9C=84=ED=95=B4=20editoptions=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../onl/admin/adapter/adapterManDetail.jsp | 45 ++++++++++++------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/WebContent/jsp/onl/admin/adapter/adapterManDetail.jsp b/WebContent/jsp/onl/admin/adapter/adapterManDetail.jsp index 9529ce9..04c907b 100644 --- a/WebContent/jsp/onl/admin/adapter/adapterManDetail.jsp +++ b/WebContent/jsp/onl/admin/adapter/adapterManDetail.jsp @@ -513,7 +513,36 @@ function gridRendering(){ colModel:[ { name : 'PRPTYGROUPNAME' , align:'left' , hidden: true }, { name : 'PRPTYNAME' , width: 70 , align:'left' }, - { name : 'PRPTY2VAL' , width: 70 , align:'left' , title:false, editable: true, formatter:mltplFormatter, unformatter:mltplUnFormatter}, + { + name : 'PRPTY2VAL', + width: 70, + align:'left', + title:false, + editable: true, + formatter:mltplFormatter, + unformatter:mltplUnFormatter, + editoptions: { + dataEvents: [ + { + type: 'keydown', + fn: function(e) { + if (e.which === 13) { + var val = $(this).val(); + $(this).val($.trim(val)); + } + } + }, + { + type: 'blur', + fn: function(e) { + var val = $(this).val(); + $(this).val($.trim(val)); + } + } + ] + } + // [여기까지 추가] + }, { name : 'PRPTYDESC' , width: 300 , align:'left'}, { name : 'DMNKND' , hidden:true}, { name : 'DOMAINTYPE' , hidden:true, formatter:nullFormatter} @@ -943,20 +972,6 @@ $(document).ready(function() { buttonControl(isDetail); titleControl(isDetail); - // 프라퍼티 값 space 확인 및 제거 - $(document).on('blur', '#grid input[name="PRPTY2VAL"]', function() { - var $this = $(this); - var originalVal = $this.val(); - - if (originalVal) { - var trimmedVal = $.trim(originalVal); - - // 공백 제거 전/후가 다를 때만 값을 변경 (불필요한 동작 방지) - if (originalVal !== trimmedVal) { - $this.val(trimmedVal); - } - } - }); }); // clientManPopup.jsp에서 호출될 함수 (전역 스코프에 정의)