Mercurial > lada > lada-client
diff app/view/form/Ortszuordnung.js @ 1347:2fc8e2b3c456
fix ortszuordnung 'revert' if record is new ortszuordnung
author | Maximilian Krambach <mkrambach@intevation.de> |
---|---|
date | Mon, 06 Feb 2017 12:33:00 +0100 |
parents | cd16b30dbc10 |
children | ba106500af0b |
line wrap: on
line diff
--- a/app/view/form/Ortszuordnung.js Mon Feb 06 12:02:37 2017 +0100 +++ b/app/view/form/Ortszuordnung.js Mon Feb 06 12:33:00 2017 +0100 @@ -73,6 +73,7 @@ qtip: 'Ă„nderungen verwerfen', icon: 'resources/img/dialog-cancel.png', action: 'revert', + disabled: true }] }], items: [{ @@ -141,7 +142,9 @@ * it will set the ortId of this record */ setOrt: function(row, selRecord, index, opts) { - var newOrtId = selRecord.get('id'); + if (selRecord) { + var newOrtId = selRecord.get('id'); + } if (newOrtId) { this.getForm().setValues({ortId: newOrtId}); this.setOrtInfo(selRecord);