comparison app/controller/ProbenPlanungSwitcher.js @ 750:561ade69980e

reset combobox when the store was switched
author Dustin Demuth <dustin@intevation.de>
date Tue, 28 Apr 2015 11:53:39 +0200
parents 78e73be45aaa
children 704bb359c0fe
comparison
equal deleted inserted replaced
749:78e73be45aaa 750:561ade69980e
42 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'); 43 var resultGrid = field.up('panel[name=main]').down('filterresultgrid');
44 44
45 var sname = 'Lada.store.ProbeQueries'; 45 var sname = 'Lada.store.ProbeQueries';
46 if (field.inputValue === 'probenplanung' && cbox) { 46 if (field.inputValue === 'probenplanung' && cbox) {
47 sname = 'Lada.store.MessprogrammQueries'; // TODO change store! 47 sname = 'Lada.store.MessprogrammQueries';
48 } 48 }
49 else if (field.inputValue === 'probenliste' && cbox) { 49 else if (field.inputValue === 'probenliste' && cbox) {
50 sname = 'Lada.store.ProbeQueries'; 50 sname = 'Lada.store.ProbeQueries';
51 } 51 }
52 52
54 if (!store) { 54 if (!store) {
55 store = Ext.create(sname); 55 store = Ext.create(sname);
56 } 56 }
57 if (store) { 57 if (store) {
58 store.load(); 58 store.load();
59 cbox.reset();
59 cbox.bindStore(store); 60 cbox.bindStore(store);
60 } 61 }
61 } 62 }
62 }); 63 });

http://lada.wald.intevation.org