Mercurial > lada > lada-client
diff app/controller/Messwert.js @ 490:446e99cfd425
Updated views and controllers using the new model and stores.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Fri, 31 Oct 2014 21:28:31 +0100 |
parents | debfcc7713e3 |
children | 850ccfe5f3c4 |
line wrap: on
line diff
--- a/app/controller/Messwert.js Fri Oct 31 21:11:25 2014 +0100 +++ b/app/controller/Messwert.js Fri Oct 31 21:28:31 2014 +0100 @@ -18,8 +18,8 @@ 'Proben', 'Messungen', 'Messwerte', - 'Messeinheit', - 'Messgroessen' + 'StaMesseinheiten', + 'StaMessgroessen' ], init: function() { console.log('Initialising the Messwert controller'); @@ -59,7 +59,10 @@ }, editItem: function(grid, record) { console.log('Editing Messwert'); - record.getAuthInfo(this.initEditWindow); + var mstore = Ext.data.StoreManager.get('Messungen'); + var pstore = Ext.data.StoreManager.get('Proben'); + var messung = mstore.getById(record.get('messungsId')) + record.getAuthInfo(this.initEditWindow, messung.get('probeId')); console.log("Loaded Messwert with ID " + record.getId()); //outputs ID }, initEditWindow: function(record, readonly, owner) { @@ -76,7 +79,7 @@ Ext.MessageBox.confirm('Löschen', 'Sind Sie sicher?', function(btn){ if(btn === 'yes'){ var store = grid.getStore(); - var deleteUrl = selection.getProxy().url + selection.getEidi(); + var deleteUrl = selection.getProxy().url + selection.getId(); Ext.Ajax.request({ url: deleteUrl, method: 'DELETE',