annotate app/view/messwerte/List.js @ 471:dd2b468dc1c2

Added hints on installation
author Torsten Irländer <torsten.irlaender@intevation.de>
date Tue, 14 Jan 2014 15:45:28 +0100
parents a122424f2f0f
children debfcc7713e3
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 = [
419
2f4270ff8206 Issue70: Indikator eingefügt um anzuzeigen das der Messert unterhalb der
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 391
diff changeset
40 {
437
3ed0ab0f5ee5 Issue70: Neue Spalte zum Anzeigen ob der Messwert < als die NWG ist. Wenn MW <
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 419
diff changeset
41 header: '&lt;NWG',
442
bba7fbcf2f70 Simplified logic in Messwert listing. No extra logic anymore to check if a "<"
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 437
diff changeset
42 dataIndex: 'messwertNwg'
437
3ed0ab0f5ee5 Issue70: Neue Spalte zum Anzeigen ob der Messwert < als die NWG ist. Wenn MW <
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 419
diff changeset
43 },
3ed0ab0f5ee5 Issue70: Neue Spalte zum Anzeigen ob der Messwert < als die NWG ist. Wenn MW <
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 419
diff changeset
44 {
419
2f4270ff8206 Issue70: Indikator eingefügt um anzuzeigen das der Messert unterhalb der
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 391
diff changeset
45 header: 'Messwert',
442
bba7fbcf2f70 Simplified logic in Messwert listing. No extra logic anymore to check if a "<"
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 437
diff changeset
46 dataIndex: 'messwert'
419
2f4270ff8206 Issue70: Indikator eingefügt um anzuzeigen das der Messert unterhalb der
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 391
diff changeset
47 },
183
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
48 {header: 'Messfehler', dataIndex: 'messfehler'},
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 header: 'Messgröße',
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
51 dataIndex: 'messgroesseId',
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
52 renderer: function(value) {
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
53 var store = Ext.getStore('Messgroessen');
445
a122424f2f0f Fixed typos in fields.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 442
diff changeset
54 return store.findRecord('messgroesseId', value).get('messgroesse');
183
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
55 }
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 header: 'Messeinheit',
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
59 dataIndex: 'mehId',
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
60 renderer: function(value) {
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
61 var store = Ext.getStore('Messeinheit');
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
62 return store.findRecord('mehId', value).get('einheit');
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 header: 'Grenzwertüberschreitung',
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
67 dataIndex: 'grenzwertueberschreitung',
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
68 flex: 1,
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
69 renderer: function(value) {
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
70 if (value === true) {
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
71 return "Ja";
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
72 } else {
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
73 return "Nein";
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
74 }
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
75 }
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
76 }
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
77 ];
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
78 this.callParent(arguments);
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
79 }
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
80 });
ceb04286152a Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
81

http://lada.wald.intevation.org