BUG 11230 - "Al crear un pmtable con un campo que tenga la validacion double y al ponerle un ..."

Sol. Set Validate code on Client side (ExtJs).
This commit is contained in:
ralpheav
2013-05-21 17:50:03 -04:00
parent fd9c9a006e
commit 29c4e1587d
2 changed files with 51 additions and 8 deletions

View File

@@ -229,13 +229,31 @@ Ext.onReady(function(){
Ext.getCmp('sizeEdit').disable();
}
if(selCombo == 'CHAR' || selCombo == 'VARCHAR') {
Ext.getCmp('sizeEdit').setMaxValue(999);
Ext.getCmp('sizeEdit').setMaxValue(((selCombo == 'CHAR')?255:999));
sizeField.getEl().dom.maxLength = 3;
Ext.getCmp('field_null').enable();
Ext.getCmp('field_null').setValue(true);
} else {
Ext.getCmp('sizeEdit').setMaxValue(99);
sizeField.getEl().dom.maxLength = 2;
Ext.getCmp('field_null').disable();
Ext.getCmp('field_null').setValue(false);
}
if( selCombo == 'CHAR'
|| selCombo == 'VARCHAR'
|| selCombo == 'TIME'
|| selCombo == 'DATE'
|| selCombo == 'DATETIME'
|| selCombo == 'BOOLEAN'
|| selCombo == 'REAL'
|| selCombo == 'FLOAT'
|| selCombo == 'DOUBLE') {
Ext.getCmp('field_primary_key').disable();
Ext.getCmp('field_incre').disable();
} else {
Ext.getCmp('field_primary_key').enable();
Ext.getCmp('field_incre').enable();
}
}
}//select
}
@@ -256,7 +274,10 @@ Ext.onReady(function(){
trueText: _('ID_YES'),
falseText: _('ID_NO'),
editor: {
xtype: 'checkbox'
xtype: 'checkbox',
id: 'field_null',
checked: false,
disabled: true
}
}, {
xtype: 'booleancolumn',
@@ -267,7 +288,10 @@ Ext.onReady(function(){
trueText: _('ID_YES'),
falseText: _('ID_NO'),
editor: {
xtype: 'checkbox'
xtype: 'checkbox',
id: 'field_primary_key',
disabled: true,
inputValue: 'always'
}
}, {
xtype: 'booleancolumn',
@@ -278,7 +302,10 @@ Ext.onReady(function(){
trueText: _('ID_YES'),
falseText: _('ID_NO'),
editor: {
xtype: 'checkbox'
xtype: 'checkbox',
id: 'field_incre',
disabled: true,
inputValue: 'always'
}
}
];

View File

@@ -358,13 +358,25 @@ Ext.onReady(function(){
Ext.getCmp('sizeEdit').disable();
}
if(selCombo == 'CHAR' || selCombo == 'VARCHAR') {
Ext.getCmp('sizeEdit').setMaxValue(999);
Ext.getCmp('sizeEdit').setMaxValue(((selCombo == 'CHAR')?255:999));
sizeField.getEl().dom.maxLength = 3;
} else {
Ext.getCmp('sizeEdit').setMaxValue(99);
sizeField.getEl().dom.maxLength = 2;
}
if( selCombo == 'CHAR'
|| selCombo == 'VARCHAR'
|| selCombo == 'TIME'
|| selCombo == 'DATE'
|| selCombo == 'DATETIME'
|| selCombo == 'BOOLEAN'
|| selCombo == 'REAL'
|| selCombo == 'FLOAT'
|| selCombo == 'DOUBLE') {
Ext.getCmp('field_incre').disable();
} else {
Ext.getCmp('field_incre').enable();
}
}
}//select
}
@@ -377,6 +389,7 @@ Ext.onReady(function(){
align: 'right',
editor: sizeField
}, {
xtype: 'booleancolumn',
header: _('ID_AUTO_INCREMENT'),
dataIndex: 'field_autoincrement',
@@ -385,7 +398,10 @@ Ext.onReady(function(){
trueText: _('ID_YES'),
falseText: _('ID_NO'),
editor: {
xtype: 'checkbox'
xtype: 'checkbox',
id: 'field_incre',
disabled: true,
inputValue: 'always'
}
}
];