Mercurial > lada > lada-client
annotate app/view/messwerte/List.js @ 309:51897f9a6bbb
Use ts2date function from lib.Helpers. Remove old code
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Fri, 09 Aug 2013 15:24:00 +0200 |
parents | f3a2f985f451 |
children | c3c64920b740 |
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, |
210
f3a2f985f451
Set parentId to messwert for add button
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
183
diff
changeset
|
14 parentId: null, |
183
ceb04286152a
Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
15 initComponent: function() { |
ceb04286152a
Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
16 this.dockedItems = [ |
ceb04286152a
Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
17 { |
ceb04286152a
Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
18 xtype: 'toolbar', |
ceb04286152a
Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
19 dock: 'top', |
ceb04286152a
Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
20 items: [ |
ceb04286152a
Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
21 { |
ceb04286152a
Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
22 text: 'Hinzufügen', |
ceb04286152a
Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
23 icon: 'gfx/plus.gif', |
ceb04286152a
Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
24 action: 'add', |
210
f3a2f985f451
Set parentId to messwert for add button
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
183
diff
changeset
|
25 probeId: this.probeId, |
f3a2f985f451
Set parentId to messwert for add button
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
183
diff
changeset
|
26 parentId: this.parentId |
183
ceb04286152a
Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
27 }, |
ceb04286152a
Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
28 { |
ceb04286152a
Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
29 text: 'Löschen', |
ceb04286152a
Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
30 icon: 'gfx/minus.gif', |
ceb04286152a
Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
31 action: 'delete' |
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 } |
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 this.columns = [ |
ceb04286152a
Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
37 {header: 'Messwert', dataIndex: 'messwert'}, |
ceb04286152a
Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
38 {header: 'Messfehler', dataIndex: 'messfehler'}, |
ceb04286152a
Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
39 { |
ceb04286152a
Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
40 header: 'Messgröße', |
ceb04286152a
Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
41 dataIndex: 'messgroesseId', |
ceb04286152a
Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
42 renderer: function(value) { |
ceb04286152a
Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
43 var store = Ext.getStore('Messgroessen'); |
ceb04286152a
Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
44 return store.findRecord('messgroesseId', value).get('messgro0esse'); |
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 }, |
ceb04286152a
Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
47 { |
ceb04286152a
Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
48 header: 'Messeinheit', |
ceb04286152a
Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
49 dataIndex: 'mehId', |
ceb04286152a
Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
50 renderer: function(value) { |
ceb04286152a
Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
51 var store = Ext.getStore('Messeinheit'); |
ceb04286152a
Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
52 return store.findRecord('mehId', value).get('einheit'); |
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 }, |
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 header: 'Grenzwertüberschreitung', |
ceb04286152a
Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
57 dataIndex: 'grenzwertueberschreitung', |
ceb04286152a
Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
58 flex: 1, |
ceb04286152a
Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
59 renderer: function(value) { |
ceb04286152a
Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
60 if (value === true) { |
ceb04286152a
Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
61 return "Ja"; |
ceb04286152a
Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
62 } else { |
ceb04286152a
Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
63 return "Nein"; |
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 } |
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 this.callParent(arguments); |
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 |