[Lada-commits] [PATCH 2 of 2] Change store on radiobutton change for proben and messprogramm

Wald Commits scm-commit at wald.intevation.org
Tue Apr 28 10:56:57 CEST 2015


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1430211470 -7200
# Node ID 78e73be45aaa11486fe6565e81a983d6aa504bfc
# Parent  344330d3d1cd9e6fee51cfa6e61ed0c0a4b04f4c
Change store on radiobutton change for proben and messprogramm.

diff -r 344330d3d1cd -r 78e73be45aaa app/controller/ProbenPlanungSwitcher.js
--- a/app/controller/ProbenPlanungSwitcher.js	Tue Apr 28 10:56:41 2015 +0200
+++ b/app/controller/ProbenPlanungSwitcher.js	Tue Apr 28 10:57:50 2015 +0200
@@ -14,6 +14,10 @@
     extend: 'Ext.app.Controller',
     displayFields: null,
 
+    requires: [
+        'Lada.store.MessprogrammQueries'
+    ],
+
     /**
      * Initialize this Controller
      * It has 1 Listeners
@@ -36,12 +40,14 @@
      */
     switchStores: function(field) {
         var cbox = field.up('probenplanungswitcher').up().down('combobox');
+        var resultGrid = field.up('panel[name=main]').down('filterresultgrid');
 
-        if (field.inputValue == "probenplanung" && cbox) {
-            var sname = 'Lada.store.Queries'; // TODO change store!
+        var sname = 'Lada.store.ProbeQueries';
+        if (field.inputValue === 'probenplanung' && cbox) {
+            sname = 'Lada.store.MessprogrammQueries'; // TODO change store!
         }
-        else if (field.inputValue == "probenliste" && cbox) {
-            var sname = 'Lada.store.Queries';
+        else if (field.inputValue === 'probenliste' && cbox) {
+            sname = 'Lada.store.ProbeQueries';
         }
 
         var store = Ext.StoreManager.lookup(sname);
diff -r 344330d3d1cd -r 78e73be45aaa app/model/Messprogramm.js
--- a/app/model/Messprogramm.js	Tue Apr 28 10:56:41 2015 +0200
+++ b/app/model/Messprogramm.js	Tue Apr 28 10:57:50 2015 +0200
@@ -80,7 +80,7 @@
 
     proxy: {
         type: 'rest',
-        //url: 'lada-server/messprogramm', //not yet implemented
+        url: 'lada-server/messprogramm', //not yet implemented
         reader: {
             type: 'json',
             root: 'data'
diff -r 344330d3d1cd -r 78e73be45aaa app/model/Query.js
--- a/app/model/Query.js	Tue Apr 28 10:56:41 2015 +0200
+++ b/app/model/Query.js	Tue Apr 28 10:57:50 2015 +0200
@@ -28,7 +28,7 @@
 
     proxy: {
         type: 'rest',
-        url: 'lada-server/query',
+        url: 'lada-server/query/probe',
         reader: {
             type: 'json',
             root: 'data'
diff -r 344330d3d1cd -r 78e73be45aaa app/store/Queries.js
--- a/app/store/Queries.js	Tue Apr 28 10:56:41 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
- * Software engineering by Intevation GmbH
- *
- * This file is Free Software under the GNU GPL (v>=3)
- * and comes with ABSOLUTELY NO WARRANTY! Check out
- * the documentation coming with IMIS-Labordaten-Application for details. 
- */
-
-/**
- * Store for Queries
- */
-Ext.define('Lada.store.Queries', {
-    extend: 'Ext.data.Store',
-    model: 'Lada.model.Query',
-    autoLoad: true
-});
diff -r 344330d3d1cd -r 78e73be45aaa app/view/FilterPanel.js
--- a/app/view/FilterPanel.js	Tue Apr 28 10:56:41 2015 +0200
+++ b/app/view/FilterPanel.js	Tue Apr 28 10:57:50 2015 +0200
@@ -27,7 +27,7 @@
             xtype: 'combobox',
             name: 'filter',
             editable: false,
-            store: Ext.create('Lada.store.Queries'),
+            store: Ext.create('Lada.store.ProbeQueries'),
             displayField: 'name',
             valueField: 'id',
             emptyText: 'Wählen Sie eine Abfrage'


More information about the Lada-commits mailing list