comparison app/view/messungen/List.js @ 502:484e12e89d54

Code style.
author Raimund Renkert <raimund.renkert@intevation.de>
date Thu, 11 Dec 2014 18:53:29 +0100
parents 850ccfe5f3c4
children 83a98b61546a
comparison
equal deleted inserted replaced
501:10959fe61092 502:484e12e89d54
1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz 1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
2 * Software engineering by Intevation GmbH 2 * Software engineering by Intevation GmbH
3 * 3 *
4 * This file is Free Software under the GNU GPL (v>=3) 4 * This file is Free Software under the GNU GPL (v>=3)
5 * and comes with ABSOLUTELY NO WARRANTY! Check out 5 * and comes with ABSOLUTELY NO WARRANTY! Check out
6 * the documentation coming with IMIS-Labordaten-Application for details. 6 * the documentation coming with IMIS-Labordaten-Application for details.
7 */ 7 */
8 8
9 /* 9 /*
10 * Grid to list Messungen 10 * Grid to list Messungen
11 */ 11 */
12 Ext.define('Lada.view.messungen.List' ,{ 12 Ext.define('Lada.view.messungen.List', {
13 extend: 'Ext.grid.Panel', 13 extend: 'Ext.grid.Panel',
14 alias: 'widget.messungenlist', 14 alias: 'widget.messungenlist',
15 15
16 store: 'Messungen', 16 store: 'Messungen',
17 viewConfig: { 17 viewConfig: {
40 action: 'delete' 40 action: 'delete'
41 }] 41 }]
42 }]; 42 }];
43 this.columns = [{ 43 this.columns = [{
44 header: 'Mess.ID', 44 header: 'Mess.ID',
45 dataIndex: "id", 45 dataIndex: 'id',
46 width: 50 46 width: 50
47 }, { 47 }, {
48 header: 'NPR-Nr.', 48 header: 'NPR-Nr.',
49 dataIndex: "nebenprobenNr", 49 dataIndex: 'nebenprobenNr',
50 width: 50 50 width: 50
51 }, { 51 }, {
52 header: 'MMT', 52 header: 'MMT',
53 dataIndex: "mmtId", 53 dataIndex: 'mmtId',
54 width: 50 54 width: 50
55 }, { 55 }, {
56 header: 'Messzeit', 56 header: 'Messzeit',
57 dataIndex: "messzeitpunkt" 57 dataIndex: 'messzeitpunkt'
58 }, { 58 }, {
59 header: 'Status', 59 header: 'Status',
60 dataIndex: 'id', 60 dataIndex: 'id',
61 width: 50,
61 renderer: function(value) { 62 renderer: function(value) {
62 var sstore = Ext.getStore('Status'); 63 var sstore = Ext.getStore('Status');
63 sstore.load({ 64 sstore.load({
64 params: { 65 params: {
65 probeId: value.probeId, 66 probeId: value.probeId,
66 messungsId: value.id 67 messungsId: value.id
67 } 68 }
68 }); 69 });
69 if (sstore.getTotalCount() === 0) { 70 if (sstore.getTotalCount() === 0) {
70 return "unbekannt"; 71 return 'unbekannt';
71 } else {
72 return sstore.last().get('status');
73 } 72 }
73 return sstore.last().get('status');
74 } 74 }
75 }, { 75 }, {
76 header: 'OK-Flag', 76 header: 'OK-Flag',
77 dataIndex: "fertig", 77 dataIndex: 'fertig',
78 width: 50,
78 renderer: function(value) { 79 renderer: function(value) {
79 if (value) { 80 if (value) {
80 return "Ja"; 81 return 'Ja';
81 } else {
82 return "Nein";
83 } 82 }
83 return 'Nein';
84 } 84 }
85 }, { 85 }, {
86 header: 'Anzahl Nuklide', 86 header: 'Anzahl Nuklide',
87 dataIndex: 'id', 87 dataIndex: 'id',
88 renderer: function(value) { 88 renderer: function(value) {
111 } 111 }
112 }]; 112 }];
113 this.callParent(arguments); 113 this.callParent(arguments);
114 } 114 }
115 }); 115 });
116

http://lada.wald.intevation.org