diff app/view/grid/Orte.js @ 1049:1bd4c0709bd6 stammdatengrids

Working version of selectable 'ort' in map and grid.
author Raimund Renkert <raimund.renkert@intevation.de>
date Tue, 01 Mar 2016 11:50:39 +0100
parents 1df6b6210b42
children e0b5e64928c9
line wrap: on
line diff
--- a/app/view/grid/Orte.js	Tue Feb 16 09:04:05 2016 +0100
+++ b/app/view/grid/Orte.js	Tue Mar 01 11:50:39 2016 +0100
@@ -31,6 +31,14 @@
         var i18n = Lada.getApplication().bundle;
         this.emptyText = i18n.getMsg('orte.emptyGrid');
 
+        this.rowEditing = Ext.create('Ext.grid.plugin.RowEditing', {
+            clicksToMoveEditor: 1,
+            autoCancel: false,
+            disabled: false,
+            pluginId: 'rowedit'
+        });
+        this.plugins = [this.rowEditing];
+
         this.columns = [{
             header: i18n.getMsg('orte.ortId'),
             dataIndex: 'ortId'
@@ -139,5 +147,11 @@
                 }]);
             }
         }
+    },
+
+    selectOrt: function(map, feature) {
+        var id = feature[0].data.id;
+        var record = this.store.getById(id);
+        this.getSelectionModel().select(record);
     }
 });

http://lada.wald.intevation.org