[Lada-commits] [PATCH] fix rowediting trigger in ortstammdatengrid and proper reloading after save

Wald Commits scm-commit at wald.intevation.org
Wed Feb 8 17:26:27 CET 2017


# HG changeset patch
# User Maximilian Krambach <mkrambach at intevation.de>
# Date 1486571184 -3600
# Node ID 1cc11bada44eb435519089fdebad02301cf6bb55
# Parent  75b1b0d7dece476e94b0b1d1d3835b1a524bd8f6
fix rowediting trigger in ortstammdatengrid and proper reloading after save

diff -r 75b1b0d7dece -r 1cc11bada44e app/controller/Ort.js
--- 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) {
diff -r 75b1b0d7dece -r 1cc11bada44e app/view/grid/Orte.js
--- 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'),


More information about the Lada-commits mailing list