]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
WEBUI JS: Add back the per page settings in grids
authorJaroslav Kysela <perex@perex.cz>
Sat, 20 Jun 2015 07:35:57 +0000 (09:35 +0200)
committerJaroslav Kysela <perex@perex.cz>
Sat, 20 Jun 2015 07:35:57 +0000 (09:35 +0200)
src/webui/static/app/idnode.js

index 23bba14d35fad3d83a82958c67cd0a740871a5a6..34c04e80aed09d7655bfa78c5bdde40e5b6257b3 100644 (file)
@@ -1350,6 +1350,33 @@ tvheadend.idnode_grid = function(panel, conf)
             }
         });
 
+        var count = new Ext.form.ComboBox({
+            width: 50,
+            displayField: 'val',
+            valueField: 'key',
+            store: new Ext.data.ArrayStore({
+                id: 0,
+                fields: ['key', 'val'],
+                data: [[25, '25'], [50, '50'], [100, '100'],
+                    [200, '200'], [999999999, _('All')]]
+            }),
+            value: 50,
+            mode: 'local',
+            forceSelection: false,
+            triggerAction: 'all',
+            listeners: {
+                select: function(s, r) {
+                    if (r !== page.pageSize) {
+                        page.pageSize = r.id;
+                        page.changePage(0);
+                        store.reload();
+                        // TODO: currently setting pageSize=-1 to disable paging confuses
+                        //       the UI elements, and I don't know how to sort that!
+                    }
+                }
+            }
+        });
+
         var page = new Ext.PagingToolbar(
             tvheadend.PagingToolbarConf({store:store}, conf.titleP, auto, count)
         );
@@ -1384,32 +1411,6 @@ tvheadend.idnode_grid = function(panel, conf)
             });
         }
 
-        var count = new Ext.form.ComboBox({
-            width: 50,
-            displayField: 'val',
-            valueField: 'key',
-            store: new Ext.data.ArrayStore({
-                id: 0,
-                fields: ['key', 'val'],
-                data: [[25, '25'], [50, '50'], [100, '100'],
-                    [200, '200'], [999999999, _('All')]]
-            }),
-            value: 50,
-            mode: 'local',
-            forceSelection: false,
-            triggerAction: 'all',
-            listeners: {
-                select: function(s, r) {
-                    if (r !== page.pageSize) {
-                        page.pageSize = r.id;
-                        page.changePage(0);
-                        store.reload();
-                        // TODO: currently setting pageSize=-1 to disable paging confuses
-                        //       the UI elements, and I don't know how to sort that!
-                    }
-                }
-            }
-        });
         plugins.push(filter);
         var gconf = {
             stateful: true,