comparison app/controller/MKommentare.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 8972f008dfb1
children
comparison
equal deleted inserted replaced
539:31a770c6a9a9 540:99e738c17b81
28 this.callParent(arguments); 28 this.callParent(arguments);
29 }, 29 },
30 30
31 addListeners: function() { 31 addListeners: function() {
32 this.control({ 32 this.control({
33 //'mkommentarelist': { 33 'mkommentarelist toolbar button[action=open]': {
34 // itemdblclick: this.editItem 34 click: this.editItem
35 //}, 35 },
36 'mkommentarelist toolbar button[action=add]': { 36 'mkommentarelist toolbar button[action=add]': {
37 click: this.addItem 37 click: this.addItem
38 }, 38 },
39 'mkommentarelist toolbar button[action=delete]': { 39 'mkommentarelist toolbar button[action=delete]': {
40 click: this.deleteItem 40 click: this.deleteItem
56 Ext.widget('mkommentarecreate', { 56 Ext.widget('mkommentarecreate', {
57 model: kommentar 57 model: kommentar
58 }); 58 });
59 }, 59 },
60 60
61 editItem: function(grid, record) { 61 editItem: function(button) {
62 var grid = button.up('grid');
63 var selection = grid.getView().getSelectionModel().getSelection()[0];
64 var commentarId = selection.getId();
65 var record = selection.store.getById(commentarId);
66
62 var mstore = Ext.data.StoreManager.get('Messungen'); 67 var mstore = Ext.data.StoreManager.get('Messungen');
63 var messung = mstore.getById(record.get('messungsId')); 68 var messung = mstore.getById(record.get('messungsId'));
64 record.getAuthInfo(this.initEditWindow, messung.get('probeId')); 69 record.getAuthInfo(this.initEditWindow, messung.get('probeId'));
65 }, 70 },
66 71

http://lada.wald.intevation.org