annotate app/view/window/OrtCreate.js @ 704:2d454bfef426

Further Failure Messages
author Dustin Demuth <dustin@intevation.de>
date Fri, 27 Mar 2015 11:22:35 +0100
parents 6a6d1b02a1a3
children 6f6d2df00130
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',
688
6a6d1b02a1a3 constrain windows to viewport
Dustin Demuth <dustin@intevation.de>
parents: 642
diff changeset
26 constrain: true,
642
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
27
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
28 record: null,
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
29 grid: null,
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
30
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
31 initComponent: function() {
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
32 this.title = 'Ort';
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
33 this.buttons = [{
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
34 text: 'Schließen',
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
35 scope: this,
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
36 handler: this.close
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
37 }];
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
38 this.width = 900;
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
39 this.height = 515;
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
40 this.bodyStyle = {background: '#fff'};
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
41
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
42 this.items = [{
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
43 region: 'west',
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
44 border: 0,
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
45 layout: 'vbox',
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
46 items: [{
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
47 xtype: 'ortform',
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
48 margin: 5
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
49 }, {
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
50 xtype: 'locationform',
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
51 margin: 5
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 }, {
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
54 xtype: 'fset',
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
55 bodyStyle: {
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
56 background: '#fff'
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
57 },
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
58 layout: 'border',
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
59 name: 'mapfield',
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
60 title: 'Karte',
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
61 region: 'center',
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
62 padding: '5, 5',
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
63 margin: 5,
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
64 items: [{
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
65 xtype: 'map',
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
66 region: 'center',
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
67 layout: 'border',
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
68 bodyStyle: {
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
69 background: '#fff'
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
70 },
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
71 name: 'map'
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 }];
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
74 this.callParent(arguments);
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
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
77 initData: function() {
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
78 var ort = Ext.create('Lada.model.Ort', {
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
79 probeId: this.record.get('id')
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
80 });
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
81 this.down('ortform').setRecord(ort);
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
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
84 setMessages: function(errors, warnings) {
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
85 //todo this is a stub
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
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
88 clearMessages: function() {
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
89 //todo this is a stub
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
90 }
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
91 });

http://lada.wald.intevation.org