[Lada-commits] [PATCH] Issue70: Neue Spalte zum Anzeigen ob der Messwert < als die NWG ist. Wenn MW <

Wald Commits scm-commit at wald.intevation.org
Mon Nov 18 10:11:14 CET 2013


# HG changeset patch
# User Torsten Irländer <torsten.irlaender at intevation.de>
# Date 1384765753 -3600
# Node ID 3ed0ab0f5ee51608ea68d4bd1503d71d8c41c444
# Parent  067ecffac15d92177dfeb0c43756b048bce91394
Issue70: Neue Spalte zum Anzeigen ob der Messwert < als die NWG ist. Wenn MW <
NWG dann wird anstatt des MW die NWG eingetragen.

diff -r 067ecffac15d -r 3ed0ab0f5ee5 app/view/messwerte/List.js
--- a/app/view/messwerte/List.js	Mon Nov 11 11:22:16 2013 +0100
+++ b/app/view/messwerte/List.js	Mon Nov 18 10:09:13 2013 +0100
@@ -38,6 +38,21 @@
         ];
         this.columns = [
             {
+                header: '<NWG',
+                dataIndex: 'messwert',
+                renderer: function(value, row) {
+                    // the seconds argument here is not documented in JQuery
+                    // but it has the current rendererd row and this
+                    // referenced the record.
+                    var nwg = row.record.get('nwgZuMesswert');
+                    if (value < nwg) {
+                        return "<";
+                    } else {
+                        return "";
+                    }
+                }
+            },
+            {
                 header: 'Messwert',
                 dataIndex: 'messwert',
                 renderer: function(value, row) {
@@ -46,7 +61,7 @@
                     // referenced the record.
                     var nwg = row.record.get('nwgZuMesswert');
                     if (value < nwg) {
-                        return "<"+value;
+                        return nwg;
                     } else {
                         return value;
                     }


More information about the Lada-commits mailing list