Mercurial > lada > lada-client
annotate app/controller/Messungen.js @ 478:a07cf685606c
Added dependency to colum layout.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Tue, 21 Jan 2014 15:08:08 +0100 |
parents | debfcc7713e3 |
children | 446e99cfd425 |
rev | line source |
---|---|
472
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
362
diff
changeset
|
1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz |
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
362
diff
changeset
|
2 * Software engineering by Intevation GmbH |
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
362
diff
changeset
|
3 * |
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
362
diff
changeset
|
4 * This file is Free Software under the GNU GPL (v>=3) |
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
362
diff
changeset
|
5 * and comes with ABSOLUTELY NO WARRANTY! Check out |
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
362
diff
changeset
|
6 * the documentation coming with IMIS-Labordaten-Application for details. |
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
362
diff
changeset
|
7 */ |
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
362
diff
changeset
|
8 |
289
1bda6420c87c
Inherit from Base controller
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
281
diff
changeset
|
9 /** |
1bda6420c87c
Inherit from Base controller
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
281
diff
changeset
|
10 * Controller for Messungen |
1bda6420c87c
Inherit from Base controller
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
281
diff
changeset
|
11 */ |
108
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
12 Ext.define('Lada.controller.Messungen', { |
289
1bda6420c87c
Inherit from Base controller
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
281
diff
changeset
|
13 extend: 'Lada.controller.Base', |
172
cfa0cc437781
Implemented opening a new Messungen form when clicking and the "Add Button" on
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
168
diff
changeset
|
14 views: [ |
232
6ac95f587e10
Used new Editdialog and set the form readonly if the parent probe is readonly.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
229
diff
changeset
|
15 'messungen.Create', |
6ac95f587e10
Used new Editdialog and set the form readonly if the parent probe is readonly.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
229
diff
changeset
|
16 'messungen.Edit' |
172
cfa0cc437781
Implemented opening a new Messungen form when clicking and the "Add Button" on
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
168
diff
changeset
|
17 ], |
108
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
18 stores: [ |
229
80df1451b4a9
Set messung readonly if parent probe is readonly
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
224
diff
changeset
|
19 'Proben', |
163
15318541e568
Added MKommentare store. Some cleanup.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
157
diff
changeset
|
20 'Messungen', |
168
79a9c1a83305
Added Messwertestore to stores.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
163
diff
changeset
|
21 'Messwerte', |
79a9c1a83305
Added Messwertestore to stores.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
163
diff
changeset
|
22 'MKommentare', |
181
062aa9001eb6
Completed Messwertelist
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
172
diff
changeset
|
23 'Status', |
062aa9001eb6
Completed Messwertelist
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
172
diff
changeset
|
24 'Messgroessen' |
108
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
25 ], |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
26 init: function() { |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
27 console.log('Initialising the Messungen controller'); |
312
c5b8c0d8aec3
Fix initialisation of Messungen controller
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
289
diff
changeset
|
28 this.callParent(); |
289
1bda6420c87c
Inherit from Base controller
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
281
diff
changeset
|
29 }, |
1bda6420c87c
Inherit from Base controller
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
281
diff
changeset
|
30 addListeners: function() { |
108
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
31 this.control({ |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
32 'messungenlist': { |
289
1bda6420c87c
Inherit from Base controller
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
281
diff
changeset
|
33 itemdblclick: this.editItem |
108
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
34 }, |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
35 'messungenlist toolbar button[action=add]': { |
289
1bda6420c87c
Inherit from Base controller
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
281
diff
changeset
|
36 click: this.addItem |
108
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
37 }, |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
38 'messungenlist toolbar button[action=delete]': { |
289
1bda6420c87c
Inherit from Base controller
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
281
diff
changeset
|
39 click: this.deleteItem |
193
93de61af9b9e
Renamed function names to Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
181
diff
changeset
|
40 }, |
93de61af9b9e
Renamed function names to Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
181
diff
changeset
|
41 'messungencreate button[action=save]': { |
289
1bda6420c87c
Inherit from Base controller
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
281
diff
changeset
|
42 click: this.saveItem |
108
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
43 }, |
233
f60472df54e3
Added Listener for save event in edit dialog.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
232
diff
changeset
|
44 'messungenedit button[action=save]': { |
289
1bda6420c87c
Inherit from Base controller
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
281
diff
changeset
|
45 click: this.saveItem |
233
f60472df54e3
Added Listener for save event in edit dialog.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
232
diff
changeset
|
46 }, |
108
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
47 'messungencreate form': { |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
48 savesuccess: this.createSuccess, |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
49 savefailure: this.createFailure |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
50 }, |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
51 'messungenedit form': { |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
52 savesuccess: this.editSuccess, |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
53 savefailure: this.editFailure |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
54 } |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
55 }); |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
56 }, |
289
1bda6420c87c
Inherit from Base controller
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
281
diff
changeset
|
57 saveItem: function(button) { |
194
5d72d74a2daf
Added function to save a Messung.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
193
diff
changeset
|
58 console.log('Saving new Messung for Probe ' + button.probeId); |
5d72d74a2daf
Added function to save a Messung.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
193
diff
changeset
|
59 var form = button.up('window').down('form'); |
5d72d74a2daf
Added function to save a Messung.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
193
diff
changeset
|
60 form.commit(); |
5d72d74a2daf
Added function to save a Messung.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
193
diff
changeset
|
61 }, |
289
1bda6420c87c
Inherit from Base controller
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
281
diff
changeset
|
62 addItem: function(button) { |
172
cfa0cc437781
Implemented opening a new Messungen form when clicking and the "Add Button" on
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
168
diff
changeset
|
63 console.log('Adding new Messung for Probe ' + button.probeId); |
cfa0cc437781
Implemented opening a new Messungen form when clicking and the "Add Button" on
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
168
diff
changeset
|
64 var messung = Ext.create('Lada.model.Messung'); |
cfa0cc437781
Implemented opening a new Messungen form when clicking and the "Add Button" on
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
168
diff
changeset
|
65 messung.set('probeId', button.probeId); |
cfa0cc437781
Implemented opening a new Messungen form when clicking and the "Add Button" on
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
168
diff
changeset
|
66 var view = Ext.widget('messungencreate', {model: messung}); |
108
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
67 }, |
289
1bda6420c87c
Inherit from Base controller
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
281
diff
changeset
|
68 editItem: function(grid, record) { |
194
5d72d74a2daf
Added function to save a Messung.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
193
diff
changeset
|
69 console.log('Editing Messung'); |
195
01021f00ce6a
Load kommentare, status and messwerte when editing probe.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
194
diff
changeset
|
70 var kstore = this.getMKommentareStore(); |
01021f00ce6a
Load kommentare, status and messwerte when editing probe.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
194
diff
changeset
|
71 kstore.load({ |
01021f00ce6a
Load kommentare, status and messwerte when editing probe.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
194
diff
changeset
|
72 params: { |
224
5e056c5edf9a
Fixed loading stores when editing Messung.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
218
diff
changeset
|
73 probeId: record.get('probeId'), |
195
01021f00ce6a
Load kommentare, status and messwerte when editing probe.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
194
diff
changeset
|
74 messungsId: record.get('messungsId') |
01021f00ce6a
Load kommentare, status and messwerte when editing probe.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
194
diff
changeset
|
75 } |
01021f00ce6a
Load kommentare, status and messwerte when editing probe.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
194
diff
changeset
|
76 }); |
01021f00ce6a
Load kommentare, status and messwerte when editing probe.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
194
diff
changeset
|
77 var sstore = this.getStatusStore(); |
01021f00ce6a
Load kommentare, status and messwerte when editing probe.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
194
diff
changeset
|
78 sstore.load({ |
01021f00ce6a
Load kommentare, status and messwerte when editing probe.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
194
diff
changeset
|
79 params: { |
224
5e056c5edf9a
Fixed loading stores when editing Messung.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
218
diff
changeset
|
80 probeId: record.get('probeId'), |
195
01021f00ce6a
Load kommentare, status and messwerte when editing probe.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
194
diff
changeset
|
81 messungsId: record.get('messungsId') |
01021f00ce6a
Load kommentare, status and messwerte when editing probe.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
194
diff
changeset
|
82 } |
01021f00ce6a
Load kommentare, status and messwerte when editing probe.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
194
diff
changeset
|
83 }); |
224
5e056c5edf9a
Fixed loading stores when editing Messung.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
218
diff
changeset
|
84 var mstore = this.getMesswerteStore(); |
195
01021f00ce6a
Load kommentare, status and messwerte when editing probe.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
194
diff
changeset
|
85 mstore.load({ |
01021f00ce6a
Load kommentare, status and messwerte when editing probe.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
194
diff
changeset
|
86 params: { |
224
5e056c5edf9a
Fixed loading stores when editing Messung.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
218
diff
changeset
|
87 probeId: record.get('probeId'), |
195
01021f00ce6a
Load kommentare, status and messwerte when editing probe.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
194
diff
changeset
|
88 messungsId: record.get('messungsId') |
01021f00ce6a
Load kommentare, status and messwerte when editing probe.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
194
diff
changeset
|
89 } |
01021f00ce6a
Load kommentare, status and messwerte when editing probe.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
194
diff
changeset
|
90 }); |
362
6a7a9267e00f
Issue56: Changed way how to set the form and window to readonly. Now all dialogs should
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
312
diff
changeset
|
91 record.getAuthInfo(this.initEditWindow); |
6a7a9267e00f
Issue56: Changed way how to set the form and window to readonly. Now all dialogs should
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
312
diff
changeset
|
92 console.log("Loaded Messung with ID " + record.getId()); //outputs ID |
6a7a9267e00f
Issue56: Changed way how to set the form and window to readonly. Now all dialogs should
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
312
diff
changeset
|
93 }, |
6a7a9267e00f
Issue56: Changed way how to set the form and window to readonly. Now all dialogs should
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
312
diff
changeset
|
94 initEditWindow: function(record, readonly, owner) { |
232
6ac95f587e10
Used new Editdialog and set the form readonly if the parent probe is readonly.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
229
diff
changeset
|
95 var view = Ext.widget('messungenedit', {model: record}); |
362
6a7a9267e00f
Issue56: Changed way how to set the form and window to readonly. Now all dialogs should
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
312
diff
changeset
|
96 var ignore = Array(); |
6a7a9267e00f
Issue56: Changed way how to set the form and window to readonly. Now all dialogs should
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
312
diff
changeset
|
97 if (owner) { |
6a7a9267e00f
Issue56: Changed way how to set the form and window to readonly. Now all dialogs should
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
312
diff
changeset
|
98 ignore.push('fertig'); |
6a7a9267e00f
Issue56: Changed way how to set the form and window to readonly. Now all dialogs should
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
312
diff
changeset
|
99 } |
6a7a9267e00f
Issue56: Changed way how to set the form and window to readonly. Now all dialogs should
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
312
diff
changeset
|
100 if (readonly) { |
232
6ac95f587e10
Used new Editdialog and set the form readonly if the parent probe is readonly.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
229
diff
changeset
|
101 var form = view.down('form'); |
281
12ef979e73ce
Partially fixed issue55: Ignore the "fertig" field form when setting the form
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
233
diff
changeset
|
102 form.setReadOnly(true, ignore); |
232
6ac95f587e10
Used new Editdialog and set the form readonly if the parent probe is readonly.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
229
diff
changeset
|
103 } |
108
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
104 }, |
289
1bda6420c87c
Inherit from Base controller
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
281
diff
changeset
|
105 deleteItem: function(button) { |
108
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
106 // Get selected item in grid |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
107 var grid = button.up('grid'); |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
108 var selection = grid.getView().getSelectionModel().getSelection()[0]; |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
109 Ext.MessageBox.confirm('Löschen', 'Sind Sie sicher?', function(btn){ |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
110 if(btn === 'yes'){ |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
111 var store = grid.getStore(); |
218
1b5a0cb4fa6c
Fixed delete call
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
195
diff
changeset
|
112 var deleteUrl = selection.getProxy().url + selection.getEidi(); |
1b5a0cb4fa6c
Fixed delete call
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
195
diff
changeset
|
113 Ext.Ajax.request({ |
1b5a0cb4fa6c
Fixed delete call
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
195
diff
changeset
|
114 url: deleteUrl, |
1b5a0cb4fa6c
Fixed delete call
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
195
diff
changeset
|
115 method: 'DELETE', |
1b5a0cb4fa6c
Fixed delete call
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
195
diff
changeset
|
116 success: function(response, opts) { |
1b5a0cb4fa6c
Fixed delete call
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
195
diff
changeset
|
117 store.reload(); |
1b5a0cb4fa6c
Fixed delete call
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
195
diff
changeset
|
118 } |
1b5a0cb4fa6c
Fixed delete call
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
195
diff
changeset
|
119 }); |
1b5a0cb4fa6c
Fixed delete call
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
195
diff
changeset
|
120 console.log('Deleting Messung'); |
108
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
121 } else { |
218
1b5a0cb4fa6c
Fixed delete call
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
195
diff
changeset
|
122 console.log('Cancel Deleting Messung'); |
108
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
123 } |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
124 }); |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
125 }, |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
126 createSuccess: function(form, record, operation) { |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
127 var store = this.getMessungenStore(); |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
128 store.reload(); |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
129 var win = form.up('window'); |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
130 win.close(); |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
131 }, |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
132 createFailure: function(form, record, operation) { |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
133 Ext.MessageBox.show({ |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
134 title: 'Fehler beim Speichern', |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
135 msg: form.message, |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
136 icon: Ext.MessageBox.ERROR, |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
137 buttons: Ext.Msg.OK |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
138 }); |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
139 }, |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
140 editSuccess: function(form, record, operation) { |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
141 var store = this.getMessungenStore(); |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
142 store.reload(); |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
143 var win = form.up('window'); |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
144 win.close(); |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
145 }, |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
146 editFailure: function(form, record, operation) { |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
147 Ext.MessageBox.show({ |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
148 title: 'Fehler beim Speichern', |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
149 msg: form.message, |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
150 icon: Ext.MessageBox.ERROR, |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
151 buttons: Ext.Msg.OK |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
152 }); |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
153 } |
6c69bbb61c65
Added Forms to add Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
154 }); |