annotate app/view/messungen/List.js @ 220:8e41a5a6cb7f

Fixed variable name
author Torsten Irländer <torsten.irlaender@intevation.de>
date Mon, 15 Jul 2013 17:51:28 +0200
parents cfa0cc437781
children eccf58d3b106
rev   line source
103
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents:
diff changeset
1 Ext.define('Lada.view.messungen.List' ,{
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents:
diff changeset
2 extend: 'Ext.grid.Panel',
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents:
diff changeset
3 alias: 'widget.messungenlist',
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents:
diff changeset
4 store: 'Messungen',
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents:
diff changeset
5 viewConfig: {
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents:
diff changeset
6 maxHeight: 350,
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents:
diff changeset
7 emptyText: 'Keine Messungen gefunden.',
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents:
diff changeset
8 // minHeight and deferEmptyText are needed to be able to show the
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents:
diff changeset
9 // emptyText message.
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents:
diff changeset
10 minHeight: 35,
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents:
diff changeset
11 deferEmptyText: false
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents:
diff changeset
12 },
172
cfa0cc437781 Implemented opening a new Messungen form when clicking and the "Add Button" on
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 171
diff changeset
13 probeId: null,
103
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents:
diff changeset
14 initComponent: function() {
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents:
diff changeset
15 this.dockedItems = [
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents:
diff changeset
16 {
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents:
diff changeset
17 xtype: 'toolbar',
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents:
diff changeset
18 dock: 'top',
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents:
diff changeset
19 items: [
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents:
diff changeset
20 {
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents:
diff changeset
21 text: 'Hinzufügen',
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents:
diff changeset
22 icon: 'gfx/plus.gif',
172
cfa0cc437781 Implemented opening a new Messungen form when clicking and the "Add Button" on
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 171
diff changeset
23 action: 'add',
cfa0cc437781 Implemented opening a new Messungen form when clicking and the "Add Button" on
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 171
diff changeset
24 probeId: this.probeId
103
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents:
diff changeset
25 },
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents:
diff changeset
26 {
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents:
diff changeset
27 text: 'Löschen',
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents:
diff changeset
28 icon: 'gfx/minus.gif',
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents:
diff changeset
29 action: 'delete'
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents:
diff changeset
30 }
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents:
diff changeset
31 ]
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents:
diff changeset
32 }
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents:
diff changeset
33 ];
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents:
diff changeset
34 this.columns = [
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents:
diff changeset
35 {header: 'Mess.ID', dataIndex: "messungsId", width: 50},
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents:
diff changeset
36 {header: 'NPR-Nr.', dataIndex: "nebenprobenNr", width: 50},
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents:
diff changeset
37 {header: 'MMT', dataIndex: "mmtId", width: 50},
171
c5422819d7b9 Show messzeitpunkt in messung listing. Convert timestamp to date.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 170
diff changeset
38 {header: 'Messzeit', dataIndex: "messzeitpunkt"},
170
738d657d8b6b Added Status into Messungen listing.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 169
diff changeset
39 {
738d657d8b6b Added Status into Messungen listing.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 169
diff changeset
40 header: 'Status',
738d657d8b6b Added Status into Messungen listing.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 169
diff changeset
41 dataIndex: 'id',
738d657d8b6b Added Status into Messungen listing.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 169
diff changeset
42 renderer: function(value) {
738d657d8b6b Added Status into Messungen listing.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 169
diff changeset
43 var sstore = Ext.getStore('Status');
738d657d8b6b Added Status into Messungen listing.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 169
diff changeset
44 sstore.load({
738d657d8b6b Added Status into Messungen listing.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 169
diff changeset
45 params: {
738d657d8b6b Added Status into Messungen listing.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 169
diff changeset
46 probeId: value.probeId,
738d657d8b6b Added Status into Messungen listing.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 169
diff changeset
47 messungsId: value.messungsId
738d657d8b6b Added Status into Messungen listing.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 169
diff changeset
48 }
738d657d8b6b Added Status into Messungen listing.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 169
diff changeset
49 });
738d657d8b6b Added Status into Messungen listing.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 169
diff changeset
50 if (sstore.getTotalCount() === 0) {
738d657d8b6b Added Status into Messungen listing.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 169
diff changeset
51 return "unbekannt";
738d657d8b6b Added Status into Messungen listing.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 169
diff changeset
52 } else {
738d657d8b6b Added Status into Messungen listing.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 169
diff changeset
53 return sstore.last().get('status');
738d657d8b6b Added Status into Messungen listing.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 169
diff changeset
54 }
738d657d8b6b Added Status into Messungen listing.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 169
diff changeset
55 }
738d657d8b6b Added Status into Messungen listing.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 169
diff changeset
56 },
103
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents:
diff changeset
57 {header: 'OK-Flag', dataIndex: "fertig"},
164
767300b2c70f Added custom renderer for "Anzahl Kommentare" column count the number of
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 103
diff changeset
58 {
767300b2c70f Added custom renderer for "Anzahl Kommentare" column count the number of
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 103
diff changeset
59 header: 'Anzahl Nuklide',
166
62a356dc2517 Fixed getting Messwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 165
diff changeset
60 dataIndex: 'id',
164
767300b2c70f Added custom renderer for "Anzahl Kommentare" column count the number of
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 103
diff changeset
61 renderer: function(value) {
169
52d105d4e93f Load Messwerte instead of Messungen
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 166
diff changeset
62 var mstore = Ext.getStore('Messwerte');
165
202d89d8dd16 Show "Anzahl der Nuklide"
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 164
diff changeset
63 mstore.load({
202d89d8dd16 Show "Anzahl der Nuklide"
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 164
diff changeset
64 params: {
202d89d8dd16 Show "Anzahl der Nuklide"
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 164
diff changeset
65 probeId: value.probeId,
202d89d8dd16 Show "Anzahl der Nuklide"
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 164
diff changeset
66 messungsId: value.messungsId
202d89d8dd16 Show "Anzahl der Nuklide"
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 164
diff changeset
67 }
202d89d8dd16 Show "Anzahl der Nuklide"
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 164
diff changeset
68 });
202d89d8dd16 Show "Anzahl der Nuklide"
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 164
diff changeset
69 return mstore.getTotalCount();
164
767300b2c70f Added custom renderer for "Anzahl Kommentare" column count the number of
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 103
diff changeset
70 }
767300b2c70f Added custom renderer for "Anzahl Kommentare" column count the number of
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 103
diff changeset
71 },
767300b2c70f Added custom renderer for "Anzahl Kommentare" column count the number of
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 103
diff changeset
72 {
767300b2c70f Added custom renderer for "Anzahl Kommentare" column count the number of
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 103
diff changeset
73 header: 'Anzahl Kommentare',
767300b2c70f Added custom renderer for "Anzahl Kommentare" column count the number of
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 103
diff changeset
74 flex: 1,
767300b2c70f Added custom renderer for "Anzahl Kommentare" column count the number of
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 103
diff changeset
75 dataIndex: 'id',
767300b2c70f Added custom renderer for "Anzahl Kommentare" column count the number of
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 103
diff changeset
76 renderer: function(value) {
767300b2c70f Added custom renderer for "Anzahl Kommentare" column count the number of
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 103
diff changeset
77 var kstore = Ext.getStore('MKommentare');
767300b2c70f Added custom renderer for "Anzahl Kommentare" column count the number of
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 103
diff changeset
78 kstore.load({
767300b2c70f Added custom renderer for "Anzahl Kommentare" column count the number of
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 103
diff changeset
79 params: {
767300b2c70f Added custom renderer for "Anzahl Kommentare" column count the number of
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 103
diff changeset
80 probeId: value.probeId,
767300b2c70f Added custom renderer for "Anzahl Kommentare" column count the number of
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 103
diff changeset
81 messungsId: value.messungsId
767300b2c70f Added custom renderer for "Anzahl Kommentare" column count the number of
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 103
diff changeset
82 }
767300b2c70f Added custom renderer for "Anzahl Kommentare" column count the number of
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 103
diff changeset
83 });
767300b2c70f Added custom renderer for "Anzahl Kommentare" column count the number of
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 103
diff changeset
84 return kstore.getTotalCount();
767300b2c70f Added custom renderer for "Anzahl Kommentare" column count the number of
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 103
diff changeset
85 }
767300b2c70f Added custom renderer for "Anzahl Kommentare" column count the number of
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 103
diff changeset
86 }
103
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents:
diff changeset
87 ];
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents:
diff changeset
88 this.callParent(arguments);
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents:
diff changeset
89 }
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents:
diff changeset
90 });
3552b0ee4526 Added Messungenlist to the Proben eddit view.
Torsten Irländer <torsten@irlaender.de>
parents:
diff changeset
91

http://lada.wald.intevation.org