Mercurial > lada > lada-client
annotate app/controller/Messwert.js @ 491:850ccfe5f3c4
Code style.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Fri, 31 Oct 2014 23:23:32 +0100 |
parents | 446e99cfd425 |
children | d07e5086a64b |
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', |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
22 'Messwerte', |
490
446e99cfd425
Updated views and controllers using the new model and stores.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
472
diff
changeset
|
23 'StaMesseinheiten', |
446e99cfd425
Updated views and controllers using the new model and stores.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
472
diff
changeset
|
24 'StaMessgroessen' |
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 ], |
491
850ccfe5f3c4
Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
490
diff
changeset
|
26 |
197
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
27 init: function() { |
290
fe51239321d9
Inherit from Base controller
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
284
diff
changeset
|
28 console.log('Initialising the Messwert controller'); |
491
850ccfe5f3c4
Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
490
diff
changeset
|
29 this.callParent(arguments); |
290
fe51239321d9
Inherit from Base controller
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
284
diff
changeset
|
30 }, |
491
850ccfe5f3c4
Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
490
diff
changeset
|
31 |
290
fe51239321d9
Inherit from Base controller
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
284
diff
changeset
|
32 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
|
33 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
|
34 'messwertelist': { |
290
fe51239321d9
Inherit from Base controller
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
284
diff
changeset
|
35 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
|
36 }, |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
37 'messwertelist toolbar button[action=add]': { |
290
fe51239321d9
Inherit from Base controller
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
284
diff
changeset
|
38 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
|
39 }, |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
40 'messwertelist toolbar button[action=delete]': { |
290
fe51239321d9
Inherit from Base controller
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
284
diff
changeset
|
41 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
|
42 }, |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
43 'messwertecreate button[action=save]': { |
290
fe51239321d9
Inherit from Base controller
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
284
diff
changeset
|
44 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
|
45 }, |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
46 '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
|
47 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
|
48 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
|
49 } |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
50 }); |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
51 }, |
491
850ccfe5f3c4
Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
490
diff
changeset
|
52 |
290
fe51239321d9
Inherit from Base controller
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
284
diff
changeset
|
53 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
|
54 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
|
55 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
|
56 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
|
57 }, |
491
850ccfe5f3c4
Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
490
diff
changeset
|
58 |
290
fe51239321d9
Inherit from Base controller
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
284
diff
changeset
|
59 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
|
60 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
|
61 messung.set('probeId', button.probeId); |
213
f0c59e7ee0bc
Set messungsid for new messungunswerte
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
197
diff
changeset
|
62 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
|
63 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
|
64 }, |
491
850ccfe5f3c4
Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
490
diff
changeset
|
65 |
290
fe51239321d9
Inherit from Base controller
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
284
diff
changeset
|
66 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
|
67 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
|
68 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
|
69 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
|
70 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
|
71 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
|
72 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
|
73 }, |
491
850ccfe5f3c4
Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
490
diff
changeset
|
74 |
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
|
75 initEditWindow: function(record, readonly, owner) { |
491
850ccfe5f3c4
Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
490
diff
changeset
|
76 var view = Ext.widget('messwertecreate', { |
850ccfe5f3c4
Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
490
diff
changeset
|
77 model: record |
850ccfe5f3c4
Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
490
diff
changeset
|
78 }); |
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
|
79 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
|
80 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
|
81 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
|
82 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
|
83 } |
197
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
84 }, |
491
850ccfe5f3c4
Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
490
diff
changeset
|
85 |
290
fe51239321d9
Inherit from Base controller
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
284
diff
changeset
|
86 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
|
87 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
|
88 var selection = grid.getView().getSelectionModel().getSelection()[0]; |
491
850ccfe5f3c4
Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
490
diff
changeset
|
89 Ext.MessageBox.confirm('Löschen', 'Sind Sie sicher?', function(btn) { |
850ccfe5f3c4
Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
490
diff
changeset
|
90 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
|
91 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
|
92 var deleteUrl = selection.getProxy().url + selection.getId(); |
219
82f8b5638f26
Fixed delete call
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
213
diff
changeset
|
93 Ext.Ajax.request({ |
82f8b5638f26
Fixed delete call
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
213
diff
changeset
|
94 url: deleteUrl, |
82f8b5638f26
Fixed delete call
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
213
diff
changeset
|
95 method: 'DELETE', |
82f8b5638f26
Fixed delete call
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
213
diff
changeset
|
96 success: function(response, opts) { |
82f8b5638f26
Fixed delete call
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
213
diff
changeset
|
97 store.reload(); |
82f8b5638f26
Fixed delete call
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
213
diff
changeset
|
98 } |
82f8b5638f26
Fixed delete call
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
213
diff
changeset
|
99 }); |
82f8b5638f26
Fixed delete call
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
213
diff
changeset
|
100 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
|
101 } else { |
219
82f8b5638f26
Fixed delete call
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
213
diff
changeset
|
102 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
|
103 } |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
104 }); |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
105 }, |
491
850ccfe5f3c4
Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
490
diff
changeset
|
106 |
197
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
107 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
|
108 // Reload store |
453
2b886fc38282
Formatting
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
362
diff
changeset
|
109 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
|
110 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
|
111 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
|
112 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
|
113 }, |
491
850ccfe5f3c4
Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
490
diff
changeset
|
114 |
197
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
115 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
|
116 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
|
117 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
|
118 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
|
119 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
|
120 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
|
121 }); |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
122 }, |
491
850ccfe5f3c4
Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
490
diff
changeset
|
123 |
197
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
124 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
|
125 // Reload store |
453
2b886fc38282
Formatting
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
362
diff
changeset
|
126 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
|
127 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
|
128 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
|
129 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
|
130 }, |
491
850ccfe5f3c4
Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
490
diff
changeset
|
131 |
197
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
132 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
|
133 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
|
134 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
|
135 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
|
136 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
|
137 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
|
138 }); |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
139 } |
748614e867b1
Added messwerte controller to be able to add, edit and delete messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
140 }); |