Mercurial > lada > lada-client
comparison app/view/grid/Messmethoden.js @ 759:b7484c7da2d4
Unified the Messprogramm windows. Unfortunately the Roweditor of Messmethodengrid is broken in this commit. This is due to the fact that the Mmt store is noit autoloaded anymore
author | Dustin Demuth <dustin@intevation.de> |
---|---|
date | Thu, 07 May 2015 10:55:44 +0200 |
parents | b2fcbdc4969d |
children | 0e8d4178bb7e |
comparison
equal
deleted
inserted
replaced
758:b2fcbdc4969d | 759:b7484c7da2d4 |
---|---|
78 } | 78 } |
79 var store = Ext.data.StoreManager.get('messmethoden'); | 79 var store = Ext.data.StoreManager.get('messmethoden'); |
80 if (!store) { | 80 if (!store) { |
81 store = Ext.create('Lada.store.Messmethoden'); | 81 store = Ext.create('Lada.store.Messmethoden'); |
82 } | 82 } |
83 return value + " - " + store.findRecord('id', value, 0, false, false, true).get('messmethode'); | 83 store.load(); |
84 console.log(store); | |
85 return value + " - " + store.findRecord('id', value, 0, false, false, true).get('messmethode'); | |
84 }, | 86 }, |
85 editor: { | 87 editor: { |
86 xtype: 'combobox', | 88 xtype: 'combobox', |
87 store: Ext.data.StoreManager.get('messmethoden'), | 89 store: Ext.data.StoreManager.get('messmethoden'), |
88 //displayField: 'mmtId', | 90 //displayField: 'mmtId', |
110 this.store.removeAll(); | 112 this.store.removeAll(); |
111 } | 113 } |
112 else { | 114 else { |
113 this.store = Ext.create('Lada.store.MmtMessprogramm'); | 115 this.store = Ext.create('Lada.store.MmtMessprogramm'); |
114 } | 116 } |
115 this.store.load({ | 117 // Only load the Store when a Record ID is Present |
116 params: { | 118 if (this.recordId) { |
117 messprogrammId: this.recordId | 119 this.store.load({ |
118 } | 120 params: { |
119 }); | 121 messprogrammId: this.recordId |
122 } | |
123 }); | |
124 } | |
120 }, | 125 }, |
121 setReadOnly: function(b) { | 126 setReadOnly: function(b) { |
122 if (b == true){ | 127 if (b == true){ |
123 //Readonly | 128 //Readonly |
124 if (this.getPlugin('rowedit')){ | 129 if (this.getPlugin('rowedit')){ |