annotate app/view/proben/Edit.js @ 103:3552b0ee4526

Added Messungenlist to the Proben eddit view.
author Torsten Irländer <torsten@irlaender.de>
date Mon, 17 Jun 2013 16:59:04 +0200
parents 21c069e2ecdb
children b91d5376db19
rev   line source
18
9e1a40312bbe Implemented a basic edit dialog. Data will be set to data/proben2.json url
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
1 Ext.define('Lada.view.proben.Edit', {
9e1a40312bbe Implemented a basic edit dialog. Data will be set to data/proben2.json url
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
2 extend: 'Ext.window.Window',
9e1a40312bbe Implemented a basic edit dialog. Data will be set to data/proben2.json url
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
3 alias: 'widget.probenedit',
9e1a40312bbe Implemented a basic edit dialog. Data will be set to data/proben2.json url
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
4
9e1a40312bbe Implemented a basic edit dialog. Data will be set to data/proben2.json url
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
5 title: 'Maske für §3-Proben',
47
e6d5177a9f6f Set size of the edit window relative to the available space in the browser.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 46
diff changeset
6 // Make size of the dialog dependend of the available space.
e6d5177a9f6f Set size of the edit window relative to the available space in the browser.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 46
diff changeset
7 // TODO: Handle resizing the browser window.
e6d5177a9f6f Set size of the edit window relative to the available space in the browser.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 46
diff changeset
8 width: Ext.getBody().getViewSize().width - 30,
e6d5177a9f6f Set size of the edit window relative to the available space in the browser.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 46
diff changeset
9 height: Ext.getBody().getViewSize().height - 30,
18
9e1a40312bbe Implemented a basic edit dialog. Data will be set to data/proben2.json url
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
10 autoShow: true,
25
f964a50bfe57 Restructured the application. Fixed layouts etc.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 22
diff changeset
11 autoScroll: true,
f964a50bfe57 Restructured the application. Fixed layouts etc.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 22
diff changeset
12 modal: true,
18
9e1a40312bbe Implemented a basic edit dialog. Data will be set to data/proben2.json url
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
13
40
f9b6de636ad0 Added probenart combobox
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 38
diff changeset
14 requires: [
71
db26aeebe521 Added new Form for editing proben. Use this form in the edit window.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 53
diff changeset
15 'Lada.view.proben.EditForm',
42
5ed477590736 Added missiong code for uwb.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 41
diff changeset
16 'Lada.view.widgets.Uwb',
41
a1be7ccd4d0c Added datenbasis combobox
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 40
diff changeset
17 'Lada.view.widgets.Datenbasis',
46
39f5f1529847 Added combotbox for Betriebsart.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 45
diff changeset
18 'Lada.view.widgets.Probenart',
49
792c34b3f5a9 Added combobox for field "testdatensatz"
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 47
diff changeset
19 'Lada.view.widgets.Betriebsart',
53
73bc17de6ff2 Added store, view and model for kommentare. Load kommentare when opening a probe.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 49
diff changeset
20 'Lada.view.widgets.Testdatensatz',
91
95b08b96f5c9 Added new widget for the netzbetreiber.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 71
diff changeset
21 'Lada.view.widgets.Netzbetreiber',
94
21c069e2ecdb Added Orte to the Proben edit window
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 91
diff changeset
22 'Lada.view.kommentare.List',
103
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents: 94
diff changeset
23 'Lada.view.orte.List',
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents: 94
diff changeset
24 'Lada.view.messungen.List'
40
f9b6de636ad0 Added probenart combobox
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 38
diff changeset
25 ],
f9b6de636ad0 Added probenart combobox
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 38
diff changeset
26
18
9e1a40312bbe Implemented a basic edit dialog. Data will be set to data/proben2.json url
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
27 initComponent: function() {
71
db26aeebe521 Added new Form for editing proben. Use this form in the edit window.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 53
diff changeset
28 // InitialConfig is the config object passed to the constructor on
db26aeebe521 Added new Form for editing proben. Use this form in the edit window.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 53
diff changeset
29 // creation of this window. We need to pass it throuh to the form as
db26aeebe521 Added new Form for editing proben. Use this form in the edit window.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 53
diff changeset
30 // we need the "modelId" param to load the correct item.
db26aeebe521 Added new Form for editing proben. Use this form in the edit window.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 53
diff changeset
31 var form = Ext.create('Lada.view.proben.EditForm', this.initialConfig);
db26aeebe521 Added new Form for editing proben. Use this form in the edit window.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 53
diff changeset
32 // Load kommentare
db26aeebe521 Added new Form for editing proben. Use this form in the edit window.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 53
diff changeset
33 //var record = form.getRecord();
db26aeebe521 Added new Form for editing proben. Use this form in the edit window.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 53
diff changeset
34 var kommentare = form.down('kommentarelist'); //form.down('kommentare');
db26aeebe521 Added new Form for editing proben. Use this form in the edit window.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 53
diff changeset
35 var kstore = kommentare.getStore();
db26aeebe521 Added new Form for editing proben. Use this form in the edit window.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 53
diff changeset
36 kstore.load({
db26aeebe521 Added new Form for editing proben. Use this form in the edit window.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 53
diff changeset
37 params: {
db26aeebe521 Added new Form for editing proben. Use this form in the edit window.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 53
diff changeset
38 probe: this.initialConfig['modelId']
db26aeebe521 Added new Form for editing proben. Use this form in the edit window.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 53
diff changeset
39 //probe: record.data['probeId']
18
9e1a40312bbe Implemented a basic edit dialog. Data will be set to data/proben2.json url
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
40 }
71
db26aeebe521 Added new Form for editing proben. Use this form in the edit window.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 53
diff changeset
41 });
94
21c069e2ecdb Added Orte to the Proben edit window
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 91
diff changeset
42 // Load Orte
21c069e2ecdb Added Orte to the Proben edit window
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 91
diff changeset
43 var orte = form.down('ortelist');
21c069e2ecdb Added Orte to the Proben edit window
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 91
diff changeset
44 var ostore = orte.getStore();
21c069e2ecdb Added Orte to the Proben edit window
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 91
diff changeset
45 ostore.load({
21c069e2ecdb Added Orte to the Proben edit window
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 91
diff changeset
46 params: {
21c069e2ecdb Added Orte to the Proben edit window
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 91
diff changeset
47 probe: this.initialConfig['modelId']
21c069e2ecdb Added Orte to the Proben edit window
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 91
diff changeset
48 //probe: record.data['probeId']
21c069e2ecdb Added Orte to the Proben edit window
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 91
diff changeset
49 }
21c069e2ecdb Added Orte to the Proben edit window
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 91
diff changeset
50 });
103
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents: 94
diff changeset
51 // Load Messungen
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents: 94
diff changeset
52 var messungen = form.down('messungenlist');
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents: 94
diff changeset
53 var mstore = messungen.getStore();
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents: 94
diff changeset
54 mstore.load({
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents: 94
diff changeset
55 params: {
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents: 94
diff changeset
56 probe: this.initialConfig['modelId']
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents: 94
diff changeset
57 //probe: record.data['probeId']
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents: 94
diff changeset
58 }
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents: 94
diff changeset
59 });
71
db26aeebe521 Added new Form for editing proben. Use this form in the edit window.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 53
diff changeset
60 this.items = [form];
18
9e1a40312bbe Implemented a basic edit dialog. Data will be set to data/proben2.json url
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
61 this.buttons = [
9e1a40312bbe Implemented a basic edit dialog. Data will be set to data/proben2.json url
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
62 {
9e1a40312bbe Implemented a basic edit dialog. Data will be set to data/proben2.json url
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
63 text: 'Speichern',
71
db26aeebe521 Added new Form for editing proben. Use this form in the edit window.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 53
diff changeset
64 handler: form.commit,
db26aeebe521 Added new Form for editing proben. Use this form in the edit window.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 53
diff changeset
65 scope: form
18
9e1a40312bbe Implemented a basic edit dialog. Data will be set to data/proben2.json url
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
66 }
9e1a40312bbe Implemented a basic edit dialog. Data will be set to data/proben2.json url
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
67 ];
71
db26aeebe521 Added new Form for editing proben. Use this form in the edit window.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 53
diff changeset
68 this.callParent();
18
9e1a40312bbe Implemented a basic edit dialog. Data will be set to data/proben2.json url
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
69 }
9e1a40312bbe Implemented a basic edit dialog. Data will be set to data/proben2.json url
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
70 });
22
0a4674f17bcb Added more fields to the overview and set correct reference in on the edit
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 19
diff changeset
71

http://lada.wald.intevation.org