raimund@638: /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz raimund@638: * Software engineering by Intevation GmbH raimund@638: * raimund@638: * This file is Free Software under the GNU GPL (v>=3) raimund@638: * and comes with ABSOLUTELY NO WARRANTY! Check out raimund@638: * the documentation coming with IMIS-Labordaten-Application for details. raimund@638: */ raimund@638: raimund@638: /** raimund@638: */ raimund@638: Ext.define('Lada.controller.Map', { raimund@638: extend: 'Ext.app.Controller', raimund@638: raimund@638: requires: [ raimund@638: ], raimund@638: raimund@638: init: function() { raimund@638: this.control({ raimund@638: 'maptoolbar button[action=add]': { raimund@638: click: this.addLocation raimund@638: } raimund@638: }); raimund@638: this.callParent(arguments); raimund@638: }, raimund@638: raimund@638: addLocation: function(button) { raimund@638: var mapPanel = button.up('map'); raimund@638: var details = button.up('window').down('locationform'); raimund@638: var newLocation = Ext.create('Lada.model.Location'); raimund@638: details.setRecord(newLocation); raimund@638: details.setReadOnly(false); raimund@638: raimund@638: mapPanel.activateDraw(newLocation); raimund@638: } raimund@638: });