[Lada-commits] [PATCH 6 of 7] Updated probenuzsatzwert grid columns and editors

Wald Commits scm-commit at wald.intevation.org
Fri Mar 6 17:05:18 CET 2015


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1425657932 -3600
# Node ID 9a414a49dffeec23a78bec6ae95414c741c5525f
# Parent  9d4e4f07e75146ce3437472e4da700525f25e7ca
Updated probenuzsatzwert grid columns and editors.

diff -r 9d4e4f07e751 -r 9a414a49dffe app/view/grid/Probenzusatzwert.js
--- 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);


More information about the Lada-commits mailing list