- blur + keydown 제어를 위해 editoptions 추가
This commit is contained in:
@@ -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에서 호출될 함수 (전역 스코프에 정의)
|
||||
|
||||
Reference in New Issue
Block a user