comparison app/view/zusatzwerte/CreateForm.js @ 143:62b757ccdd8f

Show Messeinheit next to the Messwert field and change the value if the Probenzusatz changes.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Fri, 28 Jun 2013 11:16:44 +0200
parents a7bfaeb1655d
children d6d74718a102
comparison
equal deleted inserted replaced
142:dee9da79f055 143:62b757ccdd8f
7 initComponent: function() { 7 initComponent: function() {
8 this.items = [ 8 this.items = [
9 { 9 {
10 xtype: 'probenzusatzwert', 10 xtype: 'probenzusatzwert',
11 name: 'pzsId', 11 name: 'pzsId',
12 fieldLabel: 'PZW-Größe' 12 fieldLabel: 'PZW-Größe',
13 listeners: {
14 scope: this,
15 'change': function (field, newv, oldv, opts) {
16 console.log(field, oldv, newv, opts);
17 var ffield = this.getForm().findField("messeinheit");
18 pzsId = newv;
19 if (pzsId == undefined) {
20 pzsId = oldv;
21 }
22 ffield.setValue(this.model.getMesseinheit(pzsId));
23 }
24 }
13 }, 25 },
14 { 26 {
15 xtype: 'textfield', 27 layout: "column",
16 name: 'messwertPzs', 28 border: 0,
17 fieldLabel: 'Messwert' 29 items: [
30 {
31 xtype: 'textfield',
32 name: 'messwertPzs',
33 fieldLabel: 'Messwert'
34 },
35 {
36 xtype: 'displayfield',
37 name: 'messeinheit'
38 }
39 ]
18 }, 40 },
19 { 41 {
20 xtype: 'textfield', 42 xtype: 'textfield',
21 name: 'messfehler', 43 name: 'messfehler',
22 fieldLabel: 'rel. Unsich.[%]' 44 fieldLabel: 'rel. Unsich.[%]'
28 } 50 }
29 ]; 51 ];
30 this.callParent(); 52 this.callParent();
31 } 53 }
32 }); 54 });
55

http://lada.wald.intevation.org