Mercurial > lada > lada-client
comparison app/controller/grid/Datensatzerzeuger.js @ 1089:01bcca98ae8f
Allow row-editing for items with empty netzbetreiberId.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Mon, 09 May 2016 13:01:49 +0200 |
parents | 5e9a674d7bb4 |
children |
comparison
equal
deleted
inserted
replaced
1085:3c42c06e3a36 | 1089:01bcca98ae8f |
---|---|
39 this.buttonToggle(rowModel, record); | 39 this.buttonToggle(rowModel, record); |
40 }, | 40 }, |
41 | 41 |
42 checkEdit: function(rowModel, record) { | 42 checkEdit: function(rowModel, record) { |
43 if (!Ext.Array.contains(Lada.netzbetreiber, | 43 if (!Ext.Array.contains(Lada.netzbetreiber, |
44 record.get('netzbetreiberId'))) { | 44 record.get('netzbetreiberId')) && |
45 record.get('netzbetreiberId') !== '') { | |
45 var grid = Ext.ComponentQuery.query('datensatzerzeugergrid')[0]; | 46 var grid = Ext.ComponentQuery.query('datensatzerzeugergrid')[0]; |
46 grid.rowEditing.cancelEdit(); | 47 grid.rowEditing.cancelEdit(); |
47 return; | 48 return; |
48 } | 49 } |
49 }, | 50 }, |
50 | 51 |
51 edit: function(gridView, record) { | 52 edit: function(gridView, record) { |
52 var grid = Ext.ComponentQuery.query('datensatzerzeugergrid')[0]; | 53 var grid = Ext.ComponentQuery.query('datensatzerzeugergrid')[0]; |
53 if (!Ext.Array.contains(Lada.netzbetreiber, | 54 if (!Ext.Array.contains(Lada.netzbetreiber, |
54 record.get('netzbetreiberId'))) { | 55 record.get('netzbetreiberId')) && |
56 record.get('netzbetreiberId') !== '') { | |
55 grid.rowEditing.cancelEdit(); | 57 grid.rowEditing.cancelEdit(); |
56 return; | 58 return; |
57 } | 59 } |
58 grid.rowEditing.startEdit(record, 0); | 60 grid.rowEditing.startEdit(record, 0); |
59 grid.down('button[action=delete]').disable(); | 61 grid.down('button[action=delete]').disable(); |