Mercurial > lada > lada-client
comparison app/controller/grid/Ortszuordnung.js @ 1291:e9f812528324
ortszuordnung form changes
removed discard button
cursor change if new position is to be selected on map
display of GemeindeId and Staat in ortzuordnung
author | Maximilian Krambach <mkrambach@intevation.de> |
---|---|
date | Wed, 01 Feb 2017 18:00:59 +0100 |
parents | bfdc00c24baf |
children | 9f15a932a525 |
comparison
equal
deleted
inserted
replaced
1290:d17501b967f2 | 1291:e9f812528324 |
---|---|
156 * | 156 * |
157 * Creates an event listener for a map click | 157 * Creates an event listener for a map click |
158 */ | 158 */ |
159 frommap: function(button) { | 159 frommap: function(button) { |
160 var map = button.up('ortszuordnungwindow').down('map'); | 160 var map = button.up('ortszuordnungwindow').down('map'); |
161 map.getEl().setStyle('cursor', 'crosshair'); | |
161 var me = this; | 162 var me = this; |
162 map.map.events.register('click', button, me.newOrtfromMapClick); | 163 map.map.events.register('click', button, me.newOrtfromMapClick); |
163 // TODO visual feedback that map click is active. | |
164 // TODO Deactivate event listener if button is destroyed | 164 // TODO Deactivate event listener if button is destroyed |
165 }, | 165 }, |
166 | 166 |
167 /** | 167 /** |
168 * Opens the form for a new Messpunkt, with all values prefilled from the currently | 168 * Opens the form for a new Messpunkt, with all values prefilled from the currently |
181 * Gets the clicked map's coordinates and opens a new Messpunkt window with coordinates prefilled | 181 * Gets the clicked map's coordinates and opens a new Messpunkt window with coordinates prefilled |
182 */ | 182 */ |
183 newOrtfromMapClick: function(evt) { | 183 newOrtfromMapClick: function(evt) { |
184 var me = this; //this = button(action:frommap) | 184 var me = this; //this = button(action:frommap) |
185 var map = this.up('ortszuordnungwindow').down('map').map; | 185 var map = this.up('ortszuordnungwindow').down('map').map; |
186 this.up('ortszuordnungwindow').down('map').getEl().setStyle('cursor', 'auto'); | |
186 var lonlat = map.getLonLatFromViewPortPx(evt.xy).transform(new OpenLayers.Projection('EPSG:3857'), | 187 var lonlat = map.getLonLatFromViewPortPx(evt.xy).transform(new OpenLayers.Projection('EPSG:3857'), |
187 new OpenLayers.Projection('EPSG:4326')); | 188 new OpenLayers.Projection('EPSG:4326')); |
188 var controller = Lada.app.getController('Lada.controller.grid.Ortszuordnung'); | 189 var controller = Lada.app.getController('Lada.controller.grid.Ortszuordnung'); |
189 map.events.unregister('click', this, controller.newOrtfromMapClick); | 190 map.events.unregister('click', this, controller.newOrtfromMapClick); |
190 Ext.create('Lada.view.window.Ortserstellung', { | 191 Ext.create('Lada.view.window.Ortserstellung', { |