Mercurial > lada > lada-client
diff app/view/window/Ortszuordnung.js @ 1021:1df6b6210b42 stammdatengrids
WIP First Version of a New Window/Panel combination to edit Ortszuordnungen and Orte
author | Dustin Demuth <dustin@intevation.de> |
---|---|
date | Thu, 04 Feb 2016 16:31:46 +0100 |
parents | 75ce503ab296 |
children | 1bd4c0709bd6 |
line wrap: on
line diff
--- a/app/view/window/Ortszuordnung.js Fri Jan 29 14:51:17 2016 +0100 +++ b/app/view/window/Ortszuordnung.js Thu Feb 04 16:31:46 2016 +0100 @@ -14,13 +14,14 @@ alias: 'widget.ortszuordnungwindow', requires: [ - 'Lada.view.form.Ortszuordnung' + 'Lada.view.form.Ortszuordnung', + 'Lada.view.panel.Ort' ], collapsible: true, maximizable: true, autoshow: true, - layout: 'border', + layout: 'vbox', constrain: true, probe: null, @@ -37,14 +38,14 @@ this.title = i18n.getMsg('ortszuordnung.window.title'); if (this.record && this.probe) { - // A new record will be created + // A record be edited this.title = i18n.getMsg('ortszuordnung.window.title') + ' ' + i18n.getMsg('ortszuordnung.window.title2') + ' ' + i18n.getMsg('probe') + ' ' - + probe.get('hauptprobennr') + + this.probe.get('hauptprobennr') + ' ' + i18n.getMsg('edit'); } @@ -56,7 +57,7 @@ + ' ' + i18n.getMsg('probe') + ' ' - + probe.get('hauptprobennr') + + this.probe.get('hauptprobennr') + ' ' + i18n.getMsg('create'); } @@ -81,16 +82,14 @@ }); this.items = [{ - region: 'west', - border: 0, - layout: 'hbox', - items: [{ - xtype: 'ortszuordnungform', - margin: 5 - //}, { - // xtype: 'ortpanel', - // margin: 5 - }] + xtype: 'ortszuordnungform', + layout: 'fit', + margin: 5 + }, { + xtype: 'ortpanel', + flex: 1, + toolbarPos: 'bottom', + margin: 5 }]; this.callParent(arguments); }, @@ -100,6 +99,17 @@ */ initData: function() { this.down('ortszuordnungform').setRecord(this.record); + this.down('ortpanel').setStore(); + }, + + /** + * @private + * Override to display and update the map view in the panel. + */ + afterRender: function(){ + this.superclass.afterRender.apply(this, arguments); + var map = this.down('ortpanel').down('map'); + map.map.zoomToMaxExtent(); }, /**