Mercurial > lada > lada-client
annotate app/view/proben/Edit.js @ 142:dee9da79f055
Added function to model with return the beschreibung of the messeinheit of a
given Probenzusatzwert by pzsId.
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Fri, 28 Jun 2013 11:15:39 +0200 |
parents | a7bfaeb1655d |
children | 7b1140bd8b3d |
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 |
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
|
14 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
|
15 // 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
|
16 // 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
|
17 // 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
|
18 var form = Ext.create('Lada.view.proben.EditForm', this.initialConfig); |
121
c05fda928b82
Cleanup part two. Reenabled Proben edit but one use minimum version of the probenedit. Move some stores to the combobox definitons
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
106
diff
changeset
|
19 /// Load kommentare |
c05fda928b82
Cleanup part two. Reenabled Proben edit but one use minimum version of the probenedit. Move some stores to the combobox definitons
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
106
diff
changeset
|
20 ////var record = form.getRecord(); |
c05fda928b82
Cleanup part two. Reenabled Proben edit but one use minimum version of the probenedit. Move some stores to the combobox definitons
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
106
diff
changeset
|
21 //var kommentare = form.down('kommentarelist'); //form.down('kommentare'); |
c05fda928b82
Cleanup part two. Reenabled Proben edit but one use minimum version of the probenedit. Move some stores to the combobox definitons
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
106
diff
changeset
|
22 //var kstore = kommentare.getStore(); |
c05fda928b82
Cleanup part two. Reenabled Proben edit but one use minimum version of the probenedit. Move some stores to the combobox definitons
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
106
diff
changeset
|
23 //kstore.load({ |
c05fda928b82
Cleanup part two. Reenabled Proben edit but one use minimum version of the probenedit. Move some stores to the combobox definitons
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
106
diff
changeset
|
24 // params: { |
c05fda928b82
Cleanup part two. Reenabled Proben edit but one use minimum version of the probenedit. Move some stores to the combobox definitons
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
106
diff
changeset
|
25 // probe: this.initialConfig['modelId'] |
c05fda928b82
Cleanup part two. Reenabled Proben edit but one use minimum version of the probenedit. Move some stores to the combobox definitons
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
106
diff
changeset
|
26 // //probe: record.data['probeId'] |
c05fda928b82
Cleanup part two. Reenabled Proben edit but one use minimum version of the probenedit. Move some stores to the combobox definitons
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
106
diff
changeset
|
27 // } |
c05fda928b82
Cleanup part two. Reenabled Proben edit but one use minimum version of the probenedit. Move some stores to the combobox definitons
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
106
diff
changeset
|
28 //}); |
c05fda928b82
Cleanup part two. Reenabled Proben edit but one use minimum version of the probenedit. Move some stores to the combobox definitons
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
106
diff
changeset
|
29 //// Load Orte |
c05fda928b82
Cleanup part two. Reenabled Proben edit but one use minimum version of the probenedit. Move some stores to the combobox definitons
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
106
diff
changeset
|
30 //var orte = form.down('ortelist'); |
c05fda928b82
Cleanup part two. Reenabled Proben edit but one use minimum version of the probenedit. Move some stores to the combobox definitons
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
106
diff
changeset
|
31 //var ostore = orte.getStore(); |
c05fda928b82
Cleanup part two. Reenabled Proben edit but one use minimum version of the probenedit. Move some stores to the combobox definitons
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
106
diff
changeset
|
32 //ostore.load({ |
c05fda928b82
Cleanup part two. Reenabled Proben edit but one use minimum version of the probenedit. Move some stores to the combobox definitons
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
106
diff
changeset
|
33 // params: { |
c05fda928b82
Cleanup part two. Reenabled Proben edit but one use minimum version of the probenedit. Move some stores to the combobox definitons
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
106
diff
changeset
|
34 // probe: this.initialConfig['modelId'] |
c05fda928b82
Cleanup part two. Reenabled Proben edit but one use minimum version of the probenedit. Move some stores to the combobox definitons
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
106
diff
changeset
|
35 // //probe: record.data['probeId'] |
c05fda928b82
Cleanup part two. Reenabled Proben edit but one use minimum version of the probenedit. Move some stores to the combobox definitons
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
106
diff
changeset
|
36 // } |
c05fda928b82
Cleanup part two. Reenabled Proben edit but one use minimum version of the probenedit. Move some stores to the combobox definitons
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
106
diff
changeset
|
37 //}); |
c05fda928b82
Cleanup part two. Reenabled Proben edit but one use minimum version of the probenedit. Move some stores to the combobox definitons
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
106
diff
changeset
|
38 //// Load Messungen |
c05fda928b82
Cleanup part two. Reenabled Proben edit but one use minimum version of the probenedit. Move some stores to the combobox definitons
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
106
diff
changeset
|
39 //var messungen = form.down('messungenlist'); |
c05fda928b82
Cleanup part two. Reenabled Proben edit but one use minimum version of the probenedit. Move some stores to the combobox definitons
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
106
diff
changeset
|
40 //var mstore = messungen.getStore(); |
c05fda928b82
Cleanup part two. Reenabled Proben edit but one use minimum version of the probenedit. Move some stores to the combobox definitons
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
106
diff
changeset
|
41 //mstore.load({ |
c05fda928b82
Cleanup part two. Reenabled Proben edit but one use minimum version of the probenedit. Move some stores to the combobox definitons
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
106
diff
changeset
|
42 // params: { |
c05fda928b82
Cleanup part two. Reenabled Proben edit but one use minimum version of the probenedit. Move some stores to the combobox definitons
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
106
diff
changeset
|
43 // probe: this.initialConfig['modelId'] |
c05fda928b82
Cleanup part two. Reenabled Proben edit but one use minimum version of the probenedit. Move some stores to the combobox definitons
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
106
diff
changeset
|
44 // //probe: record.data['probeId'] |
c05fda928b82
Cleanup part two. Reenabled Proben edit but one use minimum version of the probenedit. Move some stores to the combobox definitons
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
106
diff
changeset
|
45 // } |
c05fda928b82
Cleanup part two. Reenabled Proben edit but one use minimum version of the probenedit. Move some stores to the combobox definitons
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
106
diff
changeset
|
46 //}); |
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
|
47 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
|
48 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
|
49 { |
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
|
50 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
|
51 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
|
52 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
|
53 } |
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
|
54 ]; |
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
|
55 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
|
56 } |
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
|
57 }); |
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
|
58 |