diff app/controller/ProbenPlanungSwitcher.js @ 794:bc6bc71efb78

Preselect Proben in PPS, Preselect the first entry in the Filter Combobox
author Dustin Demuth <dustin@intevation.de>
date Mon, 18 May 2015 16:17:14 +0200
parents d572ee3271ac
children 255568e97c96
line wrap: on
line diff
--- a/app/controller/ProbenPlanungSwitcher.js	Wed May 13 16:01:24 2015 +0200
+++ b/app/controller/ProbenPlanungSwitcher.js	Mon May 18 16:17:14 2015 +0200
@@ -60,7 +60,14 @@
 
         var store = Ext.StoreManager.lookup(sname);
         if (!store) {
-            store = Ext.create(sname);
+            store = Ext.create(sname, {
+                //Select first Item on Load
+                listeners: {
+                    load: function(s){
+                        cbox.select(s.getAt(0).get('id'));
+                    }
+                }
+            });
         }
         if (store) {
             store.load();

http://lada.wald.intevation.org