annotate app/view/messwerte/List.js @ 199:30ba9a98d627

Added forms to create a Messstatus
author Torsten Irländer <torsten.irlaender@intevation.de>
date Mon, 08 Jul 2013 16:14:58 +0200
parents ceb04286152a
children f3a2f985f451
rev   line source
183
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
1 Ext.define('Lada.view.messwerte.List' ,{
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
2 extend: 'Ext.grid.Panel',
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
3 alias: 'widget.messwertelist',
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
4 store: 'Messwerte',
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
5 viewConfig: {
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
6 maxHeight: 350,
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
7 emptyText: 'Keine Messwerte gefunden.',
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
8 // minHeight and deferEmptyText are needed to be able to show the
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
9 // emptyText message.
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
10 minHeight: 35,
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
11 deferEmptyText: false
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
12 },
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
13 probeId: null,
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
14 initComponent: function() {
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
15 this.dockedItems = [
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
16 {
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
17 xtype: 'toolbar',
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
18 dock: 'top',
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
19 items: [
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
20 {
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
21 text: 'Hinzufügen',
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
22 icon: 'gfx/plus.gif',
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
23 action: 'add',
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
24 probeId: this.probeId
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
25 },
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
26 {
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
27 text: 'Löschen',
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
28 icon: 'gfx/minus.gif',
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
29 action: 'delete'
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
30 }
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
31 ]
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
32 }
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
33 ];
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
34 this.columns = [
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
35 {header: 'Messwert', dataIndex: 'messwert'},
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
36 {header: 'Messfehler', dataIndex: 'messfehler'},
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
37 {
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
38 header: 'Messgröße',
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
39 dataIndex: 'messgroesseId',
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
40 renderer: function(value) {
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
41 var store = Ext.getStore('Messgroessen');
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
42 return store.findRecord('messgroesseId', value).get('messgro0esse');
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
43 }
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
44 },
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
45 {
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
46 header: 'Messeinheit',
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
47 dataIndex: 'mehId',
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
48 renderer: function(value) {
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
49 var store = Ext.getStore('Messeinheit');
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
50 return store.findRecord('mehId', value).get('einheit');
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
51 }
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
52 },
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
53 {
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
54 header: 'Grenzwertüberschreitung',
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
55 dataIndex: 'grenzwertueberschreitung',
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
56 flex: 1,
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
57 renderer: function(value) {
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
58 if (value === true) {
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
59 return "Ja";
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
60 } else {
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
61 return "Nein";
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
62 }
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
63 }
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
64 }
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
65 ];
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
66 this.callParent(arguments);
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
67 }
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
68 });
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
69

http://lada.wald.intevation.org