comparison app/view/widget/DayOfYear.js @ 1211:85b018980347

Let each instance of a DayOfYear-widget have its own store. This prevents filtering of comboboxes affecting each other.
author Tom Gottfried <tom@intevation.de>
date Tue, 11 Oct 2016 17:40:37 +0200
parents 05c8bd380fd5
children 3e6756b0fc97
comparison
equal deleted inserted replaced
1210:a24de34d6423 1211:85b018980347
4 * This file is Free Software under the GNU GPL (v>=3) 4 * This file is Free Software under the GNU GPL (v>=3)
5 * and comes with ABSOLUTELY NO WARRANTY! Check out 5 * and comes with ABSOLUTELY NO WARRANTY! Check out
6 * the documentation coming with IMIS-Labordaten-Application for details. 6 * the documentation coming with IMIS-Labordaten-Application for details.
7 */ 7 */
8 8
9 var monthsStore = Ext.create('Ext.data.Store', {
10 fields: ['id', 'name'],
11 data: [{
12 'id': 0,
13 'name': 'Januar'
14 }, {
15 'id': 1,
16 'name': 'Februar'
17 }, {
18 'id': 2,
19 'name': 'März'
20 }, {
21 'id': 3,
22 'name': 'April'
23 }, {
24 'id': 4,
25 'name': 'Mai'
26 }, {
27 'id': 5,
28 'name': 'Juni'
29 }, {
30 'id': 6,
31 'name': 'Juli'
32 }, {
33 'id': 7,
34 'name': 'August'
35 }, {
36 'id': 8,
37 'name': 'September'
38 }, {
39 'id': 9,
40 'name': 'Oktober'
41 }, {
42 'id': 10,
43 'name': 'November'
44 }, {
45 'id': 11,
46 'name': 'Dezember'
47 }]
48 });
49
50 /** 9 /**
51 * Panel to select month and day of month, 10 * Panel to select month and day of month,
52 * that can be serialized to day of year 11 * that can be serialized to day of year
53 */ 12 */
54 Ext.define('Lada.view.widget.DayOfYear', { 13 Ext.define('Lada.view.widget.DayOfYear', {
61 defaultMargins: '3' 20 defaultMargins: '3'
62 }, 21 },
63 22
64 initComponent: function() { 23 initComponent: function() {
65 var me = this; 24 var me = this;
25
26 var monthsStore = Ext.create('Ext.data.Store', {
27 fields: ['id', 'name'],
28 data: [{
29 'id': 0,
30 'name': 'Januar'
31 }, {
32 'id': 1,
33 'name': 'Februar'
34 }, {
35 'id': 2,
36 'name': 'März'
37 }, {
38 'id': 3,
39 'name': 'April'
40 }, {
41 'id': 4,
42 'name': 'Mai'
43 }, {
44 'id': 5,
45 'name': 'Juni'
46 }, {
47 'id': 6,
48 'name': 'Juli'
49 }, {
50 'id': 7,
51 'name': 'August'
52 }, {
53 'id': 8,
54 'name': 'September'
55 }, {
56 'id': 9,
57 'name': 'Oktober'
58 }, {
59 'id': 10,
60 'name': 'November'
61 }, {
62 'id': 11,
63 'name': 'Dezember'
64 }]
65 });
66 66
67 /* 67 /*
68 * Create hidden field to hold the day of year value 68 * Create hidden field to hold the day of year value
69 * for/of the record of the form. 69 * for/of the record of the form.
70 */ 70 */

http://lada.wald.intevation.org