Mercurial > lada > lada-client
comparison app/controller/Messungen.js @ 511:83a98b61546a
Make tables editable for 'Messungen'
See LSB 3.5
author | Roland Geider <roland.geider@intevation.de> |
---|---|
date | Mon, 15 Dec 2014 10:50:32 +0100 |
parents | 8b4ec61c5752 |
children |
comparison
equal
deleted
inserted
replaced
510:1643d74a40bb | 511:83a98b61546a |
---|---|
29 this.callParent(); | 29 this.callParent(); |
30 }, | 30 }, |
31 | 31 |
32 addListeners: function() { | 32 addListeners: function() { |
33 this.control({ | 33 this.control({ |
34 'messungenlist': { | 34 'messungenlist toolbar button[action=open]': { |
35 itemdblclick: this.editItem | 35 click: this.editItem |
36 }, | 36 }, |
37 'messungenlist toolbar button[action=add]': { | 37 'messungenlist toolbar button[action=add]': { |
38 click: this.addItem | 38 click: this.addItem |
39 }, | 39 }, |
40 'messungenlist toolbar button[action=delete]': { | 40 'messungenlist toolbar button[action=delete]': { |
68 Ext.widget('messungencreate', { | 68 Ext.widget('messungencreate', { |
69 model: messung | 69 model: messung |
70 }); | 70 }); |
71 }, | 71 }, |
72 | 72 |
73 editItem: function(grid, record) { | 73 editItem: function(button) { |
74 var grid = button.up('grid'); | |
75 var selection = grid.getView().getSelectionModel().getSelection()[0]; | |
76 var messungsId = selection.getId(); | |
77 var record = selection.store.getById(messungsId); | |
78 | |
74 var kstore = this.getKommentareMStore(); | 79 var kstore = this.getKommentareMStore(); |
75 kstore.load({ | 80 kstore.load({ |
76 params: { | 81 params: { |
77 probeId: record.get('probeId'), | 82 probeId: record.get('probeId'), |
78 messungsId: record.get('id') | 83 messungsId: record.get('id') |