comparison app/controller/grid/Messung.js @ 962:9b6800458a9e

Altered permissions to open a Messung from the Messung-grid. Opening a Messung is only possible, when: a) StatusEdit=True or b) StatusWert > 0
author Dustin Demuth <dustin@intevation.de>
date Thu, 12 Nov 2015 09:50:48 +0100
parents 2362f8ab1e9f
children 6a6f2c6fe8ee
comparison
equal deleted inserted replaced
961:6f1cc3316e2d 962:9b6800458a9e
38 * This function opens a new {@link Lada.view.window.MessungEdit} 38 * This function opens a new {@link Lada.view.window.MessungEdit}
39 * Window. 39 * Window.
40 */ 40 */
41 editItem: function(grid, record) { 41 editItem: function(grid, record) {
42 var probe = grid.up('window').record; 42 var probe = grid.up('window').record;
43 var win = Ext.create('Lada.view.window.MessungEdit', { 43 /* Only open a new Window when:
44 parentWindow: grid.up('window'), 44 statusEdit = True
45 probe: probe, 45 -or-
46 record: record, 46 the value of status is not 0
47 grid: grid 47 the statusWert attribute is not present in the original data.
48 }); 48 it is appended, when the value and name of the status were
49 win.show(); 49 determined.
50 win.initData(); 50 */
51 if (record.get('statusEdit') || record.get('statusWert') > 0) {
52 var win = Ext.create('Lada.view.window.MessungEdit', {
53 parentWindow: grid.up('window'),
54 probe: probe,
55 record: record,
56 grid: grid
57 });
58 win.show();
59 win.initData();
60 }
51 }, 61 },
52 62
53 /** 63 /**
54 * This function opens a window add a Messung 64 * This function opens a window add a Messung
55 */ 65 */

http://lada.wald.intevation.org