PDA

View Full Version : Ext.ux.toolbar.PagingStatusToolbar



tarini
30 Nov 2008, 6:49 AM
simple, stupid and useful Toolbar :))




Ext.ns("Ext.ux.toolbar");

Ext.ux.toolbar.PagingStatusToolbar = Ext.extend(Ext.PagingToolbar, {

cls : 'x-statusbar x-status-right',
statusAlign: 'right',
defaultText: 'DefaultText',
busyIconCls : 'x-status-busy',
busyText : 'Loading...',
autoClear : 5000,
pageSize: 30,
activeThreadId : 0,

/* Ext.StatusBar inheritance */
afterRender: Ext.StatusBar.prototype.afterRender,
setStatus: Ext.StatusBar.prototype.setStatus,
clearStatus: Ext.StatusBar.prototype.clearStatus,
setText: Ext.StatusBar.prototype.setText,
getText: Ext.StatusBar.prototype.getText,
setIcon: Ext.StatusBar.prototype.setIcon,
showBusy: Ext.StatusBar.prototype.showBusy

});


You can use with both APIs (PagingToolbar API + StatusBar API)

usage


var tb = new Ext.ux.toolbar.GridWorkdeskToolbar({
store: myStore
});
var grid = new Ext.grid.GridPanel({
bbar = tb,
store = myStore,
[...]
});
tb.setStatus(...);


PS in my screenshot I use also the Ext.ux.PageSizePlugin

galdaka
30 Nov 2008, 7:06 AM
screenshot or live example?

Thanks in advance,

tarini
30 Nov 2008, 8:42 AM
you're right...
added screenshot to the first post :)