# HG changeset patch # User Dustin Demuth # Date 1436193788 -7200 # Node ID d054732bc7a2ce129c72498165f040d1c49fc414 # Parent 6de96799746fa481576f89658295efb7f331771a Switch the Mode of the Filterresultgrid according to the selection of the radio buttons in the probenplanungswitcher diff -r 6de96799746f -r d054732bc7a2 app/controller/ProbenPlanungSwitcher.js --- a/app/controller/ProbenPlanungSwitcher.js Mon Jul 06 10:45:25 2015 +0200 +++ b/app/controller/ProbenPlanungSwitcher.js Mon Jul 06 16:43:08 2015 +0200 @@ -43,22 +43,25 @@ switchModes: function(field) { var disableButtons = true; - var cbox = field.up('probenplanungswitcher').up().down('combobox'); var resultGrid = field.up('panel[name=main]').down('filterresultgrid'); filters = field.up('panel[name=main]').down('fieldset[name=filtervariables]'); filters.removeAll(); filters.hide(); var sname = 'Lada.store.ProbeQueries'; + var gridsname = 'Lada.store.ProbenList'; if (field.inputValue === 'MessprogrammList' && cbox) { sname = 'Lada.store.MessprogrammQueries'; + gridsname = 'Lada.store.MessprogrammeList'; } else if (field.inputValue === 'ProbeList' && cbox) { sname = 'Lada.store.ProbeQueries'; + gridsname = 'Lada.store.ProbenList'; } var store = Ext.StoreManager.lookup(sname); + if (!store) { store = Ext.create(sname, { //Select first Item on Load @@ -78,5 +81,17 @@ cbox.reset(); cbox.bindStore(store); } + + var gridstore = Ext.StoreManager.lookup(gridsname); + if (!gridstore) { + gridstore = Ext.create(gridsname); + } + if (gridstore) { + gridstore.addListener('beforeload', this.loadingAnimationOn, resultGrid); + gridstore.addListener('load', this.loadingAnimationOff, resultGrid); + resultGrid.setStore(gridstore); + resultGrid.show(); + } + } }); diff -r 6de96799746f -r d054732bc7a2 app/view/grid/FilterResult.js --- a/app/view/grid/FilterResult.js Mon Jul 06 10:45:25 2015 +0200 +++ b/app/view/grid/FilterResult.js Mon Jul 06 16:43:08 2015 +0200 @@ -23,13 +23,15 @@ }, initComponent: function() { + var i18n = Lada.getApplication().bundle; + this.dockedItems = [{ xtype: 'toolbar', dock: 'top', items: [{ xtype: 'tbtext', id: 'tbtitle', - text: '', + text: i18n.getMsg('probelist') }, '->', { @@ -41,7 +43,7 @@ text: 'Messprogramm erstellen', icon: 'resources/img/list-add.png', action: 'addMessprogramm', - disabled: false + disabled: true }, '-', {