Mercurial > lada > lada-client
comparison app/view/ProbenPlanungSwitcher.js @ 751:704bb359c0fe
dynamically exchange the store of the resultfiltergrid
author | Dustin Demuth <dustin@intevation.de> |
---|---|
date | Tue, 28 Apr 2015 16:03:59 +0200 |
parents | 3ffecbce17d6 |
children | d572ee3271ac |
comparison
equal
deleted
inserted
replaced
750:561ade69980e | 751:704bb359c0fe |
---|---|
8 | 8 |
9 /** | 9 /** |
10 * This is a Widget for a ProbenPlanungSwitcher | 10 * This is a Widget for a ProbenPlanungSwitcher |
11 */ | 11 */ |
12 Ext.define('Lada.view.ProbenPlanungSwitcher', { | 12 Ext.define('Lada.view.ProbenPlanungSwitcher', { |
13 extend: 'Ext.form.RadioGroup', | 13 extend: 'Ext.form.FieldSet', |
14 alias: 'widget.probenplanungswitcher', | 14 alias: 'widget.probenplanungswitcher', |
15 | 15 |
16 mixins: { | 16 mixins: { |
17 observable: 'Ext.util.Observable' | 17 observable: 'Ext.util.Observable' |
18 }, | 18 }, |
19 /** | 19 /** |
20 * Initialise the Widget. | 20 * Initialise the Widget. |
21 * When the Checkbox is checked, it fires a 'check' Event | 21 * When the Checkbox is checked, it fires a 'check' Event |
22 */ | 22 */ |
23 initComponent: function() { | 23 initComponent: function() { |
24 var i18n = Lada.getApplication().bundle; | 24 var i18n = Lada.getApplication().bundle; |
25 this.items= [{ | 25 this.title = i18n.getMsg('modus'); |
26 xtype: 'panel', | 26 this.items= [{ |
27 border: false, | 27 xtype: 'radiogroup', |
28 columns: 1, | |
29 width: '100%', | |
28 items: [{ | 30 items: [{ |
29 xtype: 'radiogroup', | 31 xtype: 'radiofield', |
30 fieldLabel: i18n.getMsg('modus'), | 32 name: 'ppswitch', |
31 //labelWidth: '30 px', | 33 boxLabel: i18n.getMsg('probelist'), |
32 columns: 'auto', | 34 inputValue: 'ProbenList', //this determines the store |
33 vertical: false, | 35 // which will be loaded, |
34 width: '100%', | 36 checked: true, |
35 items: [{ | 37 handler: function(field, state){ |
36 xtype: 'radiofield', | 38 if (state === true) { |
37 name: 'ppswitch', | 39 this.fireEvent('check', field); |
38 boxLabel: i18n.getMsg('probelist'), | |
39 boxLabelAlign: 'before', | |
40 inputValue: 'probenliste', | |
41 checked: true, | |
42 handler: function(field, state){ | |
43 if (state === true) { | |
44 this.fireEvent('check', field); | |
45 } | |
46 } | 40 } |
47 },{ | 41 } |
48 xtype: 'radiofield', | 42 },{ |
49 name: 'ppswitch', | 43 xtype: 'radiofield', |
50 boxLabel: i18n.getMsg('probeplanning'), | 44 name: 'ppswitch', |
51 boxLabelAlign: 'before', | 45 boxLabel: i18n.getMsg('probeplanning'), |
52 inputValue: 'probenplanung', | 46 inputValue: 'MessprogrammeList', //name of a store |
53 handler: function(field, state){ | 47 handler: function(field, state){ |
54 if (state === true) { | 48 if (state === true) { |
55 this.fireEvent('check', field); | 49 this.fireEvent('check', field); |
56 } | |
57 } | 50 } |
58 }] | 51 } |
59 }] | 52 }] |
60 }]; | 53 }]; |
61 this.callParent(arguments); | 54 this.callParent(arguments); |
62 } | 55 } |
63 }); | 56 }); |