annotate app/view/messwerte/List.js @ 424:9c44ce52a33c

Fix rendering of the orte list. Some fields was not shown because of wrong loading of ortedetails
author Torsten Irländer <torsten.irlaender@intevation.de>
date Fri, 08 Nov 2013 09:58:54 +0100
parents d1bb925bb5f5
children 2f4270ff8206
rev   line source
345
c3c64920b740 Added documentation
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 210
diff changeset
1 /*
c3c64920b740 Added documentation
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 210
diff changeset
2 * Grid to list Messwerte
c3c64920b740 Added documentation
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 210
diff changeset
3 */
183
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
4 Ext.define('Lada.view.messwerte.List' ,{
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
5 extend: 'Ext.grid.Panel',
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
6 alias: 'widget.messwertelist',
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
7 store: 'Messwerte',
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
8 viewConfig: {
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
9 maxHeight: 350,
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
10 emptyText: 'Keine Messwerte gefunden.',
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
11 // 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
12 // emptyText message.
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
13 minHeight: 35,
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
14 deferEmptyText: false
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
15 },
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
16 probeId: null,
210
f3a2f985f451 Set parentId to messwert for add button
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 183
diff changeset
17 parentId: null,
183
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
18 initComponent: function() {
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
19 this.dockedItems = [
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 xtype: 'toolbar',
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
22 dock: 'top',
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
23 items: [
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
24 {
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
25 text: 'Hinzufügen',
391
d1bb925bb5f5 Use the new icons in list views and status bar.
Raimund Renkert <rrenkert@intevation.de>
parents: 345
diff changeset
26 icon: 'gfx/list-add.png',
183
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
27 action: 'add',
210
f3a2f985f451 Set parentId to messwert for add button
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 183
diff changeset
28 probeId: this.probeId,
f3a2f985f451 Set parentId to messwert for add button
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 183
diff changeset
29 parentId: this.parentId
183
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 text: 'Löschen',
391
d1bb925bb5f5 Use the new icons in list views and status bar.
Raimund Renkert <rrenkert@intevation.de>
parents: 345
diff changeset
33 icon: 'gfx/list-remove.png',
183
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
34 action: 'delete'
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
35 }
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
36 ]
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 ];
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
39 this.columns = [
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
40 {header: 'Messwert', dataIndex: 'messwert'},
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
41 {header: 'Messfehler', dataIndex: 'messfehler'},
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
42 {
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
43 header: 'Messgröße',
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
44 dataIndex: 'messgroesseId',
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
45 renderer: function(value) {
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
46 var store = Ext.getStore('Messgroessen');
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
47 return store.findRecord('messgroesseId', value).get('messgro0esse');
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
48 }
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
49 },
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
50 {
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
51 header: 'Messeinheit',
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
52 dataIndex: 'mehId',
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
53 renderer: function(value) {
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
54 var store = Ext.getStore('Messeinheit');
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
55 return store.findRecord('mehId', value).get('einheit');
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
56 }
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
57 },
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
58 {
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
59 header: 'Grenzwertüberschreitung',
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
60 dataIndex: 'grenzwertueberschreitung',
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
61 flex: 1,
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
62 renderer: function(value) {
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
63 if (value === true) {
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
64 return "Ja";
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
65 } else {
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
66 return "Nein";
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 }
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
70 ];
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
71 this.callParent(arguments);
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
72 }
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
73 });
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
74

http://lada.wald.intevation.org