[Lada-commits] [PATCH] Latest commit broke the search function

Wald Commits scm-commit at wald.intevation.org
Mon May 18 17:04:41 CEST 2015


# HG changeset patch
# User Dustin Demuth <dustin at intevation.de>
# Date 1431961472 -7200
# Node ID 255568e97c961005d1eabb07616ff26b261692d7
# Parent  bc6bc71efb7846f31176b2cae56545346c1f30e4
Latest commit broke the search function

diff -r bc6bc71efb78 -r 255568e97c96 app/controller/ProbenPlanungSwitcher.js
--- 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);
                     }
                 }
             });
diff -r bc6bc71efb78 -r 255568e97c96 app/view/FilterPanel.js
--- 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,
diff -r bc6bc71efb78 -r 255568e97c96 app/view/grid/FilterResult.js
--- 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 = [];


More information about the Lada-commits mailing list