jQuery UI isn't applied properly.

jQuery UI isn't applied properly.

szymonszymon Posts: 4Questions: 0Answers: 0
edited June 2011 in General
Hi,

I'm writing small web app for my MA and i have problem with proper appliance of jQuery UI (i'm also using ColVis) it looks just wrong:

http://wstaw.org/h/feb9666d51d/

DataTable initialization code:

[quote]var dTable = $('#grid').dataTable({
'oLanguage': {
"sSearch": "Search all columns "
},
'sDom': 'C<"clear"><"H"lfr>t<"F"ip>',
//'sDom': 'C<"clear">lfrtip',
'oColVis': {
'aiExclude': [ 1 ]
},
'bProcessing': true,
'bServerSide': true,
'bFilter': true,
'bStateSave': false,
'bJQueryUI': true,
'sAjaxSource': '/wifi/now',
'sPaginationType': 'full_numbers',
'aoColumns': [
{ 'mDataProp': '_id', 'sTitle': 'id', 'sWidth': '50px' },
{ 'mDataProp': 'source', 'sTitle': 'source' },
{ 'mDataProp': 'beginlease', 'sTitle': 'beginlease', 'sType': 'date', 'sWidth': '300px' },
{ 'mDataProp': 'endlease', 'sTitle': 'endlease', 'sType': 'date', 'sDefaultContent' : 'none', 'sWidth': '300px' },
{ 'mDataProp': 'macaddr', 'sTitle': 'macaddr' },
{ 'mDataProp': 'ipaddr', 'sTitle': 'ipaddr' },
{ 'mDataProp': 'login', 'sTitle': 'login' },
],
'aaSorting': [[ 2, 'desc' ]],
'bAutoWidth': false,
'fnServerData': function( sSource, aoData, fnCallback ) {
$.ajax( {
'dataType': 'json',
'type': 'POST',
'url': sSource,
'data': aoData,
'success': fnCallback
});
}
});[/quote]

Html part is rather trivial (and proper i suppose)

[quote]









































[/quote]

It may be something wrong with sDom param?. There is no other js/css code than jquery, jquery ui (w/ theme), colvis and datatable. I'm not good js programmer, so if it's something trivial don't laugh at me pls.

Replies

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    Generally speaking that looks fine to me. The sorting icons being on the next line probably isn't the desired effect, but you can just add something like .DataTables_sort_icon { float:right } to "fix" that. Or you could use absolute positioning like I have on my home page example.

    Allan
  • szymonszymon Posts: 4Questions: 0Answers: 0
    Oh i've thought that it should ootb look like examples without messing up with css. Thanks for suggestions, rest i'll fix myself.
This discussion has been closed.