Mercurial > lada > lada-client
comparison app/controller/Messwert.js @ 540:99e738c17b81
Add detail button to tables
author | Roland Geider <roland.geider@intevation.de> |
---|---|
date | Wed, 17 Dec 2014 16:59:45 +0100 |
parents | 5960189e4461 |
children |
comparison
equal
deleted
inserted
replaced
539:31a770c6a9a9 | 540:99e738c17b81 |
---|---|
26 this.callParent(arguments); | 26 this.callParent(arguments); |
27 }, | 27 }, |
28 | 28 |
29 addListeners: function() { | 29 addListeners: function() { |
30 this.control({ | 30 this.control({ |
31 //'messwertelist': { | 31 'messwertelist toolbar button[action=open]': { |
32 // itemdblclick: this.editItem | 32 click: this.editItem |
33 //}, | 33 }, |
34 'messwertelist toolbar button[action=add]': { | 34 'messwertelist toolbar button[action=add]': { |
35 click: this.addItem | 35 click: this.addItem |
36 }, | 36 }, |
37 'messwertelist toolbar button[action=delete]': { | 37 'messwertelist toolbar button[action=delete]': { |
38 click: this.deleteItem | 38 click: this.deleteItem |
59 Ext.widget('messwertecreate', { | 59 Ext.widget('messwertecreate', { |
60 model: messung | 60 model: messung |
61 }); | 61 }); |
62 }, | 62 }, |
63 | 63 |
64 editItem: function(grid, record) { | 64 editItem: function(button) { |
65 var grid = button.up('grid'); | |
66 var selection = grid.getView().getSelectionModel().getSelection()[0]; | |
67 var messwertId = selection.getId(); | |
68 var record = selection.store.getById(messwertId); | |
69 | |
65 var mstore = Ext.data.StoreManager.get('Messungen'); | 70 var mstore = Ext.data.StoreManager.get('Messungen'); |
66 var messung = mstore.getById(record.get('messungsId')); | 71 var messung = mstore.getById(record.get('messungsId')); |
67 record.getAuthInfo(this.initEditWindow, messung.get('probeId')); | 72 record.getAuthInfo(this.initEditWindow, messung.get('probeId')); |
68 }, | 73 }, |
69 | 74 |