annotate app/view/window/OrtCreate.js @ 660:060a4f66de08

merged
author Dustin Demuth <dustin@intevation.de>
date Thu, 19 Mar 2015 10:56:01 +0100
parents bd151c8b7ad1
children 6a6d1b02a1a3
rev   line source
642
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
2 * Software engineering by Intevation GmbH
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
3 *
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
4 * This file is Free Software under the GNU GPL (v>=3)
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
6 * the documentation coming with IMIS-Labordaten-Application for details.
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
7 */
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
8
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
9 /*
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
10 * Window to edit a Messung
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
11 */
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
12 Ext.define('Lada.view.window.OrtCreate', {
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
13 extend: 'Ext.window.Window',
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
14 alias: 'widget.ortcreate',
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
15
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
16 requires: [
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
17 'Lada.view.panel.Map',
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
18 'Lada.view.form.Ort',
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
19 'Lada.view.form.Location'
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
20 ],
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
21
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
22 collapsible: true,
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
23 maximizable: true,
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
24 autoshow: true,
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
25 layout: 'border',
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
26
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
27 record: null,
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
28 grid: null,
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
29
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
30 initComponent: function() {
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
31 this.title = 'Ort';
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
32 this.buttons = [{
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
33 text: 'Schließen',
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
34 scope: this,
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
35 handler: this.close
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
36 }];
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
37 this.width = 900;
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
38 this.height = 515;
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
39 this.bodyStyle = {background: '#fff'};
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
40
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
41 this.items = [{
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
42 region: 'west',
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
43 border: 0,
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
44 layout: 'vbox',
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
45 items: [{
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
46 xtype: 'ortform',
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
47 margin: 5
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
48 }, {
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
49 xtype: 'locationform',
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
50 margin: 5
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
51 }]
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
52 }, {
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
53 xtype: 'fset',
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
54 bodyStyle: {
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
55 background: '#fff'
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
56 },
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
57 layout: 'border',
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
58 name: 'mapfield',
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
59 title: 'Karte',
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
60 region: 'center',
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
61 padding: '5, 5',
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
62 margin: 5,
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
63 items: [{
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
64 xtype: 'map',
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
65 region: 'center',
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
66 layout: 'border',
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
67 bodyStyle: {
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
68 background: '#fff'
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
69 },
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
70 name: 'map'
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
71 }]
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
72 }];
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
73 this.callParent(arguments);
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
74 },
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
75
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
76 initData: function() {
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
77 var ort = Ext.create('Lada.model.Ort', {
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
78 probeId: this.record.get('id')
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
79 });
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
80 this.down('ortform').setRecord(ort);
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
81 },
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
82
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
83 setMessages: function(errors, warnings) {
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
84 //todo this is a stub
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
85 },
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
86
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
87 clearMessages: function() {
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
88 //todo this is a stub
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
89 }
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
90 });

http://lada.wald.intevation.org