diff app/controller/Orte.js @ 526:381066c87ba8

Merge
author Roland Geider <roland.geider@intevation.de>
date Tue, 16 Dec 2014 18:22:04 +0100
parents de1acaf21db3
children
line wrap: on
line diff
--- a/app/controller/Orte.js	Tue Dec 16 18:16:25 2014 +0100
+++ b/app/controller/Orte.js	Tue Dec 16 18:22:04 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);
     },
 

http://lada.wald.intevation.org