annotate app/controller/grid/Messmethode.js @ 765:62721a75d31d

A draft on how the Nuklide could be selected... maybe this path can be used
author Dustin Demuth <dustin@intevation.de>
date Fri, 08 May 2015 16:12:01 +0200
parents ba8c0e754979
children 31eaed998531
rev   line source
758
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
2 * Software engineering by Intevation GmbH
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
3 *
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
4 * This file is Free Software under the GNU GPL (v>=3)
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
6 * the documentation coming with IMIS-Labordaten-Application for details.
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
7 */
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
8
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
9 /**
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
10 * This is a controller for a grid of Messmethode
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
11 */
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
12 Ext.define('Lada.controller.grid.Messmethode', {
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
13 extend: 'Ext.app.Controller',
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
14
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
15 /**
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
16 * Inhitialize the controller
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
17 * It has 3 listeners
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
18 */
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
19 init: function() {
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
20 this.control({
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
21 'messmethodengrid': {
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
22 edit: this.gridSave,
764
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents: 758
diff changeset
23 canceledit: this.cancelEdit,
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents: 758
diff changeset
24 select: this.selectRow
758
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
25 },
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
26 'messmethodengrid button[action=add]': {
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
27 click: this.add
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
28 },
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
29 'messmethodengrid button[action=delete]': {
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
30 click: this.remove
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
31 }
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
32 });
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
33 },
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
34
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
35 /**
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
36 * This function is called when the grids roweditor saves
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
37 * the record.
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
38 * On success it refreshes the windows which contains the grid
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
39 * On failure it displays a message
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
40 */
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
41 gridSave: function(editor, context) {
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
42 console.log(context);
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
43 context.record.save({
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
44 success: function() {
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
45 context.grid.initData();
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
46 context.grid.up('window').initData();
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
47 },
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
48 failure: function(request, response) {
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
49 var json = response.request.scope.reader.jsonData;
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
50 if (json) {
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
51 if (json.message){
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
52 Ext.Msg.alert(Lada.getApplication().bundle.getMsg('err.msg.save.title')
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
53 +' #'+json.message,
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
54 Lada.getApplication().bundle.getMsg(json.message));
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
55 } else {
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
56 Ext.Msg.alert(Lada.getApplication().bundle.getMsg('err.msg.save.title'),
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
57 Lada.getApplication().bundle.getMsg('err.msg.generic.body'));
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
58 }
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
59 } else {
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
60 Ext.Msg.alert(Lada.getApplication().bundle.getMsg('err.msg.save.title'),
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
61 Lada.getApplication().bundle.getMsg('err.msg.response.body'));
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
62 }
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
63 }
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
64 });
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
65 },
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
66
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
67 /**
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
68 * When the edit was canceled,
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
69 * the empty row might have been created by the roweditor is removed
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
70 */
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
71 cancelEdit: function(editor, context) {
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
72 if (!context.record.get('id') ||
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
73 context.record.get('id') === '') {
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
74 editor.getCmp().store.remove(context.record);
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
75 }
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
76 },
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
77
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
78 /**
764
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents: 758
diff changeset
79 * When a row is selected,
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents: 758
diff changeset
80 * the nuklid-grid will be updated
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents: 758
diff changeset
81 * to display the nuklide which are possible for this
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents: 758
diff changeset
82 * Messmethod
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents: 758
diff changeset
83 */
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents: 758
diff changeset
84 selectRow: function(row, record, index) {
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents: 758
diff changeset
85 var ngrid = row.view.up('window').down('nuklidegrid');
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents: 758
diff changeset
86 var nuklide = record.get('messgroessen');
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents: 758
diff changeset
87 var store = Ext.data.StoreManager.get('messgroessen');
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents: 758
diff changeset
88 if (!store) {
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents: 758
diff changeset
89 store = Ext.create('Lada.store.Messgroessen');
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents: 758
diff changeset
90 }
765
62721a75d31d A draft on how the Nuklide could be selected... maybe this path can be used
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
91 //get selection model
62721a75d31d A draft on how the Nuklide could be selected... maybe this path can be used
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
92 var selectedRecords = [];
62721a75d31d A draft on how the Nuklide could be selected... maybe this path can be used
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
93 //iterate store and slecet all records which are in nuklide array
62721a75d31d A draft on how the Nuklide could be selected... maybe this path can be used
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
94 store.each(function(record){
62721a75d31d A draft on how the Nuklide could be selected... maybe this path can be used
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
95 //TODO if(record.get('id') in nuklide){
62721a75d31d A draft on how the Nuklide could be selected... maybe this path can be used
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
96 selectedRecords.push(record);
62721a75d31d A draft on how the Nuklide could be selected... maybe this path can be used
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
97 //TODO}
62721a75d31d A draft on how the Nuklide could be selected... maybe this path can be used
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
98 });
764
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents: 758
diff changeset
99 ngrid.setData(store);
765
62721a75d31d A draft on how the Nuklide could be selected... maybe this path can be used
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
100
62721a75d31d A draft on how the Nuklide could be selected... maybe this path can be used
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
101 var selModel = ngrid.getSelectionModel();
62721a75d31d A draft on how the Nuklide could be selected... maybe this path can be used
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
102 console.log(selModel);
62721a75d31d A draft on how the Nuklide could be selected... maybe this path can be used
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
103 selModel.select(selectedRecords, false, false);
764
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents: 758
diff changeset
104 },
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents: 758
diff changeset
105
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents: 758
diff changeset
106 /**
758
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
107 * This function adds a new row
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
108 */
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
109 add: function(button) {
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
110 var record = Ext.create('Lada.model.MmtMessprogramm');
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
111 record.set('messprogrammId', button.up('messmethodengrid').recordId);
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
112 button.up('messmethodengrid').store.insert(0, record);
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
113 button.up('messmethodengrid').rowEditing.startEdit(0, 0);
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
114 },
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
115
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
116 /**
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
117 * A row can be removed from the grid with the remove
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
118 * function. It asks the user for confirmation
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
119 * If the removal was confirmed, it reloads the parent window on success,
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
120 * on failure, an error message is shown.
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
121 */
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
122 remove: function(button) {
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
123 var grid = button.up('grid');
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
124 //TODO i18n
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
125 var selection = grid.getView().getSelectionModel().getSelection()[0];
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
126 Ext.MessageBox.confirm('Löschen', 'Sind Sie sicher?', function(btn) {
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
127 if (btn === 'yes') {
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
128 selection.destroy({
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
129 success: function() {
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
130 button.up('window').initData();
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
131 },
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
132 failure: function(request, response) {
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
133 var json = response.request.scope.reader.jsonData;
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
134 if (json) {
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
135 if (json.message){
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
136 Ext.Msg.alert(Lada.getApplication().bundle.getMsg('err.msg.delete.title')
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
137 +' #'+json.message,
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
138 Lada.getApplication().bundle.getMsg(json.message));
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
139 } else {
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
140 Ext.Msg.alert(Lada.getApplication().bundle.getMsg('err.msg.delete.title'),
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
141 Lada.getApplication().bundle.getMsg('err.msg.generic.body'));
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
142 }
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
143 } else {
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
144 Ext.Msg.alert(Lada.getApplication().bundle.getMsg('err.msg.delete.title'),
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
145 Lada.getApplication().bundle.getMsg('err.msg.response.body'));
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
146 }
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
147 }
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
148 });
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
149 }
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
150 });
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
151 }
b2fcbdc4969d Filled MessmethodenGrid with life.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
152 });

http://lada.wald.intevation.org