[Lada-commits] [PATCH 2 of 4] Simplified logic in Messwert listing. No extra logic anymore to check if a "<"

Wald Commits scm-commit at wald.intevation.org
Tue Dec 3 11:34:37 CET 2013


# HG changeset patch
# User Torsten Irländer <torsten.irlaender at intevation.de>
# Date 1386066195 -3600
# Node ID bba7fbcf2f709f5f3f6150458ce8d92323090dd1
# Parent  60763d9132033fd888700b4c264815c8c0998b03
Simplified logic in Messwert listing. No extra logic anymore to check if a "<"
char is displayed in front of the measured value. Simply dislplay the value
and value form messwertNwg.

diff -r 60763d913203 -r bba7fbcf2f70 app/view/messwerte/List.js
--- a/app/view/messwerte/List.js	Tue Dec 03 11:21:08 2013 +0100
+++ b/app/view/messwerte/List.js	Tue Dec 03 11:23:15 2013 +0100
@@ -39,33 +39,11 @@
         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 "";
-                    }
-                }
+                dataIndex: 'messwertNwg'
             },
             {
                 header: 'Messwert',
-                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 nwg;
-                    } else {
-                        return value;
-                    }
-                }
+                dataIndex: 'messwert'
             },
             {header: 'Messfehler', dataIndex: 'messfehler'},
             {


More information about the Lada-commits mailing list