Mercurial > lada > lada-client
comparison app/controller/form/Messprogramm.js @ 798:ff4330d4aba1
Filter Messtellen in Probeform and Messprogramm
author | Dustin Demuth <dustin@intevation.de> |
---|---|
date | Thu, 21 May 2015 15:23:49 +0200 |
parents | b8fd43021c29 |
children | c135201940ee |
comparison
equal
deleted
inserted
replaced
797:b8fd43021c29 | 798:ff4330d4aba1 |
---|---|
31 click: this.editOrtWindow | 31 click: this.editOrtWindow |
32 }, | 32 }, |
33 'messprogrammform': { | 33 'messprogrammform': { |
34 dirtychange: this.dirtyForm | 34 dirtychange: this.dirtyForm |
35 }, | 35 }, |
36 'messprogrammform messstelle combobox':{ | |
37 expand: this.filter, | |
38 keydown: this.filter | |
39 }, | |
36 'messprogrammform location combobox': { | 40 'messprogrammform location combobox': { |
37 select: this.syncOrtWindow | 41 select: this.syncOrtWindow |
38 }, | 42 }, |
39 'messprogrammform datetime textfield': { | 43 'messprogrammform datetime textfield': { |
40 blur: this.checkDatePeriod | 44 blur: this.checkDatePeriod |
53 'messprogrammform panel[xtype="deskriptor] combobox': { | 57 'messprogrammform panel[xtype="deskriptor] combobox': { |
54 select: this.deskriptorSelect | 58 select: this.deskriptorSelect |
55 } | 59 } |
56 }); | 60 }); |
57 }, | 61 }, |
62 | |
63 /** | |
64 * The Messtellen Store contains ALL Messtellen. | |
65 * Filter the store in this combobox to reduce the choices | |
66 * to the subset which the user is allowed to use. | |
67 */ | |
68 filter: function(field) { | |
69 var fil = Ext.create('Ext.util.Filter', { | |
70 filterFn: function(item) { | |
71 if (Ext.Array.contains(Lada.mst, item.get('id'))) { | |
72 return true; | |
73 } | |
74 return false; | |
75 } | |
76 }); | |
77 field.getStore().filter(fil); | |
78 }, | |
79 | |
58 /** | 80 /** |
59 * When the Probenintervall was changed, update the Sliders | 81 * When the Probenintervall was changed, update the Sliders |
60 * and the the numberfield. | 82 * and the the numberfield. |
61 */ | 83 */ |
62 updateIntervalls: function(field, records) { | 84 updateIntervalls: function(field, records) { |