Mercurial > lada > lada-client
annotate app/view/proben/Edit.js @ 71:db26aeebe521
Added new Form for editing proben. Use this form in the edit window.
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Wed, 05 Jun 2013 16:20:54 +0200 |
parents | 73bc17de6ff2 |
children | 95b08b96f5c9 |
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', |
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
|
21 'Lada.view.kommentare.List' |
40
f9b6de636ad0
Added probenart combobox
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
38
diff
changeset
|
22 ], |
f9b6de636ad0
Added probenart combobox
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
38
diff
changeset
|
23 |
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
|
24 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
|
25 // 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
|
26 // 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
|
27 // 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
|
28 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
|
29 // 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
|
30 //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
|
31 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
|
32 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
|
33 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
|
34 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
|
35 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
|
36 //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
|
37 } |
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
|
38 }); |
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 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
|
40 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
|
41 { |
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 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
|
43 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
|
44 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
|
45 } |
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 ]; |
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.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
|
48 } |
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 }); |
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
|
50 |