Mercurial > lada > lada-client
diff app/view/messwerte/List.js @ 437:3ed0ab0f5ee5
Issue70: Neue Spalte zum Anzeigen ob der Messwert < als die NWG ist. Wenn MW <
NWG dann wird anstatt des MW die NWG eingetragen.
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Mon, 18 Nov 2013 10:09:13 +0100 |
parents | 2f4270ff8206 |
children | bba7fbcf2f70 |
line wrap: on
line diff
--- 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; }