How can I add default user buttons to the pagination like this:
$.fn.pagination.defaults = $.extend({}, $.fn.pagination.defaults, {
loading: true,
beforePageText: paginationPageLabel,
afterPageText: paginationPageOfLabel +" {pages}",
displayMsg: paginationFooterMsg,
buttons:[{
iconCls:'icon-add',
text: 'add',
handler:function(){
//code by Option?
}
},{
iconCls:'icon-save',
text: 'save',
handler:function(){
//code by Option?
}
},{
iconCls:'icon-remove',
text: 'remove,
handler:function(){
//code by Option?
}
},{
iconCls:'icon-cancel',
text: 'cancel',
handler:function(){
//code by Option?
}
}]
});
and can I disable buttons with user options set on special pages like this:
$('#edServerServerRel').datagrid('getPager').pagination({ // get the pager of datagrid
disableAddButton: true,
cancelHandlerCode: 'jsMethodeXyz'
});