comparison app/view/zusatzwerte/CreateForm.js @ 491:850ccfe5f3c4

Code style.
author Raimund Renkert <raimund.renkert@intevation.de>
date Fri, 31 Oct 2014 23:23:32 +0100
parents a07cf685606c
children 7c0653e8d9f7
comparison
equal deleted inserted replaced
490:446e99cfd425 491:850ccfe5f3c4
13 extend: 'Lada.view.widgets.LadaForm', 13 extend: 'Lada.view.widgets.LadaForm',
14 requires : [ 14 requires : [
15 'Lada.view.widgets.Probenzusatzwert', 15 'Lada.view.widgets.Probenzusatzwert',
16 'Ext.layout.container.Column' 16 'Ext.layout.container.Column'
17 ], 17 ],
18
18 model: 'Lada.model.Zusatzwert', 19 model: 'Lada.model.Zusatzwert',
20
19 initComponent: function() { 21 initComponent: function() {
20 this.items = [ 22 this.items = [{
21 { 23 xtype: 'probenzusatzwert',
22 xtype: 'probenzusatzwert', 24 name: 'pzsId',
23 name: 'pzsId', 25 fieldLabel: 'PZW-Größe',
24 fieldLabel: 'PZW-Größe', 26 listeners: {
25 listeners: { 27 scope: this,
26 scope: this, 28 'change': function (field, newv, oldv, opts) {
27 'change': function (field, newv, oldv, opts) { 29 console.log(field, oldv, newv, opts);
28 console.log(field, oldv, newv, opts); 30 var ffield = this.getForm().findField("messeinheit");
29 var ffield = this.getForm().findField("messeinheit"); 31 pzsId = newv;
30 pzsId = newv; 32 if (pzsId == undefined) {
31 if (pzsId == undefined) { 33 pzsId = oldv;
32 pzsId = oldv;
33 }
34 ffield.setValue(this.model.getMesseinheit(pzsId));
35 } 34 }
35 ffield.setValue(this.model.getMesseinheit(pzsId));
36 } 36 }
37 }, 37 }
38 { 38 }, {
39 layout: "column", 39 layout: "column",
40 border: 0, 40 border: 0,
41 items: [ 41 items: [{
42 {
43 xtype: 'numberfield',
44 name: 'messwertPzs',
45 fieldLabel: 'Messwert'
46 },
47 {
48 xtype: 'displayfield',
49 name: 'messeinheit'
50 }
51 ]
52 },
53 {
54 xtype: 'numberfield', 42 xtype: 'numberfield',
55 name: 'messfehler', 43 name: 'messwertPzs',
56 fieldLabel: 'rel. Unsich.[%]' 44 fieldLabel: 'Messwert'
57 }, 45 }, {
58 { 46 xtype: 'displayfield',
59 xtype: 'numberfield', 47 name: 'messeinheit'
60 name: 'nwgZuMesswert', 48 }]
61 fieldLabel: 'Nachweisgrenze' 49 }, {
62 } 50 xtype: 'numberfield',
63 ]; 51 name: 'messfehler',
64 this.callParent(); 52 fieldLabel: 'rel. Unsich.[%]'
53 }, {
54 xtype: 'numberfield',
55 name: 'nwgZuMesswert',
56 fieldLabel: 'Nachweisgrenze'
57 }];
58 this.callParent(arguments);
65 } 59 }
66 }); 60 });
67 61

http://lada.wald.intevation.org