Mercurial > lada > lada-client
annotate app/view/proben/Create.js @ 270:0d6552bb28ea
Add cancel Button to the editproben window and only show save button if the
form is actually writeable.
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Tue, 06 Aug 2013 14:33:14 +0200 |
parents | c05fda928b82 |
children | 11f8a2c1b610 |
rev | line source |
---|---|
65
9e2e09e819fd
Added a new Dialog to create proben without any kommentare or other additional
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
1 Ext.define('Lada.view.proben.Create', { |
9e2e09e819fd
Added a new Dialog to create proben without any kommentare or other additional
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
2 extend: 'Ext.window.Window', |
9e2e09e819fd
Added a new Dialog to create proben without any kommentare or other additional
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
3 alias: 'widget.probencreate', |
9e2e09e819fd
Added a new Dialog to create proben without any kommentare or other additional
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
4 |
9e2e09e819fd
Added a new Dialog to create proben without any kommentare or other additional
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
5 title: 'Maske für §3-Proben', |
9e2e09e819fd
Added a new Dialog to create proben without any kommentare or other additional
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
6 // Make size of the dialog dependend of the available space. |
9e2e09e819fd
Added a new Dialog to create proben without any kommentare or other additional
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
7 // TODO: Handle resizing the browser window. |
9e2e09e819fd
Added a new Dialog to create proben without any kommentare or other additional
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
8 width: Ext.getBody().getViewSize().width - 30, |
9e2e09e819fd
Added a new Dialog to create proben without any kommentare or other additional
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
9 height: Ext.getBody().getViewSize().height - 30, |
9e2e09e819fd
Added a new Dialog to create proben without any kommentare or other additional
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
10 autoShow: true, |
9e2e09e819fd
Added a new Dialog to create proben without any kommentare or other additional
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
11 autoScroll: true, |
9e2e09e819fd
Added a new Dialog to create proben without any kommentare or other additional
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
12 modal: true, |
9e2e09e819fd
Added a new Dialog to create proben without any kommentare or other additional
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
13 initComponent: function() { |
68
e54cb2f3566e
Do not define form element in the window. Use new defined Probencreate Form.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
65
diff
changeset
|
14 var form = Ext.create('Lada.view.proben.CreateForm'); |
e54cb2f3566e
Do not define form element in the window. Use new defined Probencreate Form.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
65
diff
changeset
|
15 this.items = [form]; |
65
9e2e09e819fd
Added a new Dialog to create proben without any kommentare or other additional
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
16 this.buttons = [ |
9e2e09e819fd
Added a new Dialog to create proben without any kommentare or other additional
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
17 { |
9e2e09e819fd
Added a new Dialog to create proben without any kommentare or other additional
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
18 text: 'Speichern', |
270
0d6552bb28ea
Add cancel Button to the editproben window and only show save button if the
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
121
diff
changeset
|
19 action: 'save', |
0d6552bb28ea
Add cancel Button to the editproben window and only show save button if the
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
121
diff
changeset
|
20 }, |
0d6552bb28ea
Add cancel Button to the editproben window and only show save button if the
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
121
diff
changeset
|
21 { |
0d6552bb28ea
Add cancel Button to the editproben window and only show save button if the
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
121
diff
changeset
|
22 text: 'Abbrechen', |
0d6552bb28ea
Add cancel Button to the editproben window and only show save button if the
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
121
diff
changeset
|
23 scope: this, |
0d6552bb28ea
Add cancel Button to the editproben window and only show save button if the
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
121
diff
changeset
|
24 handler: this.close, |
65
9e2e09e819fd
Added a new Dialog to create proben without any kommentare or other additional
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
25 } |
9e2e09e819fd
Added a new Dialog to create proben without any kommentare or other additional
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
26 ]; |
68
e54cb2f3566e
Do not define form element in the window. Use new defined Probencreate Form.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
65
diff
changeset
|
27 this.callParent(); |
65
9e2e09e819fd
Added a new Dialog to create proben without any kommentare or other additional
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
28 } |
9e2e09e819fd
Added a new Dialog to create proben without any kommentare or other additional
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
29 }); |