annotate app/view/window/MessungCreate.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 13c0e64e1873
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',
688
6a6d1b02a1a3 constrain windows to viewport
Dustin Demuth <dustin@intevation.de>
parents: 644
diff changeset
25 constrain: true,
621
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
26
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
27 record: null,
644
71e8b84d7829 Reload grids on messung or ort changed/added.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 621
diff changeset
28 grid: null,
621
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
29
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
30 initComponent: function() {
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
31 this.title = 'Messung';
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
32 this.buttons = [{
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
33 text: 'Schließen',
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
34 scope: this,
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
35 handler: this.close
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.width = 700;
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
38
709
6f6d2df00130 Added some CSS to make distinction between active and inactice windows more simple for the user
Dustin Demuth <dustin@intevation.de>
parents: 707
diff changeset
39 // 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: 707
diff changeset
40 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: 707
diff changeset
41 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: 707
diff changeset
42 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: 707
diff changeset
43 },
6f6d2df00130 Added some CSS to make distinction between active and inactice windows more simple for the user
Dustin Demuth <dustin@intevation.de>
parents: 707
diff changeset
44 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: 707
diff changeset
45 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: 707
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: 707
diff changeset
47 });
6f6d2df00130 Added some CSS to make distinction between active and inactice windows more simple for the user
Dustin Demuth <dustin@intevation.de>
parents: 707
diff changeset
48
621
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
49 this.items = [{
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
50 border: 0,
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
51 autoScroll: true,
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
52 items: [{
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
53 xtype: 'messungform'
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 }];
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
56 this.callParent(arguments);
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
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
59 initData: function() {
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
60 this.clearMessages();
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
61 var messung = Ext.create('Lada.model.Messung', {
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
62 probeId: this.record.get('id')
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
63 });
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
64 this.down('messungform').setRecord(messung);
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
65 },
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
66
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
67 setMessages: function(errors, warnings) {
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
68 //todo this is a stub
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
69 },
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
70 clearMessages: function() {
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
71 //todo this is a stub
707
c632c7c34029 added disable/enableChildren Method
Dustin Demuth <dustin@intevation.de>
parents: 688
diff changeset
72 },
c632c7c34029 added disable/enableChildren Method
Dustin Demuth <dustin@intevation.de>
parents: 688
diff changeset
73
c632c7c34029 added disable/enableChildren Method
Dustin Demuth <dustin@intevation.de>
parents: 688
diff changeset
74 disableChildren: function(){
c632c7c34029 added disable/enableChildren Method
Dustin Demuth <dustin@intevation.de>
parents: 688
diff changeset
75 //intentionally!
c632c7c34029 added disable/enableChildren Method
Dustin Demuth <dustin@intevation.de>
parents: 688
diff changeset
76 return true;
c632c7c34029 added disable/enableChildren Method
Dustin Demuth <dustin@intevation.de>
parents: 688
diff changeset
77 },
c632c7c34029 added disable/enableChildren Method
Dustin Demuth <dustin@intevation.de>
parents: 688
diff changeset
78
c632c7c34029 added disable/enableChildren Method
Dustin Demuth <dustin@intevation.de>
parents: 688
diff changeset
79 enableChildren: function(){
c632c7c34029 added disable/enableChildren Method
Dustin Demuth <dustin@intevation.de>
parents: 688
diff changeset
80 //intentionally!
c632c7c34029 added disable/enableChildren Method
Dustin Demuth <dustin@intevation.de>
parents: 688
diff changeset
81 return true;
621
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
82 }
c3c8a3be5117 Added messung create window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
83 });

http://lada.wald.intevation.org