[Lada-commits] [PATCH 1 of 4] Display messwert of Zusatzwert with a prepended "<" if the messwert is smaller

Wald Commits scm-commit at wald.intevation.org
Fri Jun 28 11:17:38 CEST 2013


# HG changeset patch
# User Torsten Irländer <torsten.irlaender at intevation.de>
# Date 1372404367 -7200
# Node ID 00e43c00b7f2ab23893126982d9e1ff9c26b5897
# Parent  df6e36dd57ee83b0ab0382259428d2b3158c9c92
Display messwert of Zusatzwert with a prepended "<" if the messwert is smaller
then the nachweisgrenze.

diff -r df6e36dd57ee -r 00e43c00b7f2 app/view/zusatzwerte/List.js
--- a/app/view/zusatzwerte/List.js	Thu Jun 27 16:21:21 2013 +0200
+++ b/app/view/zusatzwerte/List.js	Fri Jun 28 09:26:07 2013 +0200
@@ -46,7 +46,21 @@
                 },
                 flex: 1
             },
-            {header: 'Messwert', dataIndex: 'messwertPzs'},
+            {
+                header: 'Messwert',
+                dataIndex: 'pzsId',
+                renderer: function(value) {
+                    var store = Ext.getStore('Zusatzwerte');
+                    var record = store.getById(value);
+                    var messwert = record.get('messwertPzs');
+                    var nwg = record.get('nwgZuMesswert');
+                    if (messwert < nwg ) {
+                        return "<"+messwert;
+                    } else {
+                        return messwert;
+                    }
+                }
+            },
             {header: 'rel. Unsich.[%]', dataIndex: 'messfehler'},
             {
                 header: 'Maßeinheit',


More information about the Lada-commits mailing list