Mercurial > lada > lada-client
comparison app/controller/Status.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 | 6ad453afbc31 |
children |
comparison
equal
deleted
inserted
replaced
539:31a770c6a9a9 | 540:99e738c17b81 |
---|---|
21 this.callParent(arguments); | 21 this.callParent(arguments); |
22 }, | 22 }, |
23 | 23 |
24 addListeners: function() { | 24 addListeners: function() { |
25 this.control({ | 25 this.control({ |
26 //'statuslist': { | 26 'statuslist toolbar button[action=open]': { |
27 // itemdblclick: this.editItem | 27 click: this.editItem |
28 //}, | 28 }, |
29 'statuslist toolbar button[action=add]': { | 29 'statuslist toolbar button[action=add]': { |
30 click: this.addItem | 30 click: this.addItem |
31 }, | 31 }, |
32 'statuslist toolbar button[action=delete]': { | 32 'statuslist toolbar button[action=delete]': { |
33 click: this.deleteItem | 33 click: this.deleteItem |
53 Ext.widget('statuscreate', { | 53 Ext.widget('statuscreate', { |
54 model: zusatzwert | 54 model: zusatzwert |
55 }); | 55 }); |
56 }, | 56 }, |
57 | 57 |
58 editItem: function(grid, record) { | 58 editItem: function(button) { |
59 var grid = button.up('grid'); | |
60 var selection = grid.getView().getSelectionModel().getSelection()[0]; | |
61 var statusId = selection.getId(); | |
62 var record = selection.store.getById(statusId); | |
63 | |
59 var mstore = Ext.data.StoreManager.get('Messungen'); | 64 var mstore = Ext.data.StoreManager.get('Messungen'); |
60 var messung = mstore.getById(record.get('messungsId')); | 65 var messung = mstore.getById(record.get('messungsId')); |
61 record.getAuthInfo(this.initEditWindow, messung.get('probeId')); | 66 record.getAuthInfo(this.initEditWindow, messung.get('probeId')); |
62 }, | 67 }, |
63 | 68 |