Mercurial > lada > lada-client
comparison app/view/panel/Ort.js @ 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 | b58868c47f02 |
children |
comparison
equal
deleted
inserted
replaced
1419:01f083db45b7 | 1420:48c9c7b0ceef |
---|---|
17 | 17 |
18 editableGrid: true, | 18 editableGrid: true, |
19 | 19 |
20 initComponent: function() { | 20 initComponent: function() { |
21 var i18n = Lada.getApplication().bundle; | 21 var i18n = Lada.getApplication().bundle; |
22 | 22 |
23 // Different Layout of toolbar depending on the bars position. | 23 // Different Layout of toolbar depending on the bars position. |
24 if (this.toolbarPos == 'top') { | 24 if (this.toolbarPos == 'top') { |
25 this.dockedItems = [{ | 25 this.dockedItems = [{ |
26 xtype: 'toolbar', | 26 xtype: 'toolbar', |
27 dock: 'top', | 27 dock: 'top', |
69 | 69 |
70 this.items = [{ | 70 this.items = [{ |
71 xtype: 'ortstammdatengrid', | 71 xtype: 'ortstammdatengrid', |
72 width: '60%', | 72 width: '60%', |
73 editableGrid: this.editableGrid, | 73 editableGrid: this.editableGrid, |
74 collapsible: true, | 74 region: 'center' |
75 region: 'east' | |
76 }, { | 75 }, { |
77 xtype: 'map', | 76 xtype: 'map', |
78 region: 'center', | 77 flex: 1, |
78 collapsible: true, | |
79 region: 'east', | |
79 layout: 'border', | 80 layout: 'border', |
80 title: i18n.getMsg('map.title'), | 81 title: i18n.getMsg('map.title'), |
81 externalOrteStore: true, | 82 externalOrteStore: true, |
82 listeners: { | 83 listeners: { |
83 beforecollapse: function() { | 84 beforecollapse: function() { |
84 var c = this.map.getControlsByClass('OpenLayers.Control.ScaleLine'); | 85 var c = this.map.getControlsByClass('OpenLayers.Control.ScaleLine'); |
85 this.map.removeControl(c[0]); | 86 this.map.removeControl(c[0]); |
87 for (i = 0; i < this.map.layers.length; i++) { | |
88 this.map.layers[i].setVisibility(false); | |
89 } | |
86 }, | 90 }, |
87 expand: function() { | 91 expand: function() { |
88 this.map.addControl(new OpenLayers.Control.ScaleLine()); | 92 this.map.addControl(new OpenLayers.Control.ScaleLine()); |
93 for (i = 0; i < this.map.layers.length; i++) { | |
94 this.map.layers[i].setVisibility(true); | |
95 } | |
89 } | 96 } |
90 } | 97 } |
91 }]; | 98 }]; |
92 this.callParent(arguments); | 99 this.callParent(arguments); |
93 }, | 100 }, |