[icinga-checkins] icinga.org: icinga-web/master: Fixed pagination in user dialogs ( fixes #3266)

git at icinga.org git at icinga.org
Wed Oct 10 15:05:25 CEST 2012


Module: icinga-web
Branch: master
Commit: e7aeb2d5aebbf5c1450d12f0f90f43a455bc01bb
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=e7aeb2d5aebbf5c1450d12f0f90f43a455bc01bb

Author: Jannis Mosshammer <jannis.mosshammer at netways.de>
Date:   Wed Oct 10 15:05:00 2012 +0200

Fixed pagination in user dialogs (fixes #3266)

---

 app/modules/AppKit/lib/js/admin/UserManager.js     |   22 ++++++++-----------
 .../lib/js/admin/components/UserSelectionGrid.js   |   11 +++++++--
 2 files changed, 17 insertions(+), 16 deletions(-)

diff --git a/app/modules/AppKit/lib/js/admin/UserManager.js b/app/modules/AppKit/lib/js/admin/UserManager.js
index ed7de71..5af1736 100755
--- a/app/modules/AppKit/lib/js/admin/UserManager.js
+++ b/app/modules/AppKit/lib/js/admin/UserManager.js
@@ -157,11 +157,16 @@ Ext.ns("AppKit.Admin");
 
                 },
                 bbar: new Ext.PagingToolbar({
-                    pageSize: 25,
+                    pageSize: 50,
                     store: userList,
                     displayInfo: true,
                     displayMsg: _('Displaying users') + ' {0} - {1} ' + _('of') + ' {2}',
-                    emptyMsg: _('No users to display')
+                    emptyMsg: _('No users to display'),
+                    listeners: {
+                        render: function(cmp) {
+                            cmp.doRefresh();
+                        }
+                    }
                 }),
 
                 store: userList,
@@ -241,17 +246,8 @@ Ext.ns("AppKit.Admin");
                         id: 'userListPanel',
 
                         items: userGridCmp,
-                        autoScroll: true,
-                        listeners: {
-                            render: function () {
-                                userList.load({
-                                    params: {
-                                        start: 0,
-                                        limit: 25
-                                    }
-                                });
-                            }
-                        }
+                        autoScroll: true
+                       
                     }, {
                         region: 'east',
                         xtype: 'panel',
diff --git a/app/modules/AppKit/lib/js/admin/components/UserSelectionGrid.js b/app/modules/AppKit/lib/js/admin/components/UserSelectionGrid.js
index b7a3a88..bbf6b05 100755
--- a/app/modules/AppKit/lib/js/admin/components/UserSelectionGrid.js
+++ b/app/modules/AppKit/lib/js/admin/components/UserSelectionGrid.js
@@ -129,7 +129,6 @@ Ext.ns("AppKit.Admin.Components");
                 remoteSort: true,
                 totalProperty: 'totalCount',
                 proxy: new Ext.data.HttpProxy({
-                    
                     api: {
                         read: {
                             method: 'GET',
@@ -137,7 +136,7 @@ Ext.ns("AppKit.Admin.Components");
                         }
                     }
                 }),
-                autoLoad: true,
+
                 autoDestroy: true,
                 root: 'users',
                 fields: [{
@@ -165,9 +164,15 @@ Ext.ns("AppKit.Admin.Components");
                     store: groupsStore,
                     displayInfo: true,
                     displayMsg: _('Displaying users') + ' {0} - {1} ' + _('of') + ' {2}',
-                    emptyMsg: _('No users to display')
+                    emptyMsg: _('No users to display'),
+                    listeners: {
+                        render: function(cmp) {
+                            cmp.doRefresh();
+                        }
+                    }
                 }),
                 store: groupsStore,
+                
                 autoScroll:true,
                 viewConfig: {
                     forceFit: true





More information about the icinga-checkins mailing list