comparison app/view/window/Ortszuordnung.js @ 1292:317ae6bfd647

Clone button only activated if an ort has been selected in the grid
author Maximilian Krambach <mkrambach@intevation.de>
date Wed, 01 Feb 2017 18:54:31 +0100
parents bfdc00c24baf
children c1b7db04b39c
comparison
equal deleted inserted replaced
1291:e9f812528324 1292:317ae6bfd647
155 }, { 155 }, {
156 text: i18n.getMsg('orte.frommap'), 156 text: i18n.getMsg('orte.frommap'),
157 action: 'frommap' 157 action: 'frommap'
158 }, { 158 }, {
159 text: i18n.getMsg('orte.clone'), 159 text: i18n.getMsg('orte.clone'),
160 action: 'clone' 160 action: 'clone',
161 disabled : true
161 }] 162 }]
162 }] 163 }]
163 }] 164 }]
164 }]; 165 }];
165 this.callParent(arguments); 166 this.callParent(arguments);
230 } 231 }
231 }); 232 });
232 this.ortstore.load(); 233 this.ortstore.load();
233 map.addListener('featureselected', osg.selectOrt, osg); 234 map.addListener('featureselected', osg.selectOrt, osg);
234 osg.addListener('select', map.selectFeature, map); 235 osg.addListener('select', map.selectFeature, map);
236 osg.addListener('select', me.activateCloneButton, me);
235 }, 237 },
236 238
237 /** 239 /**
238 * @private 240 * @private
239 * Override to display and update the map view in the panel. 241 * Override to display and update the map view in the panel.
256 /** 258 /**
257 * Instructs the fields / forms listed in this method to clear their messages. 259 * Instructs the fields / forms listed in this method to clear their messages.
258 */ 260 */
259 clearMessages: function() { 261 clearMessages: function() {
260 //todo this is a stub 262 //todo this is a stub
263 },
264
265 activateCloneButton: function() {
266 var toolbar = this.down('panel[name=ortgrid]').getDockedItems()[0];
267 toolbar.down('button[action=clone]').enable();
261 } 268 }
262 }); 269 });
263 270

http://lada.wald.intevation.org