comparison app/controller/Zusatzwerte.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 a12c9c97d3cb
children
comparison
equal deleted inserted replaced
539:31a770c6a9a9 540:99e738c17b81
20 this.callParent(arguments); 20 this.callParent(arguments);
21 }, 21 },
22 22
23 addListeners: function() { 23 addListeners: function() {
24 this.control({ 24 this.control({
25 //'zusatzwertelist': { 25 'zusatzwertelist toolbar button[action=open]': {
26 // itemdblclick: this.editItem 26 click: this.editItem
27 //}, 27 },
28 'zusatzwertelist toolbar button[action=add]': { 28 'zusatzwertelist toolbar button[action=add]': {
29 click: this.addItem 29 click: this.addItem
30 }, 30 },
31 'zusatzwertelist toolbar button[action=delete]': { 31 'zusatzwertelist toolbar button[action=delete]': {
32 click: this.deleteItem 32 click: this.deleteItem
56 Ext.widget('zusatzwertecreate', { 56 Ext.widget('zusatzwertecreate', {
57 model: zusatzwert 57 model: zusatzwert
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 id = selection.getId();
65 var record = selection.store.getById(id);
66
62 record.getAuthInfo(this.initEditWindow); 67 record.getAuthInfo(this.initEditWindow);
63 }, 68 },
64 69
65 initEditWindow: function(record, readonly) { 70 initEditWindow: function(record, readonly) {
66 var view = Ext.widget('zusatzwertecreate', { 71 var view = Ext.widget('zusatzwertecreate', {

http://lada.wald.intevation.org