Mercurial > lada > lada-client
changeset 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 | 7267bae1d43f |
files | app/controller/ProbenPlanungSwitcher.js app/view/FilterPanel.js app/view/grid/FilterResult.js |
diffstat | 3 files changed, 15 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/app/controller/ProbenPlanungSwitcher.js Mon May 18 16:17:14 2015 +0200 +++ b/app/controller/ProbenPlanungSwitcher.js Mon May 18 17:04:32 2015 +0200 @@ -64,7 +64,11 @@ //Select first Item on Load listeners: { load: function(s){ - cbox.select(s.getAt(0).get('id')); + var records = new Array(); + records.push(store.getAt(0)); + + cbox.select(records[0]); + cbox.fireEvent('select', cbox, records); } } });
--- 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,
--- a/app/view/grid/FilterResult.js Mon May 18 16:17:14 2015 +0200 +++ b/app/view/grid/FilterResult.js Mon May 18 17:04:32 2015 +0200 @@ -111,8 +111,8 @@ /** * Setup columns of the Grid dynamically based on a list of given cols. - * The function is called from the {@link Lada.controller.Sql#selectSql - * select sql event} + * The function is called from the {@link Lada.controller.Filter#search + * search event} */ setupColumns: function(cols) { var resultColumns = [];