changeset 5:039584709fa7

Map double click event on rows of the userlist to the editProben function.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Mon, 29 Apr 2013 15:10:43 +0200
parents b8e56e880f02
children 8e79bda4d55b
files app/controller/Proben.js
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/app/controller/Proben.js	Mon Apr 29 14:45:16 2013 +0200
+++ b/app/controller/Proben.js	Mon Apr 29 15:10:43 2013 +0200
@@ -8,13 +8,18 @@
         this.control({
             // CSS like selector to select element in the viewport. See
             // ComponentQuery documentation for more details.
-            'viewport > panel': {
+            'viewport > probenlist': {
                 // Map the "render" event to the given function.
-                render: this.onPanelRendered
+                render: this.onPanelRendered,
+                // Map Doubleclick on rows of the probenlist.
+                itemdblclick: this.editProbe
             }
         });
     },
     onPanelRendered: function() {
         console.log('The panel was rendered');
+    },
+    editProbe: function(grid, record) {
+        console.log('Double click on ' + record.get('name'));
     }
 });

http://lada.wald.intevation.org