Mercurial > lada > lada-client
comparison 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 |
comparison
equal
deleted
inserted
replaced
1346:8742d020c685 | 1347:2fc8e2b3c456 |
---|---|
71 }, { | 71 }, { |
72 text: i18n.getMsg('discard'), | 72 text: i18n.getMsg('discard'), |
73 qtip: 'Ă„nderungen verwerfen', | 73 qtip: 'Ă„nderungen verwerfen', |
74 icon: 'resources/img/dialog-cancel.png', | 74 icon: 'resources/img/dialog-cancel.png', |
75 action: 'revert', | 75 action: 'revert', |
76 disabled: true | |
76 }] | 77 }] |
77 }], | 78 }], |
78 items: [{ | 79 items: [{ |
79 layout: 'hbox', | 80 layout: 'hbox', |
80 border: 0, | 81 border: 0, |
139 /** | 140 /** |
140 * setOrt can be called from a CallbackFunction, ie select from a grid. | 141 * setOrt can be called from a CallbackFunction, ie select from a grid. |
141 * it will set the ortId of this record | 142 * it will set the ortId of this record |
142 */ | 143 */ |
143 setOrt: function(row, selRecord, index, opts) { | 144 setOrt: function(row, selRecord, index, opts) { |
144 var newOrtId = selRecord.get('id'); | 145 if (selRecord) { |
146 var newOrtId = selRecord.get('id'); | |
147 } | |
145 if (newOrtId) { | 148 if (newOrtId) { |
146 this.getForm().setValues({ortId: newOrtId}); | 149 this.getForm().setValues({ortId: newOrtId}); |
147 this.setOrtInfo(selRecord); | 150 this.setOrtInfo(selRecord); |
148 } | 151 } |
149 }, | 152 }, |