Mercurial > lada > lada-client
changeset 665:4a9bd2664da6
Field Validity in Probenzusatzwerte Grid
author | Dustin Demuth <dustin@intevation.de> |
---|---|
date | Thu, 19 Mar 2015 11:33:43 +0100 (2015-03-19) |
parents | 6fe3cef53e74 |
children | 7d99678fbee3 |
files | app/view/grid/Probenzusatzwert.js |
diffstat | 1 files changed, 35 insertions(+), 24 deletions(-) [+] |
line wrap: on
line diff
--- a/app/view/grid/Probenzusatzwert.js Thu Mar 19 11:25:38 2015 +0100 +++ b/app/view/grid/Probenzusatzwert.js Thu Mar 19 11:33:43 2015 +0100 @@ -67,7 +67,8 @@ store: Ext.data.StoreManager.get('probenzusaetze'), displayField: 'beschreibung', valueField: 'id', - allowBlank: false + allowBlank: false, + editable: false } }, { header: 'Messwert', @@ -76,7 +77,34 @@ flex: 1, editor: { xtype: 'numberfield', - allowBlank: false + allowBlank: false, + maxLength: 10, + enforceMaxLength: true, + allowExponential: false + } + }, { + header: '< NWG', + flex: 1, + renderer: function(value, meta, record) { + var nwg = record.get('nwgZuMesswert'); + var mw = record.get('messwertPzs'); + if ( mw < nwg) { + return '<'; + } + return ''; + } + }, { + header: 'Nachweisgrenze', + dataIndex: 'nwgZuMesswert', + xtype: 'numbercolumn', + format: '0', + flex: 1, + editor: { + xtype: 'numberfield', + allowBlank: false, + maxLength: 10, + enforceMaxLength: true, + allowExponential: false } }, { header: 'Maßeinheit', @@ -93,16 +121,6 @@ return record.get('einheit'); } }, { - header: 'Nachweisgrenze', - dataIndex: 'nwgZuMesswert', - xtype: 'numbercolumn', - format: '0', - flex: 1, - editor: { - xtype: 'numberfield', - allowBlank: false - } - }, { header: 'rel. Unsich.[%]', dataIndex: 'messfehler', xtype: 'numbercolumn', @@ -110,18 +128,11 @@ flex: 1, editor: { xtype: 'numberfield', - allowBlank: false - } - }, { - header: '< NWG', - flex: 1, - renderer: function(value, meta, record) { - var nwg = record.get('nwgZuMesswert'); - var mw = record.get('messwertPzs'); - if ( mw < nwg) { - return 'MW < NWG'; - } - return ''; + allowBlank: false, + maxLength: 3, + enforceMaxLength: true, + allowExponential: false, + allowDecimal: false } }]; this.initData();