comparison app/controller/Proben.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 d8993f5b96e8
children bd77b6055791
comparison
equal deleted inserted replaced
269:eda619ad45b0 270:0d6552bb28ea
21 itemdblclick: this.editProbe 21 itemdblclick: this.editProbe
22 }, 22 },
23 'probenlist toolbar button[action=add]': { 23 'probenlist toolbar button[action=add]': {
24 click: this.addProbe 24 click: this.addProbe
25 }, 25 },
26 'probencreate button[action=save]': {
27 click: this.saveProbe
28 },
29 'probenedit button[action=save]': {
30 click: this.saveProbe
31 },
26 'probencreate form': { 32 'probencreate form': {
27 savesuccess: this.createSuccess, 33 savesuccess: this.createSuccess,
28 savefailure: this.createFailure 34 savefailure: this.createFailure
29 }, 35 },
30 'probenedit form': { 36 'probenedit form': {
31 savesuccess: this.editSuccess, 37 savesuccess: this.editSuccess,
32 savefailure: this.editFailure 38 savefailure: this.editFailure
33 } 39 }
34 }); 40 });
41 },
42 saveProbe: function(button) {
43 console.log('Saving Probe');
44 var form = button.up('window').down('form');
45 form.commit();
35 }, 46 },
36 addProbe: function(button) { 47 addProbe: function(button) {
37 console.log('Adding new Probe'); 48 console.log('Adding new Probe');
38 var view = Ext.widget('probencreate'); 49 var view = Ext.widget('probencreate');
39 }, 50 },

http://lada.wald.intevation.org