Mercurial > lada > lada-client
annotate app/view/proben/Edit.js @ 91:95b08b96f5c9
Added new widget for the netzbetreiber.
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Tue, 11 Jun 2013 15:04:18 +0200 |
parents | db26aeebe521 |
children | 21c069e2ecdb |
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', |
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
|
22 'Lada.view.kommentare.List' |
40
f9b6de636ad0
Added probenart combobox
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
38
diff
changeset
|
23 ], |
f9b6de636ad0
Added probenart combobox
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
38
diff
changeset
|
24 |
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
|
25 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
|
26 // 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
|
27 // 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
|
28 // 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
|
29 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
|
30 // 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
|
31 //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
|
32 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
|
33 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
|
34 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
|
35 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
|
36 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
|
37 //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
|
38 } |
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
|
39 }); |
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
|
40 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
|
41 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
|
42 { |
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
|
43 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
|
44 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
|
45 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
|
46 } |
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
|
47 ]; |
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
|
48 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
|
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 }); |
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
|
51 |