annotate app/view/zusatzwerte/List.js @ 125:324b11db4323

Store probeId as attribute of the "add" button in the zusatzwerte list.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Tue, 25 Jun 2013 11:06:43 +0200
parents d78bb4ca6089
children 4dc84682110d
rev   line source
106
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
1 Ext.define('Lada.view.zusatzwerte.List' ,{
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
2 extend: 'Ext.grid.Panel',
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
3 alias: 'widget.zusatzwertelist',
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
4 store: 'Zusatzwerte',
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
5 viewConfig: {
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
6 maxHeight: 350,
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
7 emptyText: 'Keine Zusatzwerte gefunden.',
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
8 // minHeight and deferEmptyText are needed to be able to show the
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
9 // emptyText message.
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
10 minHeight: 35,
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
11 deferEmptyText: false
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
12 },
125
324b11db4323 Store probeId as attribute of the "add" button in the zusatzwerte list.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 123
diff changeset
13 probeId: null,
106
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
14 initComponent: function() {
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
15 this.dockedItems = [
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
16 {
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
17 xtype: 'toolbar',
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
18 dock: 'top',
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
19 items: [
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
20 {
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
21 text: 'Hinzufügen',
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
22 icon: 'gfx/plus.gif',
125
324b11db4323 Store probeId as attribute of the "add" button in the zusatzwerte list.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 123
diff changeset
23 action: 'add',
324b11db4323 Store probeId as attribute of the "add" button in the zusatzwerte list.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 123
diff changeset
24 probeId: this.probeId
106
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
25 },
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
26 {
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
27 text: 'Löschen',
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
28 icon: 'gfx/minus.gif',
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
29 action: 'delete'
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
30 }
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
31 ]
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
32 }
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
33 ];
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
34 this.columns = [
123
d78bb4ca6089 Enabled accessing nested data in the grid through a renderer.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 114
diff changeset
35 {
d78bb4ca6089 Enabled accessing nested data in the grid through a renderer.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 114
diff changeset
36 header: 'PZW-ID',
d78bb4ca6089 Enabled accessing nested data in the grid through a renderer.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 114
diff changeset
37 dataIndex: 'sprobenZusatz',
d78bb4ca6089 Enabled accessing nested data in the grid through a renderer.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 114
diff changeset
38 renderer: function(value) {
d78bb4ca6089 Enabled accessing nested data in the grid through a renderer.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 114
diff changeset
39 return value.pzsId;
d78bb4ca6089 Enabled accessing nested data in the grid through a renderer.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 114
diff changeset
40 }
d78bb4ca6089 Enabled accessing nested data in the grid through a renderer.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 114
diff changeset
41 },
d78bb4ca6089 Enabled accessing nested data in the grid through a renderer.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 114
diff changeset
42 {
d78bb4ca6089 Enabled accessing nested data in the grid through a renderer.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 114
diff changeset
43 header: 'PZW-Größe',
d78bb4ca6089 Enabled accessing nested data in the grid through a renderer.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 114
diff changeset
44 dataIndex: 'sprobenZusatz',
d78bb4ca6089 Enabled accessing nested data in the grid through a renderer.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 114
diff changeset
45 renderer: function(value) {
d78bb4ca6089 Enabled accessing nested data in the grid through a renderer.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 114
diff changeset
46 return value.beschreibung;
d78bb4ca6089 Enabled accessing nested data in the grid through a renderer.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 114
diff changeset
47 },
d78bb4ca6089 Enabled accessing nested data in the grid through a renderer.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 114
diff changeset
48 flex: 1
d78bb4ca6089 Enabled accessing nested data in the grid through a renderer.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 114
diff changeset
49 },
114
189a93e31be9 Worked on Zusatzwerte. No all values are displayed correct in the List and
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 106
diff changeset
50 {header: 'Messwert', dataIndex: 'messwertPzs'},
106
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
51 {header: 'rel. Unsich.[%]', dataIndex: 'messfehler'},
123
d78bb4ca6089 Enabled accessing nested data in the grid through a renderer.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 114
diff changeset
52 {
d78bb4ca6089 Enabled accessing nested data in the grid through a renderer.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 114
diff changeset
53 header: 'Maßeinheit',
d78bb4ca6089 Enabled accessing nested data in the grid through a renderer.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 114
diff changeset
54 dataIndex: 'sprobenZusatz',
d78bb4ca6089 Enabled accessing nested data in the grid through a renderer.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 114
diff changeset
55 renderer: function(value) {
d78bb4ca6089 Enabled accessing nested data in the grid through a renderer.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 114
diff changeset
56 return value.mehId;
d78bb4ca6089 Enabled accessing nested data in the grid through a renderer.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 114
diff changeset
57 }
d78bb4ca6089 Enabled accessing nested data in the grid through a renderer.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 114
diff changeset
58 }
106
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
59 ];
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
60 this.callParent(arguments);
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
61 }
b91d5376db19 Load Zusatzwerte from server
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
62 });

http://lada.wald.intevation.org