comparison 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
comparison
equal deleted inserted replaced
794:bc6bc71efb78 795:255568e97c96
21 initComponent: function() { 21 initComponent: function() {
22 this.layout = { 22 this.layout = {
23 type: 'vbox', 23 type: 'vbox',
24 align: 'stretch' 24 align: 'stretch'
25 }; 25 };
26 var me = this;
26 this.items = [{ 27 this.items = [{
27 xtype: 'combobox', 28 xtype: 'combobox',
28 name: 'filter', 29 name: 'filter',
29 id: 'filter-combobox',
30 editable: false, 30 editable: false,
31 store: Ext.create('Lada.store.ProbeQueries',{ 31 store: Ext.create('Lada.store.ProbeQueries',{
32 listeners: { 32 listeners: {
33 load: function(s){ 33 load: function(s){
34 Ext.getCmp('filter-combobox') 34 var records = new Array();
35 .select(s.getAt(0).get('id')); 35 records.push(s.getAt(0));
36
37 var combo = me.down('combobox[name=filter]');
38 combo.select(records[0]);
39 combo.fireEvent('select', combo, records);
36 } 40 }
37 } 41 }
38 }), 42 }),
39 displayField: 'name', 43 displayField: 'name',
40 valueField: 'id', 44 valueField: 'id',
41 emptyText: 'Wählen Sie eine Abfrage', 45 emptyText: 'Wählen Sie eine Abfrage'
42 queryMode: 'local'
43 }, { 46 }, {
44 xtype: 'panel', 47 xtype: 'panel',
45 border: false, 48 border: false,
46 margin: '0 0 10 0', 49 margin: '0 0 10 0',
47 items: [{ 50 items: [{

http://lada.wald.intevation.org