Mercurial > lada > lada-client
annotate app/controller/Messwert.js @ 496:d07e5086a64b
Moved stammdaten stores to app.js and load them via storemanager.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Thu, 06 Nov 2014 10:35:35 +0100 |
parents | 850ccfe5f3c4 |
children | 7c0653e8d9f7 |
rev | line source |
---|---|
472
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
453
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:
453
diff
changeset
|
2 * Software engineering by Intevation GmbH |
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
453
diff
changeset
|
3 * |
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
453
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:
453
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:
453
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:
453
diff
changeset
|
7 */ |
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
453
diff
changeset
|
8 |
290
fe51239321d9
Inherit from Base controller
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
284
diff
changeset
|
9 /** |
fe51239321d9
Inherit from Base controller
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
284
diff
changeset
|
10 * Controller for Messwerte |
fe51239321d9
Inherit from Base controller
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
284
diff
changeset
|
11 */ |
197
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
12 Ext.define('Lada.controller.Messwert', { |
290
fe51239321d9
Inherit from Base controller
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
284
diff
changeset
|
13 extend: 'Lada.controller.Base', |
491
850ccfe5f3c4
Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
490
diff
changeset
|
14 |
197
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
15 views: [ |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
16 'messwerte.Create' |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
17 ], |
491
850ccfe5f3c4
Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
490
diff
changeset
|
18 |
197
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
19 stores: [ |
284
c32be5f97b5d
Fix for issue58. Get the related probe for the messwert and check if the probe
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
219
diff
changeset
|
20 'Proben', |
197
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
21 'Messungen', |
496
d07e5086a64b
Moved stammdaten stores to app.js and load them via storemanager.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
491
diff
changeset
|
22 'Messwerte' |
197
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
23 ], |
491
850ccfe5f3c4
Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
490
diff
changeset
|
24 |
197
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
25 init: function() { |
290
fe51239321d9
Inherit from Base controller
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
284
diff
changeset
|
26 console.log('Initialising the Messwert controller'); |
491
850ccfe5f3c4
Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
490
diff
changeset
|
27 this.callParent(arguments); |
290
fe51239321d9
Inherit from Base controller
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
284
diff
changeset
|
28 }, |
491
850ccfe5f3c4
Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
490
diff
changeset
|
29 |
290
fe51239321d9
Inherit from Base controller
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
284
diff
changeset
|
30 addListeners: function() { |
197
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
31 this.control({ |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
32 'messwertelist': { |
290
fe51239321d9
Inherit from Base controller
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
284
diff
changeset
|
33 itemdblclick: this.editItem |
197
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
34 }, |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
35 'messwertelist toolbar button[action=add]': { |
290
fe51239321d9
Inherit from Base controller
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
284
diff
changeset
|
36 click: this.addItem |
197
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
37 }, |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
38 'messwertelist toolbar button[action=delete]': { |
290
fe51239321d9
Inherit from Base controller
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
284
diff
changeset
|
39 click: this.deleteItem |
197
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
40 }, |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
41 'messwertecreate button[action=save]': { |
290
fe51239321d9
Inherit from Base controller
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
284
diff
changeset
|
42 click: this.saveItem |
197
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
43 }, |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
44 'messwertecreate form': { |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
45 savesuccess: this.createSuccess, |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
46 savefailure: this.createFailure |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
47 } |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
48 }); |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
49 }, |
491
850ccfe5f3c4
Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
490
diff
changeset
|
50 |
290
fe51239321d9
Inherit from Base controller
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
284
diff
changeset
|
51 saveItem: function(button) { |
197
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
52 console.log('Saving MesswerMesswert'); |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
53 var form = button.up('window').down('form'); |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
54 form.commit(); |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
55 }, |
491
850ccfe5f3c4
Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
490
diff
changeset
|
56 |
290
fe51239321d9
Inherit from Base controller
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
284
diff
changeset
|
57 addItem: function(button) { |
197
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
58 var messung = Ext.create('Lada.model.Messwert'); |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
59 messung.set('probeId', button.probeId); |
213
f0c59e7ee0bc
Set messungsid for new messungunswerte
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
197
diff
changeset
|
60 messung.set('messungsId', button.parentId); |
197
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
61 var view = Ext.widget('messwertecreate', {model: messung}); |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
62 }, |
491
850ccfe5f3c4
Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
490
diff
changeset
|
63 |
290
fe51239321d9
Inherit from Base controller
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
284
diff
changeset
|
64 editItem: function(grid, record) { |
197
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
65 console.log('Editing Messwert'); |
490
446e99cfd425
Updated views and controllers using the new model and stores.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
472
diff
changeset
|
66 var mstore = Ext.data.StoreManager.get('Messungen'); |
446e99cfd425
Updated views and controllers using the new model and stores.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
472
diff
changeset
|
67 var pstore = Ext.data.StoreManager.get('Proben'); |
446e99cfd425
Updated views and controllers using the new model and stores.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
472
diff
changeset
|
68 var messung = mstore.getById(record.get('messungsId')) |
446e99cfd425
Updated views and controllers using the new model and stores.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
472
diff
changeset
|
69 record.getAuthInfo(this.initEditWindow, messung.get('probeId')); |
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:
290
diff
changeset
|
70 console.log("Loaded Messwert 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:
290
diff
changeset
|
71 }, |
491
850ccfe5f3c4
Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
490
diff
changeset
|
72 |
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:
290
diff
changeset
|
73 initEditWindow: function(record, readonly, owner) { |
491
850ccfe5f3c4
Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
490
diff
changeset
|
74 var view = Ext.widget('messwertecreate', { |
850ccfe5f3c4
Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
490
diff
changeset
|
75 model: record |
850ccfe5f3c4
Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
490
diff
changeset
|
76 }); |
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:
290
diff
changeset
|
77 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:
290
diff
changeset
|
78 if (readonly) { |
284
c32be5f97b5d
Fix for issue58. Get the related probe for the messwert and check if the probe
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
219
diff
changeset
|
79 var form = view.down('form'); |
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:
290
diff
changeset
|
80 form.setReadOnly(true, ignore); |
284
c32be5f97b5d
Fix for issue58. Get the related probe for the messwert and check if the probe
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
219
diff
changeset
|
81 } |
197
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
82 }, |
491
850ccfe5f3c4
Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
490
diff
changeset
|
83 |
290
fe51239321d9
Inherit from Base controller
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
284
diff
changeset
|
84 deleteItem: function(button) { |
197
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
85 var grid = button.up('grid'); |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
86 var selection = grid.getView().getSelectionModel().getSelection()[0]; |
491
850ccfe5f3c4
Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
490
diff
changeset
|
87 Ext.MessageBox.confirm('Löschen', 'Sind Sie sicher?', function(btn) { |
850ccfe5f3c4
Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
490
diff
changeset
|
88 if (btn === 'yes') { |
197
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
89 var store = grid.getStore(); |
490
446e99cfd425
Updated views and controllers using the new model and stores.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
472
diff
changeset
|
90 var deleteUrl = selection.getProxy().url + selection.getId(); |
219
82f8b5638f26
Fixed delete call
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
213
diff
changeset
|
91 Ext.Ajax.request({ |
82f8b5638f26
Fixed delete call
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
213
diff
changeset
|
92 url: deleteUrl, |
82f8b5638f26
Fixed delete call
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
213
diff
changeset
|
93 method: 'DELETE', |
82f8b5638f26
Fixed delete call
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
213
diff
changeset
|
94 success: function(response, opts) { |
82f8b5638f26
Fixed delete call
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
213
diff
changeset
|
95 store.reload(); |
82f8b5638f26
Fixed delete call
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
213
diff
changeset
|
96 } |
82f8b5638f26
Fixed delete call
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
213
diff
changeset
|
97 }); |
82f8b5638f26
Fixed delete call
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
213
diff
changeset
|
98 console.log('Deleting Messwert'); |
197
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
99 } else { |
219
82f8b5638f26
Fixed delete call
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
213
diff
changeset
|
100 console.log('Cancel Deleting Messwert'); |
197
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
101 } |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
102 }); |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
103 }, |
491
850ccfe5f3c4
Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
490
diff
changeset
|
104 |
197
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
105 createSuccess: function(form, record, operation) { |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
106 // Reload store |
453
2b886fc38282
Formatting
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
362
diff
changeset
|
107 var store = this.getMesswerteStore(); |
197
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
108 store.reload(); |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
109 var win = form.up('window'); |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
110 win.close(); |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
111 }, |
491
850ccfe5f3c4
Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
490
diff
changeset
|
112 |
197
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
113 createFailure: function(form, record, operation) { |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
114 Ext.MessageBox.show({ |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
115 title: 'Fehler beim Speichern', |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
116 msg: form.message, |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
117 icon: Ext.MessageBox.ERROR, |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
118 buttons: Ext.Msg.OK |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
119 }); |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
120 }, |
491
850ccfe5f3c4
Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
490
diff
changeset
|
121 |
197
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
122 editSuccess: function(form, record, operation) { |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
123 // Reload store |
453
2b886fc38282
Formatting
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
362
diff
changeset
|
124 var store = this.getMesswerteStore(); |
197
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
125 store.reload(); |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
126 var win = form.up('window'); |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
127 win.close(); |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
128 }, |
491
850ccfe5f3c4
Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
490
diff
changeset
|
129 |
197
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
130 editFailure: function(form, record, operation) { |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
131 Ext.MessageBox.show({ |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
132 title: 'Fehler beim Speichern', |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
133 msg: form.message, |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
134 icon: Ext.MessageBox.ERROR, |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
135 buttons: Ext.Msg.OK |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
136 }); |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
137 } |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
138 }); |