PM-803
Se puede crear un PMTable con fields con los caracteres & %
This commit is contained in:
@@ -186,9 +186,19 @@ Ext.onReady(function(){
|
||||
xtype: 'textfield',
|
||||
allowBlank: true,
|
||||
listeners:{
|
||||
change: function(f,e){
|
||||
this.setValue(this.getValue().replace(/\s/g,'').toUpperCase());
|
||||
change: function(f,e){
|
||||
this.setValue(this.getValue().replace(/^\s+/,'').replace(/\s+$/,''));
|
||||
var valueInputField= /^[0-9a-zA-Z\_]+$/.test(this.getValue()) ? true : false;
|
||||
if (valueInputField) {
|
||||
this.setValue(this.getValue().replace(/\s/g,'').toUpperCase());
|
||||
}else{
|
||||
//Ext.Msg.alert(_('ID_WARNING'), _('ID_FIELD_NAME'));
|
||||
this.setValue('');
|
||||
}
|
||||
}
|
||||
},
|
||||
validator: function(v) {
|
||||
return valueInputField= /^[0-9a-zA-Z\_]+$/.test(v)?true:false;
|
||||
}
|
||||
}
|
||||
}, {
|
||||
@@ -198,7 +208,20 @@ Ext.onReady(function(){
|
||||
width: 220,
|
||||
editor:{
|
||||
xtype: 'textfield',
|
||||
allowBlank: true
|
||||
allowBlank: true,
|
||||
listeners:{
|
||||
change: function(f,e){
|
||||
this.setValue(this.getValue().replace(/^\s+/,'').replace(/\s+$/,''));
|
||||
var valueInputField= /^[0-9a-zA-Z\_]+$/.test(this.getValue()) ? true : false;
|
||||
if (!valueInputField) {
|
||||
//Ext.Msg.alert(_('ID_WARNING'), _('ID_FIELD_LABEL'));
|
||||
this.setValue('');
|
||||
}
|
||||
}
|
||||
},
|
||||
validator: function(v) {
|
||||
return valueInputField= /^[0-9a-zA-Z\_]+$/.test(v)?true:_('ID_ROLE_NAME_NOT_EMPTY');
|
||||
}
|
||||
}
|
||||
}, {
|
||||
id: 'field_type',
|
||||
|
||||
Reference in New Issue
Block a user