annotate app/view/window/OrtCreate.js @ 759:b7484c7da2d4

Unified the Messprogramm windows. Unfortunately the Roweditor of Messmethodengrid is broken in this commit. This is due to the fact that the Mmt store is noit autoloaded anymore
author Dustin Demuth <dustin@intevation.de>
date Thu, 07 May 2015 10:55:44 +0200
parents 6f6d2df00130
children 7267bae1d43f
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
709
6f6d2df00130 Added some CSS to make distinction between active and inactice windows more simple for the user
Dustin Demuth <dustin@intevation.de>
parents: 688
diff changeset
42 // add listeners to change the window appearence when it becomes inactive
6f6d2df00130 Added some CSS to make distinction between active and inactice windows more simple for the user
Dustin Demuth <dustin@intevation.de>
parents: 688
diff changeset
43 this.on({
6f6d2df00130 Added some CSS to make distinction between active and inactice windows more simple for the user
Dustin Demuth <dustin@intevation.de>
parents: 688
diff changeset
44 activate: function(){
6f6d2df00130 Added some CSS to make distinction between active and inactice windows more simple for the user
Dustin Demuth <dustin@intevation.de>
parents: 688
diff changeset
45 this.getEl().removeCls('window-inactive');
6f6d2df00130 Added some CSS to make distinction between active and inactice windows more simple for the user
Dustin Demuth <dustin@intevation.de>
parents: 688
diff changeset
46 },
6f6d2df00130 Added some CSS to make distinction between active and inactice windows more simple for the user
Dustin Demuth <dustin@intevation.de>
parents: 688
diff changeset
47 deactivate: function(){
6f6d2df00130 Added some CSS to make distinction between active and inactice windows more simple for the user
Dustin Demuth <dustin@intevation.de>
parents: 688
diff changeset
48 this.getEl().addCls('window-inactive');
6f6d2df00130 Added some CSS to make distinction between active and inactice windows more simple for the user
Dustin Demuth <dustin@intevation.de>
parents: 688
diff changeset
49 }
6f6d2df00130 Added some CSS to make distinction between active and inactice windows more simple for the user
Dustin Demuth <dustin@intevation.de>
parents: 688
diff changeset
50 });
6f6d2df00130 Added some CSS to make distinction between active and inactice windows more simple for the user
Dustin Demuth <dustin@intevation.de>
parents: 688
diff changeset
51
642
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
52 this.items = [{
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
53 region: 'west',
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
54 border: 0,
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
55 layout: 'vbox',
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
56 items: [{
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
57 xtype: 'ortform',
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
58 margin: 5
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
59 }, {
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
60 xtype: 'locationform',
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
61 margin: 5
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
62 }]
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
63 }, {
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
64 xtype: 'fset',
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
65 bodyStyle: {
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
66 background: '#fff'
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
67 },
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
68 layout: 'border',
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
69 name: 'mapfield',
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
70 title: 'Karte',
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
71 region: 'center',
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
72 padding: '5, 5',
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
73 margin: 5,
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
74 items: [{
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
75 xtype: 'map',
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
76 region: 'center',
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
77 layout: 'border',
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
78 bodyStyle: {
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
79 background: '#fff'
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 name: 'map'
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 this.callParent(arguments);
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 initData: function() {
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
88 var ort = Ext.create('Lada.model.Ort', {
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
89 probeId: this.record.get('id')
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 this.down('ortform').setRecord(ort);
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
92 },
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
93
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
94 setMessages: function(errors, warnings) {
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
95 //todo this is a stub
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
96 },
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
97
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
98 clearMessages: function() {
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
99 //todo this is a stub
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
100 }
bd151c8b7ad1 Added window to create a new ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
101 });

http://lada.wald.intevation.org