changeset 991:19b78162e128

reorg mewwert grid
author Michael Stanko <mstanko@bfs.de>
date Mon, 28 Dec 2015 12:01:47 +0100
parents c2a726887dd7
children 77ea9a5c5f1d
files app/model/Messwert.js app/view/grid/Messwert.js
diffstat 2 files changed, 45 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/app/model/Messwert.js	Wed Dec 16 09:49:09 2015 +0100
+++ b/app/model/Messwert.js	Mon Dec 28 12:01:47 2015 +0100
@@ -29,7 +29,14 @@
         name: 'messwert',
         type: 'float'
     }, {
-        name: 'messwertNwg'
+        name: 'messwertNwg',
+        convert: function(v) {
+            if (!v) {
+                return null;
+            }
+            return "<";
+        },
+//         defaultValue: null
     }, {
         name: 'messfehler',
         type: 'float'
--- a/app/view/grid/Messwert.js	Wed Dec 16 09:49:09 2015 +0100
+++ b/app/view/grid/Messwert.js	Mon Dec 28 12:01:47 2015 +0100
@@ -95,16 +95,29 @@
                 triggerAction: 'all'
             }
         }, {
+            header: '&lt;NWG',
+            width: 60,
+            dataIndex: 'messwertNwg',
+            editor: {
+                xtype: 'checkbox'
+            }
+        }, {
             header: 'Messwert',
             dataIndex: 'messwert',
             xtype: 'numbercolumn',
             width: 80,
+            renderer: function(value) {
+              return value.toExponential(3);
+            },
             editor: {
                 xtype: 'numberfield',
                 allowBlank: false,
                 maxLength: 10,
-                allowExponential: false,
-                enforceMaxLength: true
+                allowExponential: true,
+                enforceMaxLength: true,
+                hideTrigger: true,
+                keyNavEnabled: false,
+                mouseWheelEnabled: false
             }
         }, {
             header: 'Messeinheit',
@@ -132,16 +145,6 @@
                 triggerAction: 'all'
             }
         }, {
-            header: '&lt;NWG',
-            xtype: 'numbercolumn',
-            width: 60,
-            dataIndex: 'messwertNwg'
-        }, {
-            header: 'Nachweisgrenze',
-            xtype: 'numbercolumn',
-            width: 110,
-            dataIndex: 'nwgZuMesswert'
-        }, {
             header: 'Messfehler',
             dataIndex: 'messfehler',
             xtype: 'numbercolumn',
@@ -154,6 +157,28 @@
                 enforceMaxLength: true
             }
         }, {
+            header: 'Nachweisgrenze',
+            xtype: 'numbercolumn',
+            dataIndex: 'nwgZuMesswert',
+            width: 80,
+            renderer: function(value) {
+              if (!value) {
+                return null;
+              } else {
+                return value.toExponential(3);
+              }
+            },
+            editor: {
+                xtype: 'numberfield',
+                allowBlank: true,
+                maxLength: 10,
+                allowExponential: true,
+                enforceMaxLength: true,
+                hideTrigger: true,
+                keyNavEnabled: false,
+                mouseWheelEnabled: false
+            }
+        }, {
             header: 'Grenzwertüberschreitung',
             dataIndex: 'grenzwertueberschreitung',
             flex: 1,

http://lada.wald.intevation.org