diff app/view/grid/Orte.js @ 1050:e0b5e64928c9 stammdatengrids

Use rowediting plugin for orte grid.
author Raimund Renkert <raimund.renkert@intevation.de>
date Tue, 01 Mar 2016 13:16:10 +0100
parents 1bd4c0709bd6
children 5e9a674d7bb4
line wrap: on
line diff
--- a/app/view/grid/Orte.js	Tue Mar 01 11:50:39 2016 +0100
+++ b/app/view/grid/Orte.js	Tue Mar 01 13:16:10 2016 +0100
@@ -26,18 +26,21 @@
     errors: null,
     readOnly: true,
     allowDeselect: true,
+    editableGrid: true,
 
     initComponent: function() {
         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];
+        if (this.editableGrid) {
+            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'),

http://lada.wald.intevation.org