Mercurial > lada > lada-client
comparison app/view/ProbenPlanungSwitcher.js @ 747:3ffecbce17d6
Radio-Buttons to switch between query-modes: Probenliste und Probenplanung. Filter-Combobox store wird automatisch gewechselt. ToDo: Query-Store für Probenplanung
author | Dustin Demuth <dustin@intevation.de> |
---|---|
date | Fri, 24 Apr 2015 15:47:05 +0200 |
parents | |
children | 704bb359c0fe |
comparison
equal
deleted
inserted
replaced
746:f99f23ffeb73 | 747:3ffecbce17d6 |
---|---|
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 ProbenPlanungSwitcher | |
11 */ | |
12 Ext.define('Lada.view.ProbenPlanungSwitcher', { | |
13 extend: 'Ext.form.RadioGroup', | |
14 alias: 'widget.probenplanungswitcher', | |
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.items= [{ | |
26 xtype: 'panel', | |
27 border: false, | |
28 items: [{ | |
29 xtype: 'radiogroup', | |
30 fieldLabel: i18n.getMsg('modus'), | |
31 //labelWidth: '30 px', | |
32 columns: 'auto', | |
33 vertical: false, | |
34 width: '100%', | |
35 items: [{ | |
36 xtype: 'radiofield', | |
37 name: 'ppswitch', | |
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 } | |
47 },{ | |
48 xtype: 'radiofield', | |
49 name: 'ppswitch', | |
50 boxLabel: i18n.getMsg('probeplanning'), | |
51 boxLabelAlign: 'before', | |
52 inputValue: 'probenplanung', | |
53 handler: function(field, state){ | |
54 if (state === true) { | |
55 this.fireEvent('check', field); | |
56 } | |
57 } | |
58 }] | |
59 }] | |
60 }]; | |
61 this.callParent(arguments); | |
62 } | |
63 }); |