Mercurial > lada > lada-client
diff app/view/grid/Probenzusatzwert.js @ 559:9a414a49dffe
Updated probenuzsatzwert grid columns and editors.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Fri, 06 Mar 2015 17:05:32 +0100 |
parents | d47ee7439f44 |
children | 1dedce48e3e1 |
line wrap: on
line diff
--- a/app/view/grid/Probenzusatzwert.js Fri Mar 06 17:03:52 2015 +0100 +++ b/app/view/grid/Probenzusatzwert.js Fri Mar 06 17:05:32 2015 +0100 @@ -36,11 +36,6 @@ xtype: 'toolbar', dock: 'bottom', items: ['->', { - text: 'Details', - icon: 'resources/img/document-open.png', - action: 'open', - disabled: true - }, { text: 'Hinzufügen', icon: 'resources/img/list-add.png', action: 'add', @@ -54,33 +49,54 @@ this.columns = [{ header: 'PZW-ID', dataIndex: 'id', - editor: { - xtype: 'numberfield', - allowBlank: false - } + width: 70 }, { header: 'PZW-Größe', dataIndex: 'pzsId', + flex: 1, renderer: function(value) { var store = Ext.data.StoreManager.get('probenzusaetze'); var record = store.getById(value); return record.get('beschreibung'); }, - flex: 1, editor: { - xtype: 'probenzusatzwert' + xtype: 'combobox', + store: Ext.data.StoreManager.get('probenzusaetze'), + displayField: 'beschreibung', + valueField: 'id', + allowBlank: false } }, { header: 'Messwert', - dataIndex: 'id', + dataIndex: 'messwertPzs', + width: 80, + renderer: function(value, meta, record) { + var nwg = record.get('nwgZuMesswert'); + if (value < nwg) { + return '<' + value; + } + return value; + }, + editor: { + allowBlank: false + } + }, { + header: 'Maßeinheit', + dataIndex: 'pzsId', + width: 80, renderer: function(value) { - var record = this.store.getById(value); - var messwert = record.get('messwertPzs'); - var nwg = record.get('nwgZuMesswert'); - if (messwert < nwg) { - return '<' + messwert; - } - return messwert; + var zstore = Ext.data.StoreManager.get('probenzusaetze'); + var mstore = Ext.data.StoreManager.get('messeinheiten'); + var mehId = zstore.getById(value).get('mehId'); + var record = mstore.findRecord('id', mehId); + return record.get('einheit'); + } + }, { + header: 'Nachweisgrenze', + dataIndex: 'nwgZuMesswert', + width: 110, + editor: { + allowBlank: false } }, { header: 'rel. Unsich.[%]', @@ -88,16 +104,6 @@ editor: { allowBlank: false } - }, { - header: 'Maßeinheit', - dataIndex: 'pzsId', - renderer: function(value) { - var zstore = Ext.data.StoreManager.get('probenzusaetze'); - var mstore = Ext.data.StoreManager.get('messeinheiten'); - var mehId = zstore.getById(value).get('mehId'); - var record = mstore.findRecord('id', mehId); - return record.get('einheit'); - } }]; this.initData(); this.callParent(arguments);