comparison app/view/proben/Edit.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 7b1140bd8b3d
children 6007d11b81c2
comparison
equal deleted inserted replaced
269:eda619ad45b0 270:0d6552bb28ea
10 autoShow: true, 10 autoShow: true,
11 autoScroll: true, 11 autoScroll: true,
12 modal: true, 12 modal: true,
13 13
14 initComponent: function() { 14 initComponent: function() {
15 this.buttons = [
16 {
17 text: 'Speichern',
18 action: 'save',
19 },
20 {
21 text: 'Abbrechen',
22 scope: this,
23 handler: this.close,
24 }
25 ];
15 // InitialConfig is the config object passed to the constructor on 26 // InitialConfig is the config object passed to the constructor on
16 // creation of this window. We need to pass it throuh to the form as 27 // creation of this window. We need to pass it throuh to the form as
17 // we need the "modelId" param to load the correct item. 28 // we need the "modelId" param to load the correct item.
18 var form = Ext.create('Lada.view.proben.EditForm', this.initialConfig); 29 var form = Ext.create('Lada.view.proben.EditForm', this.initialConfig);
19 this.items = [form]; 30 this.items = [form];
20 this.buttons = [
21 {
22 text: 'Speichern',
23 handler: form.commit,
24 scope: form
25 }
26 ];
27 this.callParent(); 31 this.callParent();
28 } 32 },
29 }); 33 });
30 34

http://lada.wald.intevation.org