changeset 1087:b0873dfcef1d

Messprogramm form redesign
author Michael Stanko <mstanko@bfs.de>
date Fri, 29 Apr 2016 11:01:19 +0200
parents 61cc583c3649 (current diff) 3c42c06e3a36 (diff)
children 60af12dd4a13
files
diffstat 2 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/app.js	Fri Apr 29 10:20:05 2016 +0200
+++ b/app.js	Fri Apr 29 11:01:19 2016 +0200
@@ -157,6 +157,9 @@
                         for (var i = 0; i < mstLabor.length; i++) {
                             var item = store.getById(mstLabor[i].messstelle);
                             var itemLabor = store.getById(mstLabor[i].labor);
+                            if (!itemLabor) {
+                                continue;
+                            }
                             mstLaborStore.add({
                                 id: i,
                                 messStelle: mstLabor[i].messstelle,
--- a/app/controller/form/Probe.js	Fri Apr 29 10:20:05 2016 +0200
+++ b/app/controller/form/Probe.js	Fri Apr 29 11:01:19 2016 +0200
@@ -231,8 +231,8 @@
         var media = field.up('probeform').down('textfield[name="mediaDesk"]');
         var current = media.getValue().split(' ');
 
-        if (current.length < 13) {
-            for (var i = 0; i <= 12; i++) {
+        if (current.length < 12) {
+            for (var i = 0; i < 12; i++) {
                 if (i === 0) {
                     current.push('D:');
                 }
@@ -261,7 +261,7 @@
             }
             current[desk.layer + 1] = value;
             if (desk.layer < 2) {
-                for (var i = desk.layer + 2; i < 13; i++) {
+                for (var i = desk.layer + 2; i < 12; i++) {
                     current[i] = '00';
                 }
                 this.clearChildDesk(desk);

http://lada.wald.intevation.org