Mercurial > lada > lada-client
annotate app/view/ModeSwitcher.js @ 1355:d8db43ac9c12
fix: ortserstellung did load verwaltungsstore with only one entry
author | Maximilian Krambach <mkrambach@intevation.de> |
---|---|
date | Tue, 07 Feb 2017 16:50:16 +0100 |
parents | 2a5d42045c63 |
children |
rev | line source |
---|---|
747
3ffecbce17d6
Radio-Buttons to switch between query-modes: Probenliste und Probenplanung. Filter-Combobox store wird automatisch gewechselt. ToDo: Query-Store für Probenplanung
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz |
3ffecbce17d6
Radio-Buttons to switch between query-modes: Probenliste und Probenplanung. Filter-Combobox store wird automatisch gewechselt. ToDo: Query-Store für Probenplanung
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
2 * Software engineering by Intevation GmbH |
3ffecbce17d6
Radio-Buttons to switch between query-modes: Probenliste und Probenplanung. Filter-Combobox store wird automatisch gewechselt. ToDo: Query-Store für Probenplanung
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
3 * |
3ffecbce17d6
Radio-Buttons to switch between query-modes: Probenliste und Probenplanung. Filter-Combobox store wird automatisch gewechselt. ToDo: Query-Store für Probenplanung
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
4 * This file is Free Software under the GNU GPL (v>=3) |
3ffecbce17d6
Radio-Buttons to switch between query-modes: Probenliste und Probenplanung. Filter-Combobox store wird automatisch gewechselt. ToDo: Query-Store für Probenplanung
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
5 * and comes with ABSOLUTELY NO WARRANTY! Check out |
3ffecbce17d6
Radio-Buttons to switch between query-modes: Probenliste und Probenplanung. Filter-Combobox store wird automatisch gewechselt. ToDo: Query-Store für Probenplanung
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
6 * the documentation coming with IMIS-Labordaten-Application for details. |
3ffecbce17d6
Radio-Buttons to switch between query-modes: Probenliste und Probenplanung. Filter-Combobox store wird automatisch gewechselt. ToDo: Query-Store für Probenplanung
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
7 */ |
3ffecbce17d6
Radio-Buttons to switch between query-modes: Probenliste und Probenplanung. Filter-Combobox store wird automatisch gewechselt. ToDo: Query-Store für Probenplanung
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
8 |
3ffecbce17d6
Radio-Buttons to switch between query-modes: Probenliste und Probenplanung. Filter-Combobox store wird automatisch gewechselt. ToDo: Query-Store für Probenplanung
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
9 /** |
978
7f5219b8e1bf
Renamed the ProbePlanungSwitcher to a more generic ModeSwitcher and refactored the application
Dustin Demuth <dustin@intevation.de>
parents:
975
diff
changeset
|
10 * This is a Widget for a ModeSwitcher |
747
3ffecbce17d6
Radio-Buttons to switch between query-modes: Probenliste und Probenplanung. Filter-Combobox store wird automatisch gewechselt. ToDo: Query-Store für Probenplanung
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
11 */ |
978
7f5219b8e1bf
Renamed the ProbePlanungSwitcher to a more generic ModeSwitcher and refactored the application
Dustin Demuth <dustin@intevation.de>
parents:
975
diff
changeset
|
12 Ext.define('Lada.view.ModeSwitcher', { |
751
704bb359c0fe
dynamically exchange the store of the resultfiltergrid
Dustin Demuth <dustin@intevation.de>
parents:
747
diff
changeset
|
13 extend: 'Ext.form.FieldSet', |
978
7f5219b8e1bf
Renamed the ProbePlanungSwitcher to a more generic ModeSwitcher and refactored the application
Dustin Demuth <dustin@intevation.de>
parents:
975
diff
changeset
|
14 alias: 'widget.modeswitcher', |
747
3ffecbce17d6
Radio-Buttons to switch between query-modes: Probenliste und Probenplanung. Filter-Combobox store wird automatisch gewechselt. ToDo: Query-Store für Probenplanung
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
15 |
3ffecbce17d6
Radio-Buttons to switch between query-modes: Probenliste und Probenplanung. Filter-Combobox store wird automatisch gewechselt. ToDo: Query-Store für Probenplanung
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
16 mixins: { |
3ffecbce17d6
Radio-Buttons to switch between query-modes: Probenliste und Probenplanung. Filter-Combobox store wird automatisch gewechselt. ToDo: Query-Store für Probenplanung
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
17 observable: 'Ext.util.Observable' |
3ffecbce17d6
Radio-Buttons to switch between query-modes: Probenliste und Probenplanung. Filter-Combobox store wird automatisch gewechselt. ToDo: Query-Store für Probenplanung
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
18 }, |
3ffecbce17d6
Radio-Buttons to switch between query-modes: Probenliste und Probenplanung. Filter-Combobox store wird automatisch gewechselt. ToDo: Query-Store für Probenplanung
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
19 /** |
3ffecbce17d6
Radio-Buttons to switch between query-modes: Probenliste und Probenplanung. Filter-Combobox store wird automatisch gewechselt. ToDo: Query-Store für Probenplanung
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
20 * Initialise the Widget. |
3ffecbce17d6
Radio-Buttons to switch between query-modes: Probenliste und Probenplanung. Filter-Combobox store wird automatisch gewechselt. ToDo: Query-Store für Probenplanung
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
21 * When the Checkbox is checked, it fires a 'check' Event |
3ffecbce17d6
Radio-Buttons to switch between query-modes: Probenliste und Probenplanung. Filter-Combobox store wird automatisch gewechselt. ToDo: Query-Store für Probenplanung
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
22 */ |
3ffecbce17d6
Radio-Buttons to switch between query-modes: Probenliste und Probenplanung. Filter-Combobox store wird automatisch gewechselt. ToDo: Query-Store für Probenplanung
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
23 initComponent: function() { |
751
704bb359c0fe
dynamically exchange the store of the resultfiltergrid
Dustin Demuth <dustin@intevation.de>
parents:
747
diff
changeset
|
24 var i18n = Lada.getApplication().bundle; |
704bb359c0fe
dynamically exchange the store of the resultfiltergrid
Dustin Demuth <dustin@intevation.de>
parents:
747
diff
changeset
|
25 this.title = i18n.getMsg('modus'); |
1077
2a5d42045c63
Display Messungen query mode and use the new messung list grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
978
diff
changeset
|
26 this.items = [{ |
751
704bb359c0fe
dynamically exchange the store of the resultfiltergrid
Dustin Demuth <dustin@intevation.de>
parents:
747
diff
changeset
|
27 xtype: 'radiogroup', |
704bb359c0fe
dynamically exchange the store of the resultfiltergrid
Dustin Demuth <dustin@intevation.de>
parents:
747
diff
changeset
|
28 columns: 1, |
704bb359c0fe
dynamically exchange the store of the resultfiltergrid
Dustin Demuth <dustin@intevation.de>
parents:
747
diff
changeset
|
29 width: '100%', |
747
3ffecbce17d6
Radio-Buttons to switch between query-modes: Probenliste und Probenplanung. Filter-Combobox store wird automatisch gewechselt. ToDo: Query-Store für Probenplanung
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
30 items: [{ |
751
704bb359c0fe
dynamically exchange the store of the resultfiltergrid
Dustin Demuth <dustin@intevation.de>
parents:
747
diff
changeset
|
31 xtype: 'radiofield', |
978
7f5219b8e1bf
Renamed the ProbePlanungSwitcher to a more generic ModeSwitcher and refactored the application
Dustin Demuth <dustin@intevation.de>
parents:
975
diff
changeset
|
32 name: 'modeswitch', |
975
fb99332bb48e
Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
794
diff
changeset
|
33 boxLabel: i18n.getMsg('proben'), |
fb99332bb48e
Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
794
diff
changeset
|
34 inputValue: 'proben', //this determines the store |
fb99332bb48e
Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
794
diff
changeset
|
35 // which will be loaded by the controller, |
794
bc6bc71efb78
Preselect Proben in PPS, Preselect the first entry in the Filter Combobox
Dustin Demuth <dustin@intevation.de>
parents:
792
diff
changeset
|
36 checked: true, |
1077
2a5d42045c63
Display Messungen query mode and use the new messung list grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
978
diff
changeset
|
37 handler: function(field, state) { |
751
704bb359c0fe
dynamically exchange the store of the resultfiltergrid
Dustin Demuth <dustin@intevation.de>
parents:
747
diff
changeset
|
38 if (state === true) { |
704bb359c0fe
dynamically exchange the store of the resultfiltergrid
Dustin Demuth <dustin@intevation.de>
parents:
747
diff
changeset
|
39 this.fireEvent('check', field); |
747
3ffecbce17d6
Radio-Buttons to switch between query-modes: Probenliste und Probenplanung. Filter-Combobox store wird automatisch gewechselt. ToDo: Query-Store für Probenplanung
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
40 } |
751
704bb359c0fe
dynamically exchange the store of the resultfiltergrid
Dustin Demuth <dustin@intevation.de>
parents:
747
diff
changeset
|
41 } |
1077
2a5d42045c63
Display Messungen query mode and use the new messung list grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
978
diff
changeset
|
42 }, { |
2a5d42045c63
Display Messungen query mode and use the new messung list grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
978
diff
changeset
|
43 xtype: 'radiofield', |
2a5d42045c63
Display Messungen query mode and use the new messung list grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
978
diff
changeset
|
44 name: 'modeswitch', |
2a5d42045c63
Display Messungen query mode and use the new messung list grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
978
diff
changeset
|
45 boxLabel: i18n.getMsg('messungen'), |
2a5d42045c63
Display Messungen query mode and use the new messung list grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
978
diff
changeset
|
46 inputValue: 'messungen', //this determines the store |
2a5d42045c63
Display Messungen query mode and use the new messung list grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
978
diff
changeset
|
47 // which will be loaded by the controller, |
2a5d42045c63
Display Messungen query mode and use the new messung list grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
978
diff
changeset
|
48 handler: function(field, state) { |
2a5d42045c63
Display Messungen query mode and use the new messung list grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
978
diff
changeset
|
49 if (state === true) { |
2a5d42045c63
Display Messungen query mode and use the new messung list grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
978
diff
changeset
|
50 this.fireEvent('check', field); |
2a5d42045c63
Display Messungen query mode and use the new messung list grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
978
diff
changeset
|
51 } |
2a5d42045c63
Display Messungen query mode and use the new messung list grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
978
diff
changeset
|
52 } |
2a5d42045c63
Display Messungen query mode and use the new messung list grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
978
diff
changeset
|
53 }, { |
751
704bb359c0fe
dynamically exchange the store of the resultfiltergrid
Dustin Demuth <dustin@intevation.de>
parents:
747
diff
changeset
|
54 xtype: 'radiofield', |
978
7f5219b8e1bf
Renamed the ProbePlanungSwitcher to a more generic ModeSwitcher and refactored the application
Dustin Demuth <dustin@intevation.de>
parents:
975
diff
changeset
|
55 name: 'modeswitch', |
975
fb99332bb48e
Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
794
diff
changeset
|
56 boxLabel: i18n.getMsg('messprogramme'), |
fb99332bb48e
Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
794
diff
changeset
|
57 inputValue: 'messprogramme', |
1077
2a5d42045c63
Display Messungen query mode and use the new messung list grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
978
diff
changeset
|
58 handler: function(field, state) { |
975
fb99332bb48e
Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
794
diff
changeset
|
59 if (state === true) { |
fb99332bb48e
Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
794
diff
changeset
|
60 this.fireEvent('check', field); |
fb99332bb48e
Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
794
diff
changeset
|
61 } |
fb99332bb48e
Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
794
diff
changeset
|
62 } |
1077
2a5d42045c63
Display Messungen query mode and use the new messung list grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
978
diff
changeset
|
63 }, { |
975
fb99332bb48e
Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
794
diff
changeset
|
64 xtype: 'radiofield', |
978
7f5219b8e1bf
Renamed the ProbePlanungSwitcher to a more generic ModeSwitcher and refactored the application
Dustin Demuth <dustin@intevation.de>
parents:
975
diff
changeset
|
65 name: 'modeswitch', |
975
fb99332bb48e
Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
794
diff
changeset
|
66 boxLabel: i18n.getMsg('stammdaten'), |
fb99332bb48e
Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
794
diff
changeset
|
67 inputValue: 'stammdaten', |
1077
2a5d42045c63
Display Messungen query mode and use the new messung list grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
978
diff
changeset
|
68 handler: function(field, state) { |
751
704bb359c0fe
dynamically exchange the store of the resultfiltergrid
Dustin Demuth <dustin@intevation.de>
parents:
747
diff
changeset
|
69 if (state === true) { |
704bb359c0fe
dynamically exchange the store of the resultfiltergrid
Dustin Demuth <dustin@intevation.de>
parents:
747
diff
changeset
|
70 this.fireEvent('check', field); |
747
3ffecbce17d6
Radio-Buttons to switch between query-modes: Probenliste und Probenplanung. Filter-Combobox store wird automatisch gewechselt. ToDo: Query-Store für Probenplanung
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
71 } |
751
704bb359c0fe
dynamically exchange the store of the resultfiltergrid
Dustin Demuth <dustin@intevation.de>
parents:
747
diff
changeset
|
72 } |
747
3ffecbce17d6
Radio-Buttons to switch between query-modes: Probenliste und Probenplanung. Filter-Combobox store wird automatisch gewechselt. ToDo: Query-Store für Probenplanung
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
73 }] |
751
704bb359c0fe
dynamically exchange the store of the resultfiltergrid
Dustin Demuth <dustin@intevation.de>
parents:
747
diff
changeset
|
74 }]; |
704bb359c0fe
dynamically exchange the store of the resultfiltergrid
Dustin Demuth <dustin@intevation.de>
parents:
747
diff
changeset
|
75 this.callParent(arguments); |
747
3ffecbce17d6
Radio-Buttons to switch between query-modes: Probenliste und Probenplanung. Filter-Combobox store wird automatisch gewechselt. ToDo: Query-Store für Probenplanung
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
76 } |
3ffecbce17d6
Radio-Buttons to switch between query-modes: Probenliste und Probenplanung. Filter-Combobox store wird automatisch gewechselt. ToDo: Query-Store für Probenplanung
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
77 }); |