comparison app/controller/Orte.js @ 522:de1acaf21db3

Add detail button for 'Orte' table See LSB 3.5
author Roland Geider <roland.geider@intevation.de>
date Tue, 16 Dec 2014 15:58:43 +0100
parents 1643d74a40bb
children
comparison
equal deleted inserted replaced
521:7a20e3054c9e 522:de1acaf21db3
30 this.callParent(arguments); 30 this.callParent(arguments);
31 }, 31 },
32 32
33 addListeners: function() { 33 addListeners: function() {
34 this.control({ 34 this.control({
35 //'ortelist': { 35 'ortelist toolbar button[action=open]': {
36 // itemdblclick: this.editItem 36 click: this.editItem
37 //}, 37 },
38 'ortelist toolbar button[action=add]': { 38 'ortelist toolbar button[action=add]': {
39 click: this.addItem 39 click: this.addItem
40 }, 40 },
41 'ortelist toolbar button[action=delete]': { 41 'ortelist toolbar button[action=delete]': {
42 click: this.deleteItem 42 click: this.deleteItem
143 Ext.widget('ortecreate', { 143 Ext.widget('ortecreate', {
144 model: ort 144 model: ort
145 }); 145 });
146 }, 146 },
147 147
148 editItem: function(grid, record) { 148 editItem: function(button) {
149 var grid = button.up('grid');
150 var selection = grid.getView().getSelectionModel().getSelection()[0];
151 var ortId = selection.getId();
152 var record = selection.store.getById(ortId);
153
149 record.getAuthInfo(this.initEditWindow); 154 record.getAuthInfo(this.initEditWindow);
150 }, 155 },
151 156
152 initEditWindow: function(record, readonly) { 157 initEditWindow: function(record, readonly) {
153 var view = Ext.widget('ortecreate', { 158 var view = Ext.widget('ortecreate', {

http://lada.wald.intevation.org