diff app/view/FilterPanel.js @ 795:255568e97c96

Latest commit broke the search function
author Dustin Demuth <dustin@intevation.de>
date Mon, 18 May 2015 17:04:32 +0200
parents bc6bc71efb78
children 2e81d2ad6af7
line wrap: on
line diff
--- a/app/view/FilterPanel.js	Mon May 18 16:17:14 2015 +0200
+++ b/app/view/FilterPanel.js	Mon May 18 17:04:32 2015 +0200
@@ -23,23 +23,26 @@
             type: 'vbox',
             align: 'stretch'
         };
+        var me = this;
         this.items = [{
             xtype: 'combobox',
             name: 'filter',
-            id: 'filter-combobox',
             editable: false,
             store: Ext.create('Lada.store.ProbeQueries',{
                 listeners: {
                     load: function(s){
-                        Ext.getCmp('filter-combobox')
-                            .select(s.getAt(0).get('id'));
+                        var records = new Array();
+                        records.push(s.getAt(0));
+
+                        var combo = me.down('combobox[name=filter]');
+                        combo.select(records[0]);
+                        combo.fireEvent('select', combo, records);
                     }
                 }
             }),
             displayField: 'name',
             valueField: 'id',
-            emptyText: 'Wählen Sie eine Abfrage',
-            queryMode: 'local'
+            emptyText: 'Wählen Sie eine Abfrage'
         }, {
             xtype: 'panel',
             border: false,

http://lada.wald.intevation.org