Mercurial > lada > lada-client
comparison app/view/window/OrtCreate.js @ 642:bd151c8b7ad1
Added window to create a new ort.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Tue, 17 Mar 2015 16:05:04 +0100 |
parents | |
children | 6a6d1b02a1a3 |
comparison
equal
deleted
inserted
replaced
641:5b5bba1d8e6a | 642:bd151c8b7ad1 |
---|---|
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 Messung | |
11 */ | |
12 Ext.define('Lada.view.window.OrtCreate', { | |
13 extend: 'Ext.window.Window', | |
14 alias: 'widget.ortcreate', | |
15 | |
16 requires: [ | |
17 'Lada.view.panel.Map', | |
18 'Lada.view.form.Ort', | |
19 'Lada.view.form.Location' | |
20 ], | |
21 | |
22 collapsible: true, | |
23 maximizable: true, | |
24 autoshow: true, | |
25 layout: 'border', | |
26 | |
27 record: null, | |
28 grid: null, | |
29 | |
30 initComponent: function() { | |
31 this.title = 'Ort'; | |
32 this.buttons = [{ | |
33 text: 'Schließen', | |
34 scope: this, | |
35 handler: this.close | |
36 }]; | |
37 this.width = 900; | |
38 this.height = 515; | |
39 this.bodyStyle = {background: '#fff'}; | |
40 | |
41 this.items = [{ | |
42 region: 'west', | |
43 border: 0, | |
44 layout: 'vbox', | |
45 items: [{ | |
46 xtype: 'ortform', | |
47 margin: 5 | |
48 }, { | |
49 xtype: 'locationform', | |
50 margin: 5 | |
51 }] | |
52 }, { | |
53 xtype: 'fset', | |
54 bodyStyle: { | |
55 background: '#fff' | |
56 }, | |
57 layout: 'border', | |
58 name: 'mapfield', | |
59 title: 'Karte', | |
60 region: 'center', | |
61 padding: '5, 5', | |
62 margin: 5, | |
63 items: [{ | |
64 xtype: 'map', | |
65 region: 'center', | |
66 layout: 'border', | |
67 bodyStyle: { | |
68 background: '#fff' | |
69 }, | |
70 name: 'map' | |
71 }] | |
72 }]; | |
73 this.callParent(arguments); | |
74 }, | |
75 | |
76 initData: function() { | |
77 var ort = Ext.create('Lada.model.Ort', { | |
78 probeId: this.record.get('id') | |
79 }); | |
80 this.down('ortform').setRecord(ort); | |
81 }, | |
82 | |
83 setMessages: function(errors, warnings) { | |
84 //todo this is a stub | |
85 }, | |
86 | |
87 clearMessages: function() { | |
88 //todo this is a stub | |
89 } | |
90 }); |