comparison app/controller/grid/Messung.js @ 1416:41b894caacfe

allow to open Messungs grid if messung is readonly but messwert grid will be empty
author Michael Stanko <mstanko@bfs.de>
date Tue, 28 Mar 2017 15:36:30 +0200
parents d7bcd31ceaa6
children
comparison
equal deleted inserted replaced
1415:3da3772272a5 1416:41b894caacfe
40 */ 40 */
41 editItem: function(grid, record) { 41 editItem: function(grid, record) {
42 // we have a window with a probe record! 42 // we have a window with a probe record!
43 if (grid.up('window')) { 43 if (grid.up('window')) {
44 var probe = grid.up('window').record; 44 var probe = grid.up('window').record;
45 /* Only open a new Window when: 45 var win = Ext.create('Lada.view.window.MessungEdit', {
46 statusEdit = True 46 parentWindow: grid.up('window'),
47 -or- 47 probe: probe,
48 the value of status is not 0 48 record: record,
49 -or- 49 grid: grid
50 the owner = True 50 });
51 51 win.show();
52 the statusWert attribute is not present in the original data. 52 win.setPosition(window.innerWidth - 30 -win.width);
53 it is appended, when the value and name of the status were 53 win.initData();
54 determined.
55 */
56 if (record.get('statusEdit')
57 || record.get('statusWert') > 0
58 || record.get('owner')) {
59 var win = Ext.create('Lada.view.window.MessungEdit', {
60 parentWindow: grid.up('window'),
61 probe: probe,
62 record: record,
63 grid: grid
64 });
65 win.show();
66 win.setPosition(window.innerWidth - 30 -win.width);
67 win.initData();
68 }
69 return; 54 return;
70 } 55 }
71 var probeRecord = Ext.create('Lada.model.ProbeList'); 56 var probeRecord = Ext.create('Lada.model.ProbeList');
72 probeRecord.setId(record.get('probeId')); 57 probeRecord.setId(record.get('probeId'));
73 probeRecord.set('owner', record.get('owner')); 58 probeRecord.set('owner', record.get('owner'));

http://lada.wald.intevation.org