changeset 1420:48c9c7b0ceef 2.6.1

make map panel collapsable in Stammdaten form
author Michael Stanko <mstanko@bfs.de>
date Wed, 05 Apr 2017 16:02:45 +0200
parents 01f083db45b7
children ca9bea97b2f4
files app/view/panel/Ort.js
diffstat 1 files changed, 11 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/app/view/panel/Ort.js	Wed Mar 29 14:27:20 2017 +0200
+++ b/app/view/panel/Ort.js	Wed Apr 05 16:02:45 2017 +0200
@@ -19,7 +19,7 @@
 
     initComponent: function() {
         var i18n = Lada.getApplication().bundle;
-
+ 
         // Different Layout of toolbar depending on the bars position.
         if (this.toolbarPos == 'top') {
             this.dockedItems = [{
@@ -71,11 +71,12 @@
             xtype: 'ortstammdatengrid',
             width: '60%',
             editableGrid: this.editableGrid,
-            collapsible: true,
-            region: 'east'
+            region: 'center'
         }, {
             xtype: 'map',
-            region: 'center',
+            flex: 1,
+            collapsible: true,
+            region: 'east',
             layout: 'border',
             title: i18n.getMsg('map.title'),
             externalOrteStore: true,
@@ -83,9 +84,15 @@
                 beforecollapse: function() {
                     var c = this.map.getControlsByClass('OpenLayers.Control.ScaleLine');
                     this.map.removeControl(c[0]);
+                    for (i = 0; i < this.map.layers.length; i++) {
+                        this.map.layers[i].setVisibility(false);
+                    }
                 },
                 expand: function() {
                     this.map.addControl(new OpenLayers.Control.ScaleLine());
+                    for (i = 0; i < this.map.layers.length; i++) {
+                        this.map.layers[i].setVisibility(true);
+                    }
                 }
             }
         }];

http://lada.wald.intevation.org