diff app/controller/form/Probe.js @ 932:c8aceb9e60cc

fix descriptor editing
author Michael Stanko <mstanko@bfs.de>
date Wed, 23 Sep 2015 07:39:30 +0200
parents 81e7c847cb58
children 8dd758b9b8ea
line wrap: on
line diff
--- a/app/controller/form/Probe.js	Tue Sep 22 12:56:30 2015 +0200
+++ b/app/controller/form/Probe.js	Wed Sep 23 07:39:30 2015 +0200
@@ -257,10 +257,16 @@
                 value = records[0].get('sn');
             }
             current[desk.layer + 1] = value;
-            for (var i = desk.layer + 2; i < 13; i++) {
-                current[i] = '00';
+            if (desk.layer < 2) {
+                for (var i = desk.layer + 2; i < 13; i++) {
+                    current[i] = '00';
+                }
+                this.clearChildDesk(desk);
             }
-            this.clearChildDesk(desk);
+            else if (desk.layer === 2 && current[1] === '01') {
+                current[4] = '00';
+//  hier muss noch S3 in der Maske geleert werden
+            }
         }
         media.setValue(current.join(' ').trim());
     },

http://lada.wald.intevation.org