diff app/controller/grid/ProbeList.js @ 1412:dc90e2997071

Merged branch release-2.5 into default.
author Tom Gottfried <tom@intevation.de>
date Mon, 27 Mar 2017 16:50:00 +0200
parents 69ebd572fe5c
children
line wrap: on
line diff
--- a/app/controller/grid/ProbeList.js	Wed Mar 22 16:28:22 2017 +0100
+++ b/app/controller/grid/ProbeList.js	Mon Mar 27 16:50:00 2017 +0200
@@ -51,6 +51,9 @@
             'probelistgrid gridview': {
                 expandbody: this.expandBody,
                 collapsebody: this.collapseBody
+            },
+            'probelistgrid pagingtoolbar': {
+                change: this.pageChange
             }
         });
         this.callParent(arguments);
@@ -549,6 +552,19 @@
                 }
             }
         });
+    },
+
+    pageChange: function(toolbar) {
+        var grid = toolbar.up('grid');
+        var store = grid.getStore();
+        var rowExpander = grid.plugins[0]
+        var nodes = rowExpander.view.getNodes();
+        for (var i = 0; i < nodes.length; i++) {
+            var node = Ext.fly(nodes[i]);
+            if (node.hasCls(rowExpander.rowCollapsedCls) === false) {
+                rowExpander.toggleRow(i, store.getAt(i));
+            }
+        }
     }
 
 });

http://lada.wald.intevation.org