comparison app/view/ModeSwitcher.js @ 978:7f5219b8e1bf stammdatengrids

Renamed the ProbePlanungSwitcher to a more generic ModeSwitcher and refactored the application
author Dustin Demuth <dustin@intevation.de>
date Thu, 03 Dec 2015 09:38:43 +0100
parents app/view/ProbenPlanungSwitcher.js@fb99332bb48e
children 2a5d42045c63
comparison
equal deleted inserted replaced
977:56470a075e6e 978:7f5219b8e1bf
1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
2 * Software engineering by Intevation GmbH
3 *
4 * This file is Free Software under the GNU GPL (v>=3)
5 * and comes with ABSOLUTELY NO WARRANTY! Check out
6 * the documentation coming with IMIS-Labordaten-Application for details.
7 */
8
9 /**
10 * This is a Widget for a ModeSwitcher
11 */
12 Ext.define('Lada.view.ModeSwitcher', {
13 extend: 'Ext.form.FieldSet',
14 alias: 'widget.modeswitcher',
15
16 mixins: {
17 observable: 'Ext.util.Observable'
18 },
19 /**
20 * Initialise the Widget.
21 * When the Checkbox is checked, it fires a 'check' Event
22 */
23 initComponent: function() {
24 var i18n = Lada.getApplication().bundle;
25 this.title = i18n.getMsg('modus');
26 this.items= [{
27 xtype: 'radiogroup',
28 columns: 1,
29 width: '100%',
30 items: [{
31 xtype: 'radiofield',
32 name: 'modeswitch',
33 boxLabel: i18n.getMsg('proben'),
34 inputValue: 'proben', //this determines the store
35 // which will be loaded by the controller,
36 checked: true,
37 handler: function(field, state){
38 if (state === true) {
39 this.fireEvent('check', field);
40 }
41 }
42 },{
43 xtype: 'radiofield',
44 name: 'modeswitch',
45 boxLabel: i18n.getMsg('messprogramme'),
46 inputValue: 'messprogramme',
47 handler: function(field, state){
48 if (state === true) {
49 this.fireEvent('check', field);
50 }
51 }
52 },{
53 xtype: 'radiofield',
54 name: 'modeswitch',
55 boxLabel: i18n.getMsg('stammdaten'),
56 inputValue: 'stammdaten',
57 handler: function(field, state){
58 if (state === true) {
59 this.fireEvent('check', field);
60 }
61 }
62 }]
63 }];
64 this.callParent(arguments);
65 }
66 });

http://lada.wald.intevation.org