annotate app/view/window/ProbeCreate.js @ 909:0b6e965d3d9e 2.1.0

Removed tag 2.1.0
author Dustin Demuth <dustin@intevation.de>
date Thu, 06 Aug 2015 15:33:50 +0200
parents 8054232535ba
children f4eb53ba63fc
rev   line source
619
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
2 * Software engineering by Intevation GmbH
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
3 *
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
4 * This file is Free Software under the GNU GPL (v>=3)
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
6 * the documentation coming with IMIS-Labordaten-Application for details.
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
7 */
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
8
891
8054232535ba More JSduck
Dustin Demuth <dustin@intevation.de>
parents: 890
diff changeset
9 /**
619
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
10 * Window to edit a Probe
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
11 */
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
12 Ext.define('Lada.view.window.ProbeCreate', {
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
13 extend: 'Ext.window.Window',
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
14 alias: 'widget.probecreate',
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
15
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
16 requires: [
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
17 'Lada.view.form.Probe'
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
18 ],
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
19
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
20 collapsible: true,
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
21 maximizable: true,
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
22 autoShow: true,
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
23 autoScroll: true,
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
24 layout: 'fit',
688
6a6d1b02a1a3 constrain windows to viewport
Dustin Demuth <dustin@intevation.de>
parents: 619
diff changeset
25 constrain: true,
619
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
26
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
27 record: null,
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
28
890
def27cdd0dfa Added Documentation to Windows
Dustin Demuth <dustin@intevation.de>
parents: 833
diff changeset
29 /**
def27cdd0dfa Added Documentation to Windows
Dustin Demuth <dustin@intevation.de>
parents: 833
diff changeset
30 * This function initialises the Window
def27cdd0dfa Added Documentation to Windows
Dustin Demuth <dustin@intevation.de>
parents: 833
diff changeset
31 */
619
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
32 initComponent: function() {
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
33 this.title = '§3-Probe';
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
34 this.buttons = [{
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
35 text: 'Schließen',
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
36 scope: this,
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
37 handler: this.close
7a7a16b0a548 Added window for creating probe objects.
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
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 // 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
41 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
42 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
43 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
44 },
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 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
46 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
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 });
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
49
619
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
50 this.width = 700;
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
51 // InitialConfig is the config object passed to the constructor on
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
52 // creation of this window. We need to pass it throuh to the form as
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
53 // we need the "modelId" param to load the correct item.
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
54
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
55 this.items = [{
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
56 border: 0,
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
57 autoScroll: true,
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
58 items: [{
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
59 xtype: 'probeform'
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
60 }]
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
61 }];
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
62 this.callParent(arguments);
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
63 },
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
64
890
def27cdd0dfa Added Documentation to Windows
Dustin Demuth <dustin@intevation.de>
parents: 833
diff changeset
65 /**
def27cdd0dfa Added Documentation to Windows
Dustin Demuth <dustin@intevation.de>
parents: 833
diff changeset
66 * Initialise the Data of this Window
def27cdd0dfa Added Documentation to Windows
Dustin Demuth <dustin@intevation.de>
parents: 833
diff changeset
67 */
619
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
68 initData: function() {
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
69 var record = Ext.create('Lada.model.Probe');
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
70 this.down('probeform').setRecord(record);
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
71 },
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
72
890
def27cdd0dfa Added Documentation to Windows
Dustin Demuth <dustin@intevation.de>
parents: 833
diff changeset
73 /**
def27cdd0dfa Added Documentation to Windows
Dustin Demuth <dustin@intevation.de>
parents: 833
diff changeset
74 * Instructs the fields / forms listed in this method to set a message.
def27cdd0dfa Added Documentation to Windows
Dustin Demuth <dustin@intevation.de>
parents: 833
diff changeset
75 * @param errors These Errors shall be shown
def27cdd0dfa Added Documentation to Windows
Dustin Demuth <dustin@intevation.de>
parents: 833
diff changeset
76 * @param warnings These Warning shall be shown
def27cdd0dfa Added Documentation to Windows
Dustin Demuth <dustin@intevation.de>
parents: 833
diff changeset
77 */
619
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
78 setMessages: function(errors, warnings) {
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
79 this.down('probeform').setMessages(errors, warnings);
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
80 },
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
81
890
def27cdd0dfa Added Documentation to Windows
Dustin Demuth <dustin@intevation.de>
parents: 833
diff changeset
82 /**
def27cdd0dfa Added Documentation to Windows
Dustin Demuth <dustin@intevation.de>
parents: 833
diff changeset
83 * Instructs the fields / forms listed in this method to clear their messages.
def27cdd0dfa Added Documentation to Windows
Dustin Demuth <dustin@intevation.de>
parents: 833
diff changeset
84 */
619
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
85 clearMessages: function() {
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
86 this.down('probeform').clearMessages();
707
c632c7c34029 added disable/enableChildren Method
Dustin Demuth <dustin@intevation.de>
parents: 688
diff changeset
87 },
c632c7c34029 added disable/enableChildren Method
Dustin Demuth <dustin@intevation.de>
parents: 688
diff changeset
88
890
def27cdd0dfa Added Documentation to Windows
Dustin Demuth <dustin@intevation.de>
parents: 833
diff changeset
89 /**
def27cdd0dfa Added Documentation to Windows
Dustin Demuth <dustin@intevation.de>
parents: 833
diff changeset
90 * Disable the Childelements of this window
def27cdd0dfa Added Documentation to Windows
Dustin Demuth <dustin@intevation.de>
parents: 833
diff changeset
91 */
707
c632c7c34029 added disable/enableChildren Method
Dustin Demuth <dustin@intevation.de>
parents: 688
diff changeset
92 disableChildren: function(){
c632c7c34029 added disable/enableChildren Method
Dustin Demuth <dustin@intevation.de>
parents: 688
diff changeset
93 //intentionally!
c632c7c34029 added disable/enableChildren Method
Dustin Demuth <dustin@intevation.de>
parents: 688
diff changeset
94 return true;
c632c7c34029 added disable/enableChildren Method
Dustin Demuth <dustin@intevation.de>
parents: 688
diff changeset
95 },
c632c7c34029 added disable/enableChildren Method
Dustin Demuth <dustin@intevation.de>
parents: 688
diff changeset
96
890
def27cdd0dfa Added Documentation to Windows
Dustin Demuth <dustin@intevation.de>
parents: 833
diff changeset
97 /**
def27cdd0dfa Added Documentation to Windows
Dustin Demuth <dustin@intevation.de>
parents: 833
diff changeset
98 * Enable the Childelements of this window
def27cdd0dfa Added Documentation to Windows
Dustin Demuth <dustin@intevation.de>
parents: 833
diff changeset
99 */
707
c632c7c34029 added disable/enableChildren Method
Dustin Demuth <dustin@intevation.de>
parents: 688
diff changeset
100 enableChildren: function(){
c632c7c34029 added disable/enableChildren Method
Dustin Demuth <dustin@intevation.de>
parents: 688
diff changeset
101 //intentionally!
c632c7c34029 added disable/enableChildren Method
Dustin Demuth <dustin@intevation.de>
parents: 688
diff changeset
102 return true;
619
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
103 }
7a7a16b0a548 Added window for creating probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
104 });

http://lada.wald.intevation.org