HOR-2803
Remove some buttons from grid paging toolbar to avoid problems with counters.
This commit is contained in:
@@ -2133,6 +2133,34 @@ Ext.onReady ( function() {
|
|||||||
items: itemToolbar
|
items: itemToolbar
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var pagingToolBar;
|
||||||
|
if (action === 'search') {
|
||||||
|
pagingToolBar = new Ext.PagingToolbar({
|
||||||
|
pageSize: pageSize,
|
||||||
|
afterPageText: '',
|
||||||
|
store: storeCases,
|
||||||
|
displayInfo: true,
|
||||||
|
displayMsg: '',
|
||||||
|
emptyMsg: '',
|
||||||
|
listeners: {
|
||||||
|
afterlayout: function (toolbar, opts) {
|
||||||
|
var buttons = Ext.query('em', toolbar.el.dom);
|
||||||
|
//Hide the "First Page" and "Last Page" buttons
|
||||||
|
buttons[0].style.display = 'none';
|
||||||
|
buttons[3].style.display = 'none';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
pagingToolBar = new Ext.PagingToolbar({
|
||||||
|
pageSize: pageSize,
|
||||||
|
store: storeCases,
|
||||||
|
displayInfo: true,
|
||||||
|
//displayMsg: 'Displaying items {0} - {1} of {2} ' + ' ' ,
|
||||||
|
displayMsg: _('ID_DISPLAY_ITEMS') + ' ',
|
||||||
|
emptyMsg: _('ID_DISPLAY_EMPTY')
|
||||||
|
})
|
||||||
|
}
|
||||||
var mask = new Ext.LoadMask(Ext.getBody(), {msg: _('ID_LOADING')});
|
var mask = new Ext.LoadMask(Ext.getBody(), {msg: _('ID_LOADING')});
|
||||||
// create the editor grid
|
// create the editor grid
|
||||||
grid = new Ext.grid.GridPanel({
|
grid = new Ext.grid.GridPanel({
|
||||||
@@ -2171,14 +2199,7 @@ Ext.onReady ( function() {
|
|||||||
|
|
||||||
tbar: tb,
|
tbar: tb,
|
||||||
// paging bar on the bottom
|
// paging bar on the bottom
|
||||||
bbar: new Ext.PagingToolbar({
|
bbar: pagingToolBar
|
||||||
pageSize: pageSize,
|
|
||||||
store: storeCases,
|
|
||||||
displayInfo: true,
|
|
||||||
//displayMsg: 'Displaying items {0} - {1} of {2} ' + ' ' ,
|
|
||||||
displayMsg: _('ID_DISPLAY_ITEMS') + ' ',
|
|
||||||
emptyMsg: _('ID_DISPLAY_EMPTY')
|
|
||||||
})
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user