[icinga-checkins] icinga.org: icinga-web/r1.6: * Removed pager, added simple counting bar ( fixes #2191)

git at icinga.org git at icinga.org
Fri Dec 16 14:53:18 CET 2011


Module: icinga-web
Branch: r1.6
Commit: 47acf794e4f133db86c9ef9cad4a7885972d7be9
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=47acf794e4f133db86c9ef9cad4a7885972d7be9

Author: Marius Hein <marius.hein at netways.de>
Date:   Tue Dec 13 13:51:12 2011 +0100

* Removed pager, added simple counting bar (fixes #2191)

---

 .../lib/js/admin/components/RoleListingGrid.js     |   24 ++++++++++++-------
 1 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/app/modules/AppKit/lib/js/admin/components/RoleListingGrid.js b/app/modules/AppKit/lib/js/admin/components/RoleListingGrid.js
index 38b66ef..e23418c 100644
--- a/app/modules/AppKit/lib/js/admin/components/RoleListingGrid.js
+++ b/app/modules/AppKit/lib/js/admin/components/RoleListingGrid.js
@@ -8,18 +8,24 @@ AppKit.Admin.Components.RoleListingGrid = Ext.extend(Ext.grid.GridPanel,{
     iconCls: 'icinga-icon-group',
     
     constructor: function(cfg) {
-        
-        cfg.bbar = new Ext.PagingToolbar({
-            pageSize: 25,
-            store: cfg.store,
-            displayInfo: true,
-            displayMsg: _('Displaying roles')+' {0} - {1} '+_('of')+' {2}',
-            emptyMsg: _('No roles to display')
-        });
-        Ext.apply(this,cfg);
         Ext.grid.GridPanel.prototype.constructor.call(this,cfg);
     },
     
+    initComponent: function() {
+    	this.bbar = [];
+    	
+    	AppKit.Admin.Components.RoleListingGrid.superclass.initComponent.call(this);
+    	
+    	this.counterLabel = this.getBottomToolbar().add({
+    		xtype : 'tbtext',
+    		tpl: new Ext.Template(_('{0} roles loaded.'))
+    	});
+    	
+    	this.store.on('load', function(store, records, o) {
+    		this.counterLabel.update([store.getCount()]);
+    	}, this);
+    },
+    
     deleteSelected: function() {
         Ext.Msg.confirm(_("Delete role"),_("Do you really want to delete these roles?"),function(btn) {
             if(btn != "yes")





More information about the icinga-checkins mailing list