diff app/view/grid/Status.js @ 957:881984972e0e

Added Statusstufe to MessungForm
author Dustin Demuth <dustin@intevation.de>
date Mon, 09 Nov 2015 14:13:27 +0100
parents 45c67a784b31
children 5d57c6c53e20
line wrap: on
line diff
--- a/app/view/grid/Status.js	Mon Nov 09 13:31:43 2015 +0100
+++ b/app/view/grid/Status.js	Mon Nov 09 14:13:27 2015 +0100
@@ -95,10 +95,14 @@
             header: 'Stufe',
             dataIndex: 'statusStufe',
             renderer: function(value) {
-                if (value===null || value === '' || value === 0) {
+                if (value===null || value === '') {
                     return 'Fehlerhafte Daten';
                 }
-                var r = statusStufeStore.getById(value).get('stufe')
+                var item = statusStufeStore.getById(value);
+                var r;
+                if (item) {
+                    r = item.get('stufe');
+                }
                 if (r === null) {
                     r = 'Error';
                 }
@@ -120,7 +124,11 @@
                 if (value===null || value === '') {
                     return '';
                 }
-                var r = statusWerteStore.getById(value).get('wert')
+                var item = statusWerteStore.getById(value);
+                var r;
+                if (item) {
+                    r = item.get('wert');
+                }
                 if (r === null) {
                     r = 'Error';
                 }

http://lada.wald.intevation.org