Mercurial > lada > lada-client
comparison app/view/panel/Ort.js @ 1364:b58868c47f02
reintroduced filtered display of Stammdaten panel
author | Maximilian Krambach <mkrambach@intevation.de> |
---|---|
date | Wed, 08 Feb 2017 12:53:24 +0100 |
parents | 5c2d6812d85a |
children | 48c9c7b0ceef |
comparison
equal
deleted
inserted
replaced
1363:d52d4b55914b | 1364:b58868c47f02 |
---|---|
88 this.map.addControl(new OpenLayers.Control.ScaleLine()); | 88 this.map.addControl(new OpenLayers.Control.ScaleLine()); |
89 } | 89 } |
90 } | 90 } |
91 }]; | 91 }]; |
92 this.callParent(arguments); | 92 this.callParent(arguments); |
93 var map = this.down('map'); | |
94 var osg = this.down('ortstammdatengrid'); | |
95 osg.setLoading(true); | |
96 map.setLoading(true); | |
97 this.setStore(); | |
98 }, | 93 }, |
99 | 94 |
100 afterRender: function() { | 95 afterRender: function() { |
101 this.superclass.afterRender.apply(this, arguments); | 96 this.superclass.afterRender.apply(this, arguments); |
102 this.down('map').map.zoomTo(6); | 97 this.down('map').map.zoomTo(6); |
106 var me = this; | 101 var me = this; |
107 var osg = this.down('ortstammdatengrid'); | 102 var osg = this.down('ortstammdatengrid'); |
108 var map = this.down('map'); | 103 var map = this.down('map'); |
109 osg.setLoading(true); | 104 osg.setLoading(true); |
110 map.setLoading(true); | 105 map.setLoading(true); |
111 | 106 var ortstore = store; |
112 if (!store) { | 107 if (!ortstore) { |
113 this.ortstore = Ext.data.StoreManager.get('orte'); | 108 ortstore = Ext.data.StoreManager.get('orte'); |
114 //this.ortstore.clearFilter(true); | |
115 } else { | |
116 this.ortstore = store; | |
117 } | 109 } |
118 // store.clearFilter(true); | 110 ortstore.clearFilter(true); |
119 this.ortstore.load({ | 111 osg.setStore(ortstore); |
120 callback: function() { | 112 map.addLocations(ortstore); |
121 osg.setStore(me.ortstore); | 113 me.down('toolbar button[action=add]').enable(); |
122 map.addLocations(me.ortstore); | 114 me.down('toolbar button[action=addMap]').enable(); |
123 osg.setLoading(false); | 115 me.connectListeners(); |
124 map.setLoading(false); | |
125 } | |
126 }); | |
127 //enable buttons | |
128 this.down('toolbar button[action=add]').enable(); | |
129 this.down('toolbar button[action=addMap]').enable(); | |
130 this.connectListeners(); | |
131 }, | 116 }, |
132 | 117 |
133 getStore: function() { | 118 getStore: function() { |
134 return this.ortstore; | 119 return this.down('grid').getStore(); |
135 }, | 120 }, |
136 | 121 |
137 connectListeners: function() { | 122 connectListeners: function() { |
138 var osg = this.down('ortstammdatengrid'); | 123 var osg = this.down('ortstammdatengrid'); |
139 var map = this.down('map'); | 124 var map = this.down('map'); |