annotate app/view/window/MessungCreate.js @ 621:c3c8a3be5117

Added messung create window.
author Raimund Renkert <raimund.renkert@intevation.de>
date Mon, 16 Mar 2015 12:10:31 +0100
parents
children 71e8b84d7829
rev   line source
621
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
2 * Software engineering by Intevation GmbH
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
3 *
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
4 * This file is Free Software under the GNU GPL (v>=3)
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
6 * the documentation coming with IMIS-Labordaten-Application for details.
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
7 */
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
8
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
9 /*
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
10 * Window to edit a Messung
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
11 */
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
12 Ext.define('Lada.view.window.MessungCreate', {
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
13 extend: 'Ext.window.Window',
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
14 alias: 'widget.messungcreate',
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
15
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
16 requires: [
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
17 'Lada.view.form.Messung'
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
18 ],
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
19
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
20 collapsible: true,
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
21 maximizable: true,
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
22 autoshow: true,
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
23 autoscroll: true,
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
24 layout: 'fit',
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
25
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
26 record: null,
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
27
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
28 initComponent: function() {
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
29 this.title = 'Messung';
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
30 this.buttons = [{
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
31 text: 'Schließen',
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
32 scope: this,
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
33 handler: this.close
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
34 }];
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
35 this.width = 700;
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
36
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
37 this.items = [{
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
38 border: 0,
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
39 autoScroll: true,
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
40 items: [{
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
41 xtype: 'messungform'
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
42 }]
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
43 }];
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
44 this.callParent(arguments);
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
45 },
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
46
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
47 initData: function() {
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
48 this.clearMessages();
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
49 var messung = Ext.create('Lada.model.Messung', {
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
50 probeId: this.record.get('id')
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
51 });
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
52 this.down('messungform').setRecord(messung);
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
53 },
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
54
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
55 setMessages: function(errors, warnings) {
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
56 //todo this is a stub
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
57 },
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
58 clearMessages: function() {
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
59 //todo this is a stub
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
60 }
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
61
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
62 });

http://lada.wald.intevation.org