comparison app/view/zusatzwerte/CreateForm.js @ 497:7c0653e8d9f7

Fixed some js related issues (unused vars, arrays, etc.) and code style.
author Raimund Renkert <raimund.renkert@intevation.de>
date Thu, 06 Nov 2014 10:38:17 +0100
parents 850ccfe5f3c4
children 8b4ec61c5752
comparison
equal deleted inserted replaced
496:d07e5086a64b 497:7c0653e8d9f7
1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz 1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
2 * Software engineering by Intevation GmbH 2 * Software engineering by Intevation GmbH
3 * 3 *
4 * This file is Free Software under the GNU GPL (v>=3) 4 * This file is Free Software under the GNU GPL (v>=3)
5 * and comes with ABSOLUTELY NO WARRANTY! Check out 5 * and comes with ABSOLUTELY NO WARRANTY! Check out
6 * the documentation coming with IMIS-Labordaten-Application for details. 6 * the documentation coming with IMIS-Labordaten-Application for details.
7 */ 7 */
8 8
9 /* 9 /*
10 * Formular to create and edit a Probenzusatzwert 10 * Formular to create and edit a Probenzusatzwert
11 */ 11 */
12 Ext.define('Lada.view.zusatzwerte.CreateForm', { 12 Ext.define('Lada.view.zusatzwerte.CreateForm', {
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
19 model: 'Lada.model.Zusatzwert', 19 model: 'Lada.model.Zusatzwert',
23 xtype: 'probenzusatzwert', 23 xtype: 'probenzusatzwert',
24 name: 'pzsId', 24 name: 'pzsId',
25 fieldLabel: 'PZW-Größe', 25 fieldLabel: 'PZW-Größe',
26 listeners: { 26 listeners: {
27 scope: this, 27 scope: this,
28 'change': function (field, newv, oldv, opts) { 28 'change': function(field, newv, oldv, opts) {
29 console.log(field, oldv, newv, opts); 29 console.log(field, oldv, newv, opts);
30 var ffield = this.getForm().findField("messeinheit"); 30 var ffield = this.getForm().findField('messeinheit');
31 pzsId = newv; 31 var pzsId = newv;
32 if (pzsId == undefined) { 32 if (!pzsId) {
33 pzsId = oldv; 33 pzsId = oldv;
34 } 34 }
35 ffield.setValue(this.model.getMesseinheit(pzsId)); 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 xtype: 'numberfield', 42 xtype: 'numberfield',
43 name: 'messwertPzs', 43 name: 'messwertPzs',
44 fieldLabel: 'Messwert' 44 fieldLabel: 'Messwert'
56 fieldLabel: 'Nachweisgrenze' 56 fieldLabel: 'Nachweisgrenze'
57 }]; 57 }];
58 this.callParent(arguments); 58 this.callParent(arguments);
59 } 59 }
60 }); 60 });
61

http://lada.wald.intevation.org