Mercurial > lada > lada-client
comparison app/controller/ProbenPlanungSwitcher.js @ 749:78e73be45aaa
Change store on radiobutton change for proben and messprogramm.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Tue, 28 Apr 2015 10:57:50 +0200 |
parents | 3ffecbce17d6 |
children | 561ade69980e |
comparison
equal
deleted
inserted
replaced
748:344330d3d1cd | 749:78e73be45aaa |
---|---|
11 * This controller handles all logic related to the PPS | 11 * This controller handles all logic related to the PPS |
12 */ | 12 */ |
13 Ext.define('Lada.controller.ProbenPlanungSwitcher', { | 13 Ext.define('Lada.controller.ProbenPlanungSwitcher', { |
14 extend: 'Ext.app.Controller', | 14 extend: 'Ext.app.Controller', |
15 displayFields: null, | 15 displayFields: null, |
16 | |
17 requires: [ | |
18 'Lada.store.MessprogrammQueries' | |
19 ], | |
16 | 20 |
17 /** | 21 /** |
18 * Initialize this Controller | 22 * Initialize this Controller |
19 * It has 1 Listeners | 23 * It has 1 Listeners |
20 * A checked PPS-Radiofield fired a 'check'-event | 24 * A checked PPS-Radiofield fired a 'check'-event |
34 * the function alters the store which was loaded by the | 38 * the function alters the store which was loaded by the |
35 * filterpanels combobox | 39 * filterpanels combobox |
36 */ | 40 */ |
37 switchStores: function(field) { | 41 switchStores: function(field) { |
38 var cbox = field.up('probenplanungswitcher').up().down('combobox'); | 42 var cbox = field.up('probenplanungswitcher').up().down('combobox'); |
43 var resultGrid = field.up('panel[name=main]').down('filterresultgrid'); | |
39 | 44 |
40 if (field.inputValue == "probenplanung" && cbox) { | 45 var sname = 'Lada.store.ProbeQueries'; |
41 var sname = 'Lada.store.Queries'; // TODO change store! | 46 if (field.inputValue === 'probenplanung' && cbox) { |
47 sname = 'Lada.store.MessprogrammQueries'; // TODO change store! | |
42 } | 48 } |
43 else if (field.inputValue == "probenliste" && cbox) { | 49 else if (field.inputValue === 'probenliste' && cbox) { |
44 var sname = 'Lada.store.Queries'; | 50 sname = 'Lada.store.ProbeQueries'; |
45 } | 51 } |
46 | 52 |
47 var store = Ext.StoreManager.lookup(sname); | 53 var store = Ext.StoreManager.lookup(sname); |
48 if (!store) { | 54 if (!store) { |
49 store = Ext.create(sname); | 55 store = Ext.create(sname); |