Mercurial > lada > lada-client
diff 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 |
line wrap: on
line diff
--- a/app/controller/Orte.js Tue Dec 16 14:50:30 2014 +0100 +++ b/app/controller/Orte.js Tue Dec 16 15:58:43 2014 +0100 @@ -32,9 +32,9 @@ addListeners: function() { this.control({ - //'ortelist': { - // itemdblclick: this.editItem - //}, + 'ortelist toolbar button[action=open]': { + click: this.editItem + }, 'ortelist toolbar button[action=add]': { click: this.addItem }, @@ -145,7 +145,12 @@ }); }, - editItem: function(grid, record) { + editItem: function(button) { + var grid = button.up('grid'); + var selection = grid.getView().getSelectionModel().getSelection()[0]; + var ortId = selection.getId(); + var record = selection.store.getById(ortId); + record.getAuthInfo(this.initEditWindow); },