Mercurial > lada > lada-client
comparison app/view/grid/Status.js @ 961:6f1cc3316e2d
Intermediate Result. When creating a Messung a Statuswert will be set.
author | Dustin Demuth <dustin@intevation.de> |
---|---|
date | Tue, 10 Nov 2015 13:07:57 +0100 |
parents | 5d57c6c53e20 |
children | 6a6f2c6fe8ee |
comparison
equal
deleted
inserted
replaced
960:73b397d8dd3a | 961:6f1cc3316e2d |
---|---|
45 } | 45 } |
46 }); | 46 }); |
47 this.plugins = [this.rowEditing]; | 47 this.plugins = [this.rowEditing]; |
48 | 48 |
49 var statusWerteStore = Ext.create('Lada.store.StatusWerte'); | 49 var statusWerteStore = Ext.create('Lada.store.StatusWerte'); |
50 statusWerteStore.load(); //add params messungid | 50 statusWerteStore.load({ |
51 //params: { | |
52 // messungsId: this.recordId | |
53 //} | |
54 }); | |
51 var statusStufeStore = Ext.create('Lada.store.StatusStufe'); | 55 var statusStufeStore = Ext.create('Lada.store.StatusStufe'); |
52 statusStufeStore.load(); //add params messungid | 56 statusStufeStore.load({ |
57 //params: { | |
58 // messungsId: this.recordId | |
59 //} | |
60 }); | |
53 this.dockedItems = [{ | 61 this.dockedItems = [{ |
54 xtype: 'toolbar', | 62 xtype: 'toolbar', |
55 dock: 'bottom', | 63 dock: 'bottom', |
56 items: ['->', { | 64 items: ['->', { |
57 text: 'Hinzufügen', | 65 text: 'Hinzufügen', |
74 sortable: false, | 82 sortable: false, |
75 }, { | 83 }, { |
76 header: 'Erzeuger', | 84 header: 'Erzeuger', |
77 dataIndex: 'erzeuger', | 85 dataIndex: 'erzeuger', |
78 renderer: function(value) { | 86 renderer: function(value) { |
87 var r = ''; | |
79 if (!value || value === '') { | 88 if (!value || value === '') { |
80 return ''; | 89 r = 'Error'; |
81 } | 90 } |
82 var mstore = Ext.data.StoreManager.get('messstellen'); | 91 var mstore = Ext.data.StoreManager.get('messstellen'); |
83 return mstore.getById(value).get('messStelle'); | 92 var item = mstore.getById(value); |
93 if (item) { | |
94 r = item.get('messStelle'); | |
95 } | |
96 return r; | |
84 }, | 97 }, |
85 editor: { | 98 editor: { |
86 xtype: 'combobox', | 99 xtype: 'combobox', |
87 store: Ext.data.StoreManager.get('messstellen'), | 100 store: Ext.data.StoreManager.get('messstellen'), |
88 displayField: 'messStelle', | 101 displayField: 'messStelle', |
102 var item = statusStufeStore.getById(value); | 115 var item = statusStufeStore.getById(value); |
103 if (item) { | 116 if (item) { |
104 r = item.get('stufe'); | 117 r = item.get('stufe'); |
105 } | 118 } |
106 return r; | 119 return r; |
107 }, | |
108 editor: { | |
109 xtype: 'combobox', | |
110 store: statusStufeStore, | |
111 displayField: 'stufe', | |
112 valueField: 'id', | |
113 allowBlank: false, | |
114 editable: false | |
115 }, | 120 }, |
116 sortable: false, | 121 sortable: false, |
117 }, { | 122 }, { |
118 header: 'Status', | 123 header: 'Status', |
119 dataIndex: 'statusWert', | 124 dataIndex: 'statusWert', |