changeset 1369:1cc11bada44e

fix rowediting trigger in ortstammdatengrid and proper reloading after save
author Maximilian Krambach <mkrambach@intevation.de>
date Wed, 08 Feb 2017 17:26:24 +0100
parents 75b1b0d7dece
children 102c6b9e0a05
files app/controller/Ort.js app/view/grid/Orte.js
diffstat 2 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/app/controller/Ort.js	Wed Feb 08 16:33:12 2017 +0100
+++ b/app/controller/Ort.js	Wed Feb 08 17:26:24 2017 +0100
@@ -125,7 +125,7 @@
         context.record.save({
             success: function(record, response) {
                 var grid = Ext.ComponentQuery.query('ortstammdatengrid')[0];
-                grid.store.reload();
+                grid.store.load();
                 Ext.StoreManager.get('orte').load();
             },
             failure: function(record, response) {
--- a/app/view/grid/Orte.js	Wed Feb 08 16:33:12 2017 +0100
+++ b/app/view/grid/Orte.js	Wed Feb 08 17:26:24 2017 +0100
@@ -64,7 +64,7 @@
             }]
         };
         this.features = [filters];
-
+        var me = this;
         this.columns = [{
             xtype: 'actioncolumn',
             text: 'RW',
@@ -76,6 +76,12 @@
                         return 'edit';
                 }
                 return 'noedit';
+            },
+            handler: function(grid, rowIndex, colIndex) {
+                var rec = grid.getStore().getAt(rowIndex);
+                if (rec.get('readonly') === false) {
+                    me.rowEditing.startEdit(rowIndex, colIndex);
+                }
             }
         }, {
             header: i18n.getMsg('netzbetreiberId'),

http://lada.wald.intevation.org