problem with paginate button style
problem with paginate button style
Hey I'm using datatables with JUI, my ini is this:
[code]
oTable = $('#example').dataTable( {
"sDom": 'R<"H"lfr>t<"F"ip<',
"bjQueryUI": true,
"bProcessing": true,
"sAjaxSource": '../ajax/getglobal.php',
"bAutoWidth": false,
"iDisplayLength": 25,
"aoColumns": [ { "sTitle": "NDB_No", "bSortable": false, "bSearchable": false, "bVisible": false },
{ "sTitle": "Food", "sWidth": "60%", "bSortable": true },
{ "sTitle": "F.G.", /*"sWidth": "2%",*/ "bSortable": false },
{ "sTitle": "Food Group Description", "sWidth": "36%", "bSortable": true } ],
"bPaginate": true,
"sPaginationType": "full_numbers",
"bLengthChange": true,
"bFilter": true,
"bSort": true,
"aaSorting": []
});
[/code]
everything works fine exept for the pagination buttons at the bottom.
First of all they do not like like the rest of my JUI buttons because they don't have the same colors for active, hover, etc. They appear grayed out. I want them to look like standard JUI buttons. I think this has something to do with the demo_table css file which i downloaded with datatables and is currently untouched. I dont know how to modify the styles so make jui buttons. i tried deleting the colours for .paging_full_numbers styles because i thought they were overriding the correct backgrounds, but its clear in firebug these table buttons don't even have the same class as my regular buttons. besides, i though ini the table with bjQueryUI would take care of this. Also, the header and footer do have SOME JUI formatting, it has the correct background gloss wave. the only problem is the buttons. Maybe there's a way to ini the table with the correct classes for the buttons?
Second, there are almost 8000 entries in the table. if i skip to last page, the pagination buttons at the buttom are too many and the result is the rightmost buttons are partly pushed out of the table container and cut off. This despite the fact it looks like theres sufficient space if theyre just shifted left.
Appreciate any help, especially with the buttons. thanks, G
[code]
oTable = $('#example').dataTable( {
"sDom": 'R<"H"lfr>t<"F"ip<',
"bjQueryUI": true,
"bProcessing": true,
"sAjaxSource": '../ajax/getglobal.php',
"bAutoWidth": false,
"iDisplayLength": 25,
"aoColumns": [ { "sTitle": "NDB_No", "bSortable": false, "bSearchable": false, "bVisible": false },
{ "sTitle": "Food", "sWidth": "60%", "bSortable": true },
{ "sTitle": "F.G.", /*"sWidth": "2%",*/ "bSortable": false },
{ "sTitle": "Food Group Description", "sWidth": "36%", "bSortable": true } ],
"bPaginate": true,
"sPaginationType": "full_numbers",
"bLengthChange": true,
"bFilter": true,
"bSort": true,
"aaSorting": []
});
[/code]
everything works fine exept for the pagination buttons at the bottom.
First of all they do not like like the rest of my JUI buttons because they don't have the same colors for active, hover, etc. They appear grayed out. I want them to look like standard JUI buttons. I think this has something to do with the demo_table css file which i downloaded with datatables and is currently untouched. I dont know how to modify the styles so make jui buttons. i tried deleting the colours for .paging_full_numbers styles because i thought they were overriding the correct backgrounds, but its clear in firebug these table buttons don't even have the same class as my regular buttons. besides, i though ini the table with bjQueryUI would take care of this. Also, the header and footer do have SOME JUI formatting, it has the correct background gloss wave. the only problem is the buttons. Maybe there's a way to ini the table with the correct classes for the buttons?
Second, there are almost 8000 entries in the table. if i skip to last page, the pagination buttons at the buttom are too many and the result is the rightmost buttons are partly pushed out of the table container and cut off. This despite the fact it looks like theres sufficient space if theyre just shifted left.
Appreciate any help, especially with the buttons. thanks, G
This discussion has been closed.
Replies
I also fixed my buttons getting cut off by increasing width of .paging_full_numbers from 350px to 450px and reducing .dataTables_info width from 50% to 40%. I think there should be a percentage width for .dataTables_info as well it would keep buttons from getting cut off. I noticed you put important! but i think maybe min-width or something would be better
[code]
/*paging button default state, same as JUI default state*/
.paging_full_numbers span.paginate_button {
background: url("images/ui-bg_glass_45_0078ae_1x400.png") repeat-x scroll 50% 50% #0078AE;
border: 1px solid #77D5F7;
color: #FFFFFF;
font-weight:normal;
}
.paging_full_numbers span.paginate_button:hover {
background: url("images/ui-bg_glass_75_79c9ec_1x400.png") repeat-x scroll 50% 50% #79C9EC;
border: 1px solid #448DAE;
color: #0268890;
font-weight:normal;
}
.paging_full_numbers span.paginate_active {
background: url("images/ui-bg_gloss-wave_50_6eac2c_500x100.png") repeat-x scroll 50% 50% #6EAC2C;
border: 1px solid #ACDD4A;
color: #FFFFFF;
font-weight:normal;
}
[/code]