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

http://lada.wald.intevation.org