annotate app/view/window/MessungEdit.js @ 588:e24bc8cf8e1d

Renamed messungen grid and controller.
author Raimund Renkert <raimund.renkert@intevation.de>
date Wed, 11 Mar 2015 15:21:27 +0100
parents 424802824648
children e440b66a859f
rev   line source
576
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
2 * Software engineering by Intevation GmbH
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
3 *
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
4 * This file is Free Software under the GNU GPL (v>=3)
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
6 * the documentation coming with IMIS-Labordaten-Application for details.
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
7 */
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
8
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
9 /*
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
10 * Window to edit a Messung
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
11 */
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
12 Ext.define('Lada.view.window.MessungEdit', {
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
13 extend: 'Ext.window.Window',
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
14 alias: 'widget.messungedit',
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
15
581
424802824648 Added a form for Messungen (unfinished)
Dustin Demuth <dustin@intevation.de>
parents: 576
diff changeset
16 requires: [
424802824648 Added a form for Messungen (unfinished)
Dustin Demuth <dustin@intevation.de>
parents: 576
diff changeset
17 'Lada.view.form.Messung'
576
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
18 // 'Lada.view.grid.Messwert',
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
19 // 'Lada.view.grid.Messstatus',
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
20 // 'Lada.view.grid.MKommentar'
581
424802824648 Added a form for Messungen (unfinished)
Dustin Demuth <dustin@intevation.de>
parents: 576
diff changeset
21 ],
576
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
22
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
23 collapsible: true,
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
24 maximizable: true,
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
25 autoshow: true,
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
26 autoscroll: true,
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
27 layout: 'fit',
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
28
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
29 record: null,
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
30
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
31 initComponent: function(){
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
32 if (this.record === null) {
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
33 Ext.Msg.alert('Keine valide Messung ausgewählt!');
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
34 this.callParent(arguments);
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
35 return;
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
36 }
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
37 this.title = 'Messung ';// + this.record.get('messungId');
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
38 this.buttons = [{
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
39 text: 'Schließen',
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
40 scope: this,
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
41 handler: this.close
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
42 }];
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
43 this.width = 700;
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
44 this.height = Ext.getBody().getViewSize().height - 30;
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
45
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
46 this.items = [{
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
47 border: 0,
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
48 autoScroll: true,
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
49 items: [{
581
424802824648 Added a form for Messungen (unfinished)
Dustin Demuth <dustin@intevation.de>
parents: 576
diff changeset
50 xtype: 'messungform',
576
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
51 // recordId: record.get('id')
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
52 }, {
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
53 xtype: 'fset',
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
54 name: 'messwerte',
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
55 title: 'Messwerte - Stub'
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
56 //todo
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
57 }, {
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
58 xtype: 'fset',
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
59 name: 'messungstatus',
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
60 title: 'Messungstatus - Stub'
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
61 //todo
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
62 }, {
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
63 xtype: 'fset',
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
64 name: 'messungskommentare',
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
65 title: 'Messungskommentare - Stub'
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
66 //todo
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
67 }]
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
68 }];
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
69 this.callParent(arguments);
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
70 },
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
71
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
72 initData: function() {
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
73 this.clearMessages();
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
74 Ext.ClassManager.get('Lada.model.Messung').load(this.record.get('id'), {
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
75 failure: function(record, action){
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
76 // todo
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
77 console.log("failure");
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
78 },
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
79 success: function(record, action){
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
80 console.log("success");
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
81 },
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
82 scope: this
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
83 }
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
84 );
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
85 },
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
86
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
87 setMessages: function(errors, warnings) {
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
88 //todo this is a stub
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
89 },
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
90 clearMessages: function() {
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
91 //todo this is a stub
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
92 }
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
93
0d4137e0fe36 Added a blank window to edit a Messung
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
94 });

http://lada.wald.intevation.org