Mercurial > lada > lada-client
comparison app/view/zusatzwerte/List.js @ 539:31a770c6a9a9
Merge
author | Roland Geider <roland.geider@intevation.de> |
---|---|
date | Wed, 17 Dec 2014 15:42:55 +0100 |
parents | eef1ff9f2bd2 |
children | 99e738c17b81 |
comparison
equal
deleted
inserted
replaced
533:6301d3210a9f | 539:31a770c6a9a9 |
---|---|
24 }, | 24 }, |
25 | 25 |
26 probeId: null, | 26 probeId: null, |
27 | 27 |
28 initComponent: function() { | 28 initComponent: function() { |
29 var rowEditing = Ext.create('Ext.grid.plugin.RowEditing', { | |
30 clicksToMoveEditor: 1, | |
31 autoCancel: false | |
32 }); | |
33 this.plugins = [rowEditing]; | |
29 this.dockedItems = [{ | 34 this.dockedItems = [{ |
30 xtype: 'toolbar', | 35 xtype: 'toolbar', |
31 dock: 'bottom', | 36 dock: 'bottom', |
32 items: ['->', { | 37 items: ['->', { |
33 text: 'Hinzufügen', | 38 text: 'Hinzufügen', |
40 action: 'delete' | 45 action: 'delete' |
41 }] | 46 }] |
42 }]; | 47 }]; |
43 this.columns = [{ | 48 this.columns = [{ |
44 header: 'PZW-ID', | 49 header: 'PZW-ID', |
45 dataIndex: 'id' | 50 dataIndex: 'id', |
51 editor: { | |
52 xtype: 'numberfield', | |
53 allowBlank: false | |
54 } | |
46 }, { | 55 }, { |
47 header: 'PZW-Größe', | 56 header: 'PZW-Größe', |
48 dataIndex: 'pzsId', | 57 dataIndex: 'pzsId', |
49 renderer: function(value) { | 58 renderer: function(value) { |
50 var store = Ext.data.StoreManager.get('staProbenzusaetze'); | 59 var store = Ext.data.StoreManager.get('staProbenzusaetze'); |
51 var record = store.getById(value); | 60 var record = store.getById(value); |
52 return record.get('beschreibung'); | 61 return record.get('beschreibung'); |
53 }, | 62 }, |
54 flex: 1 | 63 flex: 1, |
64 editor: { | |
65 xtype: 'probenzusatzwert' | |
66 } | |
55 }, { | 67 }, { |
56 header: 'Messwert', | 68 header: 'Messwert', |
57 dataIndex: 'id', | 69 dataIndex: 'id', |
58 renderer: function(value) { | 70 renderer: function(value) { |
59 var store = Ext.getStore('Zusatzwerte'); | 71 var store = Ext.getStore('Zusatzwerte'); |
65 } | 77 } |
66 return messwert; | 78 return messwert; |
67 } | 79 } |
68 }, { | 80 }, { |
69 header: 'rel. Unsich.[%]', | 81 header: 'rel. Unsich.[%]', |
70 dataIndex: 'messfehler' | 82 dataIndex: 'messfehler', |
83 editor: { | |
84 allowBlank: false | |
85 } | |
71 }, { | 86 }, { |
72 header: 'Maßeinheit', | 87 header: 'Maßeinheit', |
73 dataIndex: 'pzsId', | 88 dataIndex: 'pzsId', |
74 renderer: function(value) { | 89 renderer: function(value) { |
75 var zstore = Ext.data.StoreManager.get('staProbenzusaetze'); | 90 var zstore = Ext.data.StoreManager.get('staProbenzusaetze'); |
76 var mstore = Ext.data.StoreManager.get('staMesseinheiten'); | 91 var mstore = Ext.data.StoreManager.get('staMesseinheiten'); |
77 var mehId = zstore.getById(value).get('mehId'); | 92 var mehId = zstore.getById(value).get('mehId'); |
78 var record = mstore.findRecord('id', mehId); | 93 var record = mstore.findRecord('id', mehId); |
79 return record.get('einheit'); | 94 return record.get('einheit'); |
80 } | 95 }/*, |
96 editor: { | |
97 xtype: 'messeinheit', | |
98 allowBlank: false | |
99 }*/ | |
81 }]; | 100 }]; |
82 this.callParent(arguments); | 101 this.callParent(arguments); |
83 } | 102 } |
84 }); | 103 }); |