comparison app/view/window/ProbeCreate.js @ 619:7a7a16b0a548

Added window for creating probe objects.
author Raimund Renkert <raimund.renkert@intevation.de>
date Mon, 16 Mar 2015 12:09:17 +0100
parents
children 6a6d1b02a1a3
comparison
equal deleted inserted replaced
616:dfc07fa0ceb1 619:7a7a16b0a548
1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
2 * Software engineering by Intevation GmbH
3 *
4 * This file is Free Software under the GNU GPL (v>=3)
5 * and comes with ABSOLUTELY NO WARRANTY! Check out
6 * the documentation coming with IMIS-Labordaten-Application for details.
7 */
8
9 /*
10 * Window to edit a Probe
11 */
12 Ext.define('Lada.view.window.ProbeCreate', {
13 extend: 'Ext.window.Window',
14 alias: 'widget.probecreate',
15
16 requires: [
17 'Lada.view.form.Probe'
18 ],
19
20 collapsible: true,
21 maximizable: true,
22 autoShow: true,
23 autoScroll: true,
24 layout: 'fit',
25
26 record: null,
27
28 initComponent: function() {
29 this.title = '§3-Probe';
30 this.buttons = [{
31 text: 'Schließen',
32 scope: this,
33 handler: this.close
34 }];
35 this.width = 700;
36 // InitialConfig is the config object passed to the constructor on
37 // creation of this window. We need to pass it throuh to the form as
38 // we need the "modelId" param to load the correct item.
39
40 this.items = [{
41 border: 0,
42 autoScroll: true,
43 items: [{
44 xtype: 'probeform'
45 }]
46 }];
47 this.callParent(arguments);
48 },
49
50 initData: function() {
51 var record = Ext.create('Lada.model.Probe');
52 this.down('probeform').setRecord(record);
53 },
54
55 setMessages: function(errors, warnings) {
56 this.down('probeform').setMessages(errors, warnings);
57 },
58
59 clearMessages: function() {
60 this.down('probeform').clearMessages();
61 }
62 });

http://lada.wald.intevation.org