Mercurial > lada > lada-client
comparison app/controller/grid/Status.js @ 974:ea477f62a667
Refresh a Probe and its Messungengrid when the status of a messung was changed
author | Dustin Demuth <dustin@intevation.de> |
---|---|
date | Mon, 30 Nov 2015 14:52:59 +0100 |
parents | f4eb53ba63fc |
children | c2a726887dd7 |
comparison
equal
deleted
inserted
replaced
973:989736bf4ffb | 974:ea477f62a667 |
---|---|
31 | 31 |
32 /** | 32 /** |
33 * This function is called when the grids roweditor saves | 33 * This function is called when the grids roweditor saves |
34 * the record. | 34 * the record. |
35 * On success it refreshes the windows which contains the grid | 35 * On success it refreshes the windows which contains the grid |
36 * it also tries to refresh the ProbeWindow and the messunggrid | |
36 * On failure it displays a message | 37 * On failure it displays a message |
37 */ | 38 */ |
38 gridSave: function(editor, context) { | 39 gridSave: function(editor, context) { |
39 context.record.set('sdatum', new Date()); | 40 context.record.set('sdatum', new Date()); |
40 context.record.save({ | 41 context.record.save({ |
41 success: function() { | 42 success: function() { |
42 context.grid.initData(); | 43 context.grid.initData(); |
43 context.grid.up('window').initData(); | 44 var win = context.grid.up('window'); |
45 win.initData(); | |
46 try { | |
47 win.parentWindow.initData(); | |
48 win.parentWindow.down('messunggrid').store.reload(); | |
49 } | |
50 catch(e) { | |
51 } | |
44 }, | 52 }, |
45 failure: function(request, response) { | 53 failure: function(request, response) { |
46 var json = response.request.scope.reader.jsonData; | 54 var json = response.request.scope.reader.jsonData; |
47 if (json) { | 55 if (json) { |
48 if (json.message){ | 56 if (json.message){ |