Mercurial > lada > lada-client
comparison app/view/window/MessprogrammCreate.js @ 757:b8502964f5c3
Added missing files. Added MmtMockup
author | Dustin Demuth <dustin@intevation.de> |
---|---|
date | Wed, 06 May 2015 14:15:37 +0200 |
parents | |
children | b2fcbdc4969d |
comparison
equal
deleted
inserted
replaced
756:f2db1ae1d012 | 757:b8502964f5c3 |
---|---|
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 create a Messprogramm | |
11 * | |
12 */ | |
13 Ext.define('Lada.view.window.MessprogrammCreate', { | |
14 extend: 'Ext.window.Window', | |
15 alias: 'widget.messprogrammcreate', | |
16 | |
17 requires: [ | |
18 'Lada.view.form.Messprogramm' | |
19 ], | |
20 | |
21 collapsible: true, | |
22 maximizable: true, | |
23 autoShow: true, | |
24 autoScroll: true, | |
25 layout: 'fit', | |
26 constrain: true, | |
27 | |
28 record: null, | |
29 | |
30 initComponent: function() { | |
31 var i18n = Lada.getApplication().bundle; | |
32 this.title = i18n.getMsg('messprogramm.window.create.title'); | |
33 this.buttons = [{ | |
34 text: i18n.getMsg('close'), | |
35 scope: this, | |
36 handler: this.close | |
37 }]; | |
38 | |
39 // add listeners to change the window appearence when it becomes inactive | |
40 this.on({ | |
41 activate: function(){ | |
42 this.getEl().removeCls('window-inactive'); | |
43 }, | |
44 deactivate: function(){ | |
45 this.getEl().addCls('window-inactive'); | |
46 } | |
47 }); | |
48 | |
49 this.width = 700; | |
50 this.height = Ext.getBody().getViewSize().height - 30; | |
51 // InitialConfig is the config object passed to the constructor on | |
52 // creation of this window. We need to pass it throuh to the form as | |
53 // we need the "modelId" param to load the correct item. | |
54 | |
55 this.items = [{ | |
56 border: 0, | |
57 autoScroll: true, | |
58 items: [{ | |
59 xtype: 'messprogrammform' | |
60 }, { | |
61 //Messmethoden | |
62 xtype: 'fieldset', | |
63 title: i18n.getMsg('mmtmessprogramm.form.fieldset.title'), | |
64 autoScroll: true, | |
65 margin: 5, | |
66 layout: { | |
67 type: 'hbox', | |
68 }, | |
69 items: [{ | |
70 xtype: 'messmethodengrid', | |
71 flex: 1 | |
72 }, { | |
73 xtype: 'messmethodengrid', | |
74 flex: 1 | |
75 }] | |
76 }] | |
77 }]; | |
78 this.callParent(arguments); | |
79 }, | |
80 | |
81 initData: function() { | |
82 var record = Ext.create('Lada.model.Messprogramm'); | |
83 this.down('messprogrammform').setRecord(record); | |
84 }, | |
85 | |
86 setMessages: function(errors, warnings) { | |
87 this.down('messprogrammform').setMessages(errors, warnings); | |
88 }, | |
89 | |
90 clearMessages: function() { | |
91 this.down('messprogrammform').clearMessages(); | |
92 }, | |
93 | |
94 disableChildren: function(){ | |
95 //intentionally! | |
96 return true; | |
97 }, | |
98 | |
99 enableChildren: function(){ | |
100 //intentionally! | |
101 return true; | |
102 } | |
103 }); |