comparison app/view/window/MessungEdit.js @ 576:0d4137e0fe36

Added a blank window to edit a Messung
author Dustin Demuth <dustin@intevation.de>
date Tue, 10 Mar 2015 15:26:47 +0100
parents
children 424802824648
comparison
equal deleted inserted replaced
569:d9593b520b3b 576:0d4137e0fe36
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.MessungEdit', {
13 extend: 'Ext.window.Window',
14 alias: 'widget.messungedit',
15
16 // requires: [
17 // 'Lada.view.form.Messung',
18 // 'Lada.view.grid.Messwert',
19 // 'Lada.view.grid.Messstatus',
20 // 'Lada.view.grid.MKommentar'
21 // ],
22
23 collapsible: true,
24 maximizable: true,
25 autoshow: true,
26 autoscroll: true,
27 layout: 'fit',
28
29 record: null,
30
31 initComponent: function(){
32 if (this.record === null) {
33 Ext.Msg.alert('Keine valide Messung ausgewählt!');
34 this.callParent(arguments);
35 return;
36 }
37 this.title = 'Messung ';// + this.record.get('messungId');
38 this.buttons = [{
39 text: 'Schließen',
40 scope: this,
41 handler: this.close
42 }];
43 this.width = 700;
44 this.height = Ext.getBody().getViewSize().height - 30;
45
46 this.items = [{
47 border: 0,
48 autoScroll: true,
49 items: [{
50 // xtype: 'messungform',
51 // recordId: record.get('id')
52 }, {
53 xtype: 'fset',
54 name: 'messwerte',
55 title: 'Messwerte - Stub'
56 //todo
57 }, {
58 xtype: 'fset',
59 name: 'messungstatus',
60 title: 'Messungstatus - Stub'
61 //todo
62 }, {
63 xtype: 'fset',
64 name: 'messungskommentare',
65 title: 'Messungskommentare - Stub'
66 //todo
67 }]
68 }];
69 this.callParent(arguments);
70 },
71
72 initData: function() {
73 this.clearMessages();
74 Ext.ClassManager.get('Lada.model.Messung').load(this.record.get('id'), {
75 failure: function(record, action){
76 // todo
77 console.log("failure");
78 },
79 success: function(record, action){
80 console.log("success");
81 },
82 scope: this
83 }
84 );
85 },
86
87 setMessages: function(errors, warnings) {
88 //todo this is a stub
89 },
90 clearMessages: function() {
91 //todo this is a stub
92 }
93
94 });

http://lada.wald.intevation.org