comparison app/controller/form/Probe.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 dd6925ef6028
children e25fcc9269df
comparison
equal deleted inserted replaced
797:b8fd43021c29 798:ff4330d4aba1
25 click: this.discard 25 click: this.discard
26 }, 26 },
27 'probeform': { 27 'probeform': {
28 dirtychange: this.dirtyForm 28 dirtychange: this.dirtyForm
29 }, 29 },
30 'probeform messstelle combobox':{
31 expand: this.filter,
32 keydown: this.filter
33 },
30 'probeform [xtype="datetime"] field': { 34 'probeform [xtype="datetime"] field': {
31 blur: this.checkDate 35 blur: this.checkDate
32 }, 36 },
33 'probeform panel[xtype="deskriptor] combobox': { 37 'probeform panel[xtype="deskriptor] combobox': {
34 select: this.deskriptorSelect 38 select: this.deskriptorSelect
35 } 39 }
36 }); 40 });
41 },
42
43 /**
44 * The Messtellen Store contains ALL Messtellen.
45 * Filter the store in this combobox to reduce the choices
46 * to the subset which the user is allowed to use.
47 */
48 filter: function(field) {
49 var fil = Ext.create('Ext.util.Filter', {
50 filterFn: function(item) {
51 if (Ext.Array.contains(Lada.mst, item.get('id'))) {
52 return true;
53 }
54 return false;
55 }
56 });
57 field.getStore().filter(fil);
37 }, 58 },
38 59
39 /** 60 /**
40 * The save function saves the content of the Location form. 61 * The save function saves the content of the Location form.
41 * On success it will reload the Store, 62 * On success it will reload the Store,

http://lada.wald.intevation.org